Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

razmarino

macrumors member
Mar 1, 2012
55
0
only appleeventsd here
 

Attachments

  • ?????? ?????? 2012-10-31 ? 18.23.25.png
    ?????? ?????? 2012-10-31 ? 18.23.25.png
    187.7 KB · Views: 579

maxonthemac

macrumors newbie
Oct 28, 2012
9
0
Not just appleeventsd
I also had other services hanging on shutdown, but they were due to badly designed third-party drivers: I could track them using the same method (looking at the launchd-shutdown log) and I could solve them by just avoiding to load the associated kernel extension. I am saying this to highlight that appleventsd may still not be the sole cause, even though at present it seems the more likely and frequently observed.

Digging further into the problem
For some time I had some evidence that the AppleIDAuthAgent (com.apple.coreservices.appleid.authentication) was also hanging, but after further tests only appleeventsd seemed to actually slow down my poweroff sequence. However, during those tests on the AppleIDAuthAgent I could observe the origin of the problem: the agent just stopped handling the SIGTERM signal. The documentation (man page) of launchd.plist explains that, when a service is to be shut down, launchd first attempts to gracefully stop it by sending a SIGTERM: if the process does not quit spontaneously within the timeout, then launchd abruptly terminates it with a SIGKILL. So, what I did was to invoke the AppleIDAuthAgent "manually" (i.e., not through launchd) and run it through dtruss, a utility that tracks the system calls issued by a process. When I attempted to send a SIGTERM to that process nothing at all happened: no reaction, no system calls printed, no spontaneous exit. SIGQUIT and SIGHUP were instead processed successfully. And what was most strange is that this did not happen consistently, so it could not be ascribed to an overlook by the programmers that "forgot" to process the SIGTERM signal (which, also intuitively, looks very very unlikely).
I guess something similar could be happening with appleeventsd, but the true point is how to determine what makes it ignore the SIGTERM. Reading reports like this and this makes me prone to thinking it's really a bug, although I could not (yet) rule out potential third-party causes on my machine.

BTW, I am not using iCloud.

BTW again, when you use Console remember to look at the launchd-shutdown.log: the other file suffixed with a 1 is usually an older version of the same file that refers to the penultimate (i.e., not latest) shutdown sequence.
 

ParryD

macrumors member
May 16, 2010
45
0
If you have a very slow shutdown time (+20 seconds) please open the Console app and check the system launchd-shutdown logs and search for the text "timeout" to find out which processes that are causing the slow shutdown. For me the problem is the securityd daemon and the appleevents services.

I had these:

20005100 com.apple.launchd 1 com.apple.securityd 15 Exit timeout elapsed (20 seconds). Killing
20007444 com.apple.launchd 1 com.apple.diskarbitrationd 16 Exit timeout elapsed (20 seconds). Killing
20007499 com.apple.launchd 1 com.apple.coreservices.appleevents 51 Exit timeout elapsed (20 seconds). Killing
 

togidogi

macrumors newbie
Nov 1, 2012
1
0
I am a 67yr tech impaired old fart but I think I'm having the same problem with my 2012 MacBook Air. I googled the issue and eventually got to you all and registered so that I could ask a question. I've read the entire thread and have the same kinds of error messages discussed. My question is simply why does it shut down in 2secs 75% of the time but the other 25% takes 22 secs? It's like a guessing game as to how long it will take to shut down. It's frustrating to have to get out my stopwatch each time I shut down to satisfy myself that all is good (or bad). Quite a few posts suggest that the "shut-down slowly" issue is experienced on a consistent basis.

Regards-
 

maxonthemac

macrumors newbie
Oct 28, 2012
9
0
My question is simply why does it shut down in 2secs 75% of the time but the other 25% takes 22 secs? It's like a guessing game as to how long it will take to shut down.
It is, the underlying reason being still basically unknown. The behavior is not always consistently observed, but may depend on how (much) you use the machine since its poweron. The more you do, the more chances you have to experience the slowdown. Since most users rightly use the machine for a while by running several applications before poweroff, the problem is very likely to become constantly present.
Quite a few posts suggest that the "shut-down slowly" issue is experienced on a consistent basis.
I think what you call "consistent" can be interpreted in the way I have mentioned above.
 

Mike MA

macrumors 68020
Sep 21, 2012
2,090
1,813
Germany
I am a 67yr tech impaired old fart but I think I'm having the same problem with my 2012 MacBook Air. I googled the issue and eventually got to you all and registered so that I could ask a question. I've read the entire thread and have the same kinds of error messages discussed. My question is simply why does it shut down in 2secs 75% of the time but the other 25% takes 22 secs? It's like a guessing game as to how long it will take to shut down. It's frustrating to have to get out my stopwatch each time I shut down to satisfy myself that all is good (or bad). Quite a few posts suggest that the "shut-down slowly" issue is experienced on a consistent basis.

Regards-

No, its on a random basis. In my case mostly after heavy usage or air play activities via iTunes/ Apple TV.
 

razmarino

macrumors member
Mar 1, 2012
55
0
one more tracked down
 

Attachments

  • ?????? ?????? 2012-11-03 ? 0.25.20.png
    ?????? ?????? 2012-11-03 ? 0.25.20.png
    17.8 KB · Views: 412

3rd Rock

macrumors 6502
Aug 10, 2012
459
1
Over here
Nov 2 com.apple.launchd[1] (com.apple.coreservices.appleid.authentication[118]): Exit timeout elapsed (20 seconds). Killing


Mine above.......
 

