Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.8: A fix for slow shutdown times' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.8: A fix for slow shutdown times
Authored by: Mr. H on Apr 08, '13 04:55:24PM
If you boot up in verbose mode (hold down "command" and "v" keys at beginning of boot), when you subsequently shut down you might see some messages that help to track down the cause of your slow shutdown. Otherwise I'd have a look in the system logs via the console app to see if there's any hints in there.

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 05:45:46PM
There's nothing in system.log and cmd-v doesn't show anything during shutdown either. When I select "Shut Down" from the apple menu while holding opt (so no "relaunch?" dialog) at 17:36:36, I get a bunch of messages in system.log about various apps and background processes existing, then:

Apr  8 17:36:37 shutdown[580]: halt by craig:
Apr  8 17:36:37 shutdown[580]: SHUTDOWN_TIME: 1365467797 473580
Apr  8 17:37:06 localhost bootlog[0]: BOOT_TIME 1365467826 0
At 17:36:37 (about 1 second after I told it to shut down), the screen goes grey (finder desktop image disappears). The mouse cursor hangs around for 15-20 seconds (and can still be moved), then it disappears and screen stays grey for another 10-15 seconds. Once screen went black, I rebooted right away and that logged the BOOT_TIME message shortly thereafter. So it's basically taking about 30 seconds or so to shutdown after it's apparently already shut everything down, and presumably that "halt" message means the kernel has already unmounted everything, turned off swap, etc, etc and now it's actually halting.

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 05:50:58PM
Digging around in, I found logs, including launchd-shutdown.system.log which has some interesting lines in it like:

20008301                1        1         System: Userspace shutdown finished at: Mon Apr  8 17:36:57 2013
20008307                1        1         System: Userspace shutdown took approximately 20 seconds.
and a bit before that:

20008122                1 96        Dispatching kevent callback.
20008125                1 96        EVFILT_PROC event for job.
20008127                1 96        Reaping
20008150                1 96        Exited 20.001060 seconds after the first signal was sent
20008157                1 0         Exited while shutdown in progress. Processes remaining: 0/1
20008170                1 0         Job was last to exit during shutdown of: System.
20008173                1 0         Job is useless. Removing.
20008176                1 0         Closing receive right for
20008183                1 0         Mach service deleted:
20008188                1 0         Removed
I'll dig around there some more and see if I can figure out what exactly it is that's getting stuck for 20 seconds before timing out and allowing shutdown to proceed...

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 05:59:07PM
Some googling of messages in the launchd shutdown log like "Exit timeout elapsed (20 seconds). Killing" led me to this thread which seems to be on point.

[ Reply to This | # ]