Slow login process

Hi!


It takes some more than 1 minute for my macbook pro to show desktop after I enter password and hit Enter on login screen. Progress bar moves slowly for ~20 seconds, then it reaches ~90% and freezes for another 30-40 seconds.


I tried removing all extra files from ~/Library/LaunchAgents, /Library/LaunchAgents, /Library/LaunchDaemons, but that did not help.


Login screen itself appears almost instantly after startup.


I have MacBook Pro (15-inch, 2017) + Catalina 10.15.4 (19E287)


Full System.log -- https://gist.github.com/adaptun/404e8d811d09b32dd2d624a31846287f


The most suspicious part in it is following:


May 16 22:43:06 akoblovMbp xpcproxy[385]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port

May 16 22:43:07 akoblovMbp timed[167]: settimeofday({0x5ec0424b,0x6c395}) == 0

May 16 22:43:09 akoblovMbp com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.syspolicyd.195): Failed to bootstrap path: path = /usr/libexec/syspolicyd, error = 108: Invalid path

May 16 22:43:59 akoblovMbp loginwindow[203]: There is still an active connection

May 16 22:44:00 --- last message repeated 2 times ---


Notice -- 50 seconds between 3rd and 4th line. Does this mean that syspolicyd take 50 seconds to do something?


Any ideas how to troubleshoot this are appreciated.


Thank you!

MacBook Pro 15", macOS 10.15

Posted on May 16, 2020 12:56 PM

Reply
Question marked as Top-ranking reply

Posted on May 19, 2020 4:11 AM

Looking at another occurence, I decided to look further into "There is still an active connection"


May 19 09:50:45 akoblovMbp com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.syspolicyd.195): Failed to bootstrap path: path = /usr/libexec/syspolicyd, error = 108: Invalid path
May 19 09:50:46 akoblovMbp Installer Progress[158]: Setting window alpha values to 1.0
May 19 09:51:17 --- last message repeated 1 time ---
May 19 09:51:34 akoblovMbp loginwindow[213]: There is still an active connection
May 19 09:51:34 akoblovMbp loginwindow[213]: There is still an active connection
May 19 09:51:35 --- last message repeated 1 time ---
May 19 09:51:35 akoblovMbp com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.parentalcontrolsd.415): Failed to bootstrap path: path = /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/Resources/parentalcontrolsd, error = 2: No such file or directory
May 19 09:51:35 akoblovMbp Installer Progress[158]: Progress Updated: currentPhase = "loginwindow Boot", phase progress = 50.000, total progress = 98.843


Notice -- 40 seconds delay and "There is still an active connection" in loginwindow


I collected all logs via `sudo log collect --start "2020-05-19 09:50:40" --size 1000m`


Opened system_logs.logarchive and searched for loginwindow process messages. I found following:


213 default 2020-05-19 09:51:34.245866 +0300 loginwindow There is still an active connection

213 default 2020-05-19 09:51:35.610407 +0300 loginwindow -[SessionAgentCom SACBeginLoginTransition:reply:] | Enter, sent by pid: 363, name: SecurityAgent

213 default 2020-05-19 09:51:35.610408 +0300 loginwindow -[SessionAgentCom SACBeginLoginTransition:reply:] | calling to transition code to signal ready

213 default 2020-05-19 09:51:35.610882 +0300 loginwindow -[LoginTransition externalBeginLoginTransition:] | dispatch_sync to main thread for other transition options

213 default 2020-05-19 09:51:35.610882 +0300 loginwindow -[LoginTransition externalBeginLoginTransition:] | Enter. MainThread (should be 0): 0


So, active connection was held by process 363.


I looked for messages for only this PID and found following:


363 default 2020-05-19 09:50:40.619760 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Try again in three seconds.

363 default 2020-05-19 09:50:43.616205 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Try again in three seconds.

363 default 2020-05-19 09:50:46.616436 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Try again in three seconds.


Or, some more details:


272 default 2020-05-19 09:51:33.955746 +0300 mDNSResponder [R796] DNSServiceCreateConnection START PID[363](SecurityAgent)

272 default 2020-05-19 09:51:33.956001 +0300 mDNSResponder [R800] DNSServiceGetAddrInfo(C000D000, 0, 0, <private>) START PID[363](SecurityAgent)

272 default 2020-05-19 09:51:33.980624 +0300 mDNSResponder [R796] DNSServiceCreateConnection STOP PID[363](SecurityAgent)

272 default 2020-05-19 09:51:33.980628 +0300 mDNSResponder [R800] DNSServiceGetAddrInfo(<private>) STOP PID[363](SecurityAgent)