atMac

macrumors 6502
Jun 20, 2011
328
0
i have 3 items slowing me down
Code:
20006916 com.apple.launchd                1        com.apple.iCloudHelper   351       Exit timeout elapsed (20 seconds). Killing
20010984 com.apple.launchd                1        com.apple.suhelperd      425       Exit timeout elapsed (20 seconds). Killing
20011065 com.apple.launchd                1        com.apple.securityd      15        Exit timeout elapsed (20 seconds). Killing


----------

Has anyone tried 10.8.3 and seen if it fixes the issue?

its not out for developers yet.
 

evgenyneu

macrumors newbie
Nov 9, 2012
1
0
Posted a bugreport on https://bugreport.apple.com. Apple replied immediately asking to attach system report file. It looks like Apple is working hard on this problem. I can also see that they marked my ticked as a duplicate to another ticket.

As it was already noted here, I would suggest everybody who has this problem file a bugreport at Apple. The more data they have the sooner they can fix it.
 

RMSko

macrumors 6502
Sep 3, 2010
365
46
I'm not sure what I'm supposed to be looking for in Console so below is everything it said at the time of shut down. If someone can interpret this for me it would be great!

11/12/12 2:24:07.127 PM WindowServer[71]: dict count after removing entry for window 0x1d is 0
11/12/12 2:24:07.137 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.137 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.138 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.138 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.138 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.143 PM com.apple.launchd[1]: (com.apple.ShareKitHelper[570]) Exited: Killed: 9
11/12/12 2:24:07.144 PM com.apple.launchd.peruser.501[121]: ([0x0-0x10010].com.apple.inputmethod.ironwood[173]) Exited: Killed: 9
11/12/12 2:24:07.152 PM coreservicesd[31]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=159
11/12/12 2:24:07.156 PM com.apple.launchd.peruser.501[121]: ([0x0-0xb00b].com.apple.iTunesHelper[164]) Exited with code: 1
11/12/12 2:24:07.155 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.155 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.156 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.156 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.156 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.157 PM com.apple.launchd.peruser.501[121]: ([0x0-0x22022].com.apple.AppleSpell[221]) Exited: Terminated: 15
11/12/12 2:24:07.157 PM com.apple.launchd.peruser.501[121]: (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000[985]) Exited: Killed: 9
11/12/12 2:24:07.159 PM coreservicesd[31]: SendFlattenedData, got error #268435460 (ipc/send) timed out from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=167
11/12/12 2:24:07.159 PM coreservicesd[31]: SendFlattenedData, got error #268435460 (ipc/send) timed out from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=767
11/12/12 2:24:07.159 PM coreservicesd[31]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=140
11/12/12 2:24:07.187 PM loginwindow[53]: DEAD_PROCESS: 53 console
11/12/12 2:24:07.245 PM airportd[1038]: _doAutoJoin: Already associated to “Airport Express - LAJSR”. Bailing on auto-join.
11/12/12 2:24:07.407 PM coreservicesd[31]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=129
11/12/12 2:24:07.409 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.409 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.410 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.410 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.410 PM WindowServer[71]: CGXGetConnectionProperty: Invalid connection 45571
11/12/12 2:24:07.430 PM shutdown[1039]: halt by Rich:
11/12/12 2:24:07.430 PM shutdown[1039]: SHUTDOWN_TIME: 1352748247 430131
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
I'm not sure what I'm supposed to be looking for in Console so below is everything it said at the time of shut down. If someone can interpret this for me it would be great!

(log entries snipped)
Oddly enough, there's nothing in that log suggesting any of the culprits identified in this thread is causing problems for you.
 

RMSko

macrumors 6502
Sep 3, 2010
365
46
Oddly enough, there's nothing in that log suggesting any of the culprits identified in this thread is causing problems for you.
Hmmm. Well I am certainly experiencing the slow shut down time and also the fact that every once in awhile it shuts down quickly so I would think there must be something else going on that's more innate to the the OS?
 

Krazy Bill

macrumors 68030
Dec 21, 2011
2,985
3
It's pretty bad when a SSD equipped MBP takes 30 seconds to shut down. My kid's machine running Snow Leopard on a 5400rpm drive does it in 3.
 

donalgodon

macrumors newbie
Nov 1, 2012
2
0
Just clean system caches and the restart will be super fast. This has worked for me for ages.

Open terminal and write these commands:


sudo chown root:admin / (enter password when asked)

sudo kextcache -system-prelinked-kernel

sudo kextcache -system-caches



I have this commands in dashboard notes, so every time boot up gets slow I use them to restore it. With a ssd drive it makes reboot ultra fast.

This actually worked.

Thanks so much!
 

3rd Rock

macrumors 6502
Aug 10, 2012
459
1
Over here
Tried the above suggestion using the terminal.....

Unknown what happened but as soon as I got to the "Password" entry part, I could not enter the password at all. None of the keyboard keys worked. Any suggestions ?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Tried the above suggestion using the terminal.....

Unknown what happened but as soon as I got to the "Password" entry part, I could not enter the password at all. None of the keyboard keys worked. Any suggestions ?
That's normal. The Terminal does NOT echo your input at all for security reasons. Trust me, though - it's still receiving your keystrokes.
 

rhoydotp

macrumors 6502
Sep 28, 2006
467
75
Open terminal and write these commands:

sudo chown root:admin / (enter password when asked)

you've got bigger issues if you have to do this ... permission/ownership on this directory should not change unless you manually do it or a malicious program does it for you :cool:
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.