Process “ubd” high CPU usage

By observing log messages in ~/Library/Logs/Ubiquity/<my username>/, I realized that Ubiquity (iCloud process) kept trying to create a file in a folder that doesn't exist:

ubiquity log

I opened up the Terminal and created this directory and its parent directories up to .ubd:

cd ~/Library/Mobile\ Documents/
sudo mkdir .ubd && cd .ubd
sudo mkdir peer-E2B13E4F-56F7-C79B-1621-E30738B638FE-v23 && cd peer-E2B13E4F-56F7-C79B-1621-E30738B638FE-v23
sudo mkdir ftr

Then I changed the newly created directories' owner from root to myself:

cd ../..
sudo chown -R <my username> .ubd/ 

The fan turned silent instantly.