363 default 2020-05-19 09:51:34.616069 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Timeout reached.



Right, the problem has to do that my account is mobile account. Now I wonder how to decrease this timeout or skip the check that SecurityAgent does at all.

Similar questions

8 replies
Question marked as Top-ranking reply

May 19, 2020 4:11 AM in response to AlexanderKoblov

Looking at another occurence, I decided to look further into "There is still an active connection"


May 19 09:50:45 akoblovMbp com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.syspolicyd.195): Failed to bootstrap path: path = /usr/libexec/syspolicyd, error = 108: Invalid path
May 19 09:50:46 akoblovMbp Installer Progress[158]: Setting window alpha values to 1.0
May 19 09:51:17 --- last message repeated 1 time ---
May 19 09:51:34 akoblovMbp loginwindow[213]: There is still an active connection
May 19 09:51:34 akoblovMbp loginwindow[213]: There is still an active connection
May 19 09:51:35 --- last message repeated 1 time ---
May 19 09:51:35 akoblovMbp com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.parentalcontrolsd.415): Failed to bootstrap path: path = /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/Resources/parentalcontrolsd, error = 2: No such file or directory
May 19 09:51:35 akoblovMbp Installer Progress[158]: Progress Updated: currentPhase = "loginwindow Boot", phase progress = 50.000, total progress = 98.843


Notice -- 40 seconds delay and "There is still an active connection" in loginwindow


I collected all logs via `sudo log collect --start "2020-05-19 09:50:40" --size 1000m`


Opened system_logs.logarchive and searched for loginwindow process messages. I found following:


213 default 2020-05-19 09:51:34.245866 +0300 loginwindow There is still an active connection

213 default 2020-05-19 09:51:35.610407 +0300 loginwindow -[SessionAgentCom SACBeginLoginTransition:reply:] | Enter, sent by pid: 363, name: SecurityAgent

213 default 2020-05-19 09:51:35.610408 +0300 loginwindow -[SessionAgentCom SACBeginLoginTransition:reply:] | calling to transition code to signal ready

213 default 2020-05-19 09:51:35.610882 +0300 loginwindow -[LoginTransition externalBeginLoginTransition:] | dispatch_sync to main thread for other transition options

213 default 2020-05-19 09:51:35.610882 +0300 loginwindow -[LoginTransition externalBeginLoginTransition:] | Enter. MainThread (should be 0): 0


So, active connection was held by process 363.


I looked for messages for only this PID and found following:


363 default 2020-05-19 09:50:40.619760 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Try again in three seconds.

363 default 2020-05-19 09:50:43.616205 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Try again in three seconds.

363 default 2020-05-19 09:50:46.616436 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Try again in three seconds.


Or, some more details:


272 default 2020-05-19 09:51:33.955746 +0300 mDNSResponder [R796] DNSServiceCreateConnection START PID[363](SecurityAgent)

272 default 2020-05-19 09:51:33.956001 +0300 mDNSResponder [R800] DNSServiceGetAddrInfo(C000D000, 0, 0, <private>) START PID[363](SecurityAgent)

272 default 2020-05-19 09:51:33.980624 +0300 mDNSResponder [R796] DNSServiceCreateConnection STOP PID[363](SecurityAgent)

272 default 2020-05-19 09:51:33.980628 +0300 mDNSResponder [R800] DNSServiceGetAddrInfo(<private>) STOP PID[363](SecurityAgent)

363 default 2020-05-19 09:51:34.616069 +0300 SecurityAgent Network wasn't ready for mobile user "akoblov" autologin. Timeout reached.



Right, the problem has to do that my account is mobile account. Now I wonder how to decrease this timeout or skip the check that SecurityAgent does at all.

May 16, 2020 2:43 PM in response to AlexanderKoblov

Hi Alexander.


EtreCheck is a simple little app to display the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to help people help you with your Mac.

http://www.etresoft.com/etrecheck


Pastebin is a good place to paste the whole report if you capture the URL while there…

https://pastebin.com/


Workable but harder for me to work with...the Note tool on the bottom of this editor's toolbar, as shown in the image, to copy and paste the output from EtreCheck. In a Reply before you click post, look for this to add longer texts...

May 21, 2020 12:28 AM in response to BDAqua

I did some other tests and notice that first login is slow even for non-mobile user (local admin). And second login is fast for both users. I have FileVault enabled. And as I read on stackexchange [1] with FileVault boot process basically happens on first login, so this can explain slow time, so I'll leave this as that.


Thank you for the help!


[1] https://apple.stackexchange.com/questions/155305/mac-boots-into-log-on-screen-quickly-but-takes-long-time-to-log-into-account

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Slow login process

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.