ditto 100% CPU usage in Mac OS X
My MacBook Pro was starting to really drag it’s heels last night and a quick trip to the Activity Monitor revealed two copies of a process called “ditto” taking up 100% of the processor time on both cores!
The ditto program is a command line tool for copying files and merging directories as well as extracting archives. Earlier in the evening I had been trying to extract what appears to be a corrupted .ZIP file from the finder which had failed a couple of times as it contained a directory structure but wasn’t creating the directories. In the end I made the directories by hand and then extracted it from the command line with “unzip”.
It seems that each of the failed extractions from the finder with the BOMArchiveHelper system utility left the ditto process running, even when I force quit the crashed BOMArchiveHelper instance. From looking at the process hierarchy, the ditto processes were running directly under launchd so it makes sense that they wouldn’t have been killed with BOMArchiveHelper as they aren’t children of it.
Killing each of the ditto processes from the Activity Monitor returned by MacBook Pro to it’s normal responsive self. Just remember that killing a crashed process might not always get rid of everything that it has spawned!