Zsh using 100% of CPU during iWork install

I've been trying to install Keynote and Numbers, but they hang like so:

app store hang screen

This is associated with a shell script consuming 100% of a CPU:

activity monitor

That process is defaults delete com.apple.helpd com.apple.helpd.sdmMapsCreated, which looks like an operation that shouldn't be long-running at all:

enter image description here

Killing its grandparent process results in the "an error has occured" message in the app store. What gives? I don't even know how to begin debugging this.


I was able to solve this, but I still don't know what caused it.

Iteratively:

  1. Watch for a hung sh job.
  2. Run the command in a terminal.
  3. Kill the parent of the hung job with kill -9.
  4. Return to 1 until no more hung jobs appear.