Stuck system tasks hanging up OS X

When OS X performs some system tasks that take a little while to complete, the system will present a progress window or similar notification to keep the user informed of what is going on.

When OS X performs some system tasks that take a little while to complete, the system will present a progress window or similar notification to keep the user informed of what is going on. This includes tasks like mounting disk images, copying files, burning discs, or emptying the trash. Despite the convenience of these notifications, there may be times when they hang up and prevent the user from interacting with the system and doing things like restarting.

Apple discussion user "tolwyn" writes:

"I tried to erase the contents of a flash drive plugged into the USB port of my MacBook earlier today. It got maybe 5% or so of the way into emptying the trash, when it more or less froze up. It stuck on a certain number of files, and the hard drive continued to spin with no progress. I tried stopping the empty, and it now says "stopping..." but it's still spinning and doing nothing. I removed the flash drive just to see if it would quit, but it simply told me that the drive had been removed and still shows the same trash progress bar that says "Stopping...". That was roughly twelve hours ago. I've been able to use the computer in a fairly normal way since that time, but the computer will not allow me to shut down or restart, nor will it allow me to Force Quit the Trash, nor will it reboot if I remove the power cord and the battery (it just restores to the same screen and state as before, with the trash still trying to empty in a drive that's no longer attached, and finally, with the hard drive still spinning like mad."

When these problems happen, there are several approaches you can take to clear them or properly restart the system. Do not immediately resort to pulling the power or doing a hard reset of the system, since this can further damage the system, cause data loss, and lead to other problems.

Relaunch the Finder or associated application

The easiest way to fix the problem is to quit and relaunch the application that is responsible for presenting the window. For the most part, these are done by the Finder, so you can try relaunching it by pressing Option-Command-Esc, choosing the Finder, and pressing the "Relaunch" button. If you are burning a DVD with Disk Utility, you will need to force-quit the application.

Shutdown options

If force-quitting applications does not work, then you should try restarting the system. If the Finder does not allow you to restart, you can do a more crude restart using the "shutdown" command in the Terminal. Open the Terminal application and enter the following command:

sudo shutdown -h now

After supplying your password, the system will perform a shutdown routine that will bypass many of the checks such as those that check whether a file transfer is taking place. This is a better solution than pulling the power, but it's not as clean as using the Finder's shutdown command. Optionally, you can use "-r" instead of "-h" in the command to restart the system instead of halting it.

Unplug hardware

If you are performing an action that includes an external device, such as a hard drive or disc writer, you can try unplugging it from the system. If you hear any activity coming from the device during the hang, do not attempt to unplug it; however, if there is no sound or activity such as blinking lights, then follow this procedure:

  1. Quit as many applications as possible

  2. Unmount and disconnect all devices you can besides the affected one

  3. Wait for activity to cease with the device (listen for sound of activity and watch for blinking lights)

  4. Unplug the device from the computer

If you run into a situation such as the one above where a laptop will not seem to shut down, even after pulling the power and the battery, you can force the computer to reset by holding down the power button for about 5-10 seconds.

Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Featured Video

We pummel the powder in Nissan's Winter Warrior concepts

Equipped with suspension lifts and actual tracks, these concepts are meant to reach places that no ordinary vehicle can.

by Jon Wong