Skip navigation

locationd keeps crashing every 3 seconds

3146 Views 43 Replies Latest reply: Jan 5, 2014 2:39 PM by yorgerson RSS
1 2 3 Previous Next
Jerome Meyer Level 1 Level 1 (0 points)
Currently Being Moderated
Dec 14, 2012 2:46 AM

I tried:

  • rebooting in recovery mode and repair disk permissions
  • disabling location services

 

And I keep getting the following error messages in the console (eating up a lot of CPU cycles):

14/12/12 5:42:08.405 PM locationd[511]: NOTICE,Location icon should now be in state 0
14/12/12 5:42:08.405 PM locationd[511]: locationd was started after an unclean shutdown
14/12/12 5:42:08.920 PM locationd[511]: Could not prepare statement pragma auto_vacuum;, error code = 11, error message = database disk image is malformed
14/12/12 5:42:08.920 PM locationd[511]: database false error 11; deleting and exiting
14/12/12 5:42:08.920 PM locationd[511]: NOTICE,Killing locationd to resolve corrupted database.
14/12/12 5:42:09.374 PM ReportCrash[501]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
14/12/12 5:42:09.374 PM ReportCrash[501]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
14/12/12 5:42:09.374 PM ReportCrash[501]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
14/12/12 5:42:09.374 PM ReportCrash[501]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
14/12/12 5:42:09.374 PM ReportCrash[501]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
14/12/12 5:42:09.374 PM ReportCrash[501]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
14/12/12 5:42:09.374 PM ReportCrash[501]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
14/12/12 5:42:09.375 PM ReportCrash[501]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
14/12/12 5:42:09.375 PM ReportCrash[501]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
14/12/12 5:42:09.375 PM ReportCrash[501]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
14/12/12 5:42:09.425 PM com.apple.launchd[1]: (com.apple.locationd[511]) Job appears to have crashed: Illegal instruction: 4
14/12/12 5:42:09.425 PM com.apple.launchd[1]: (com.apple.locationd) Throttling respawn: Will start in 2 seconds
14/12/12 5:42:09.527 PM ReportCrash[501]: Saved crash report for locationd[511] version 1239.39 to /Library/Logs/DiagnosticReports/locationd_2012-12-14-174209_Jeromes-MacBook-Air.crash

 

The only way to stop it is to disable locationd in the terminal:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.locationd.plist 

 

Is there a fix to this, instead of this workaround?

  • Grigory Entin Level 1 Level 1 (5 points)
    Currently Being Moderated
    Dec 14, 2012 3:12 AM (in response to Jerome Meyer)

    I have exactly same problem, with the same errors in system.log/UserAgentEvent/ReportCrash eating lots of CPU cycles. Unfortunately I don't have any solution. Thanks for launchctl hint - it worked for me.

  • Knoddix Level 1 Level 1 (125 points)
    Currently Being Moderated
    Dec 14, 2012 4:40 AM (in response to Grigory Entin)

    I would try installing the latest combo update for your version of OS X again

  • Topher Kessler Level 6 Level 6 (9,295 points)
    Currently Being Moderated
    Dec 14, 2012 6:44 AM (in response to Jerome Meyer)

    Try removing the locationd database, which is located in the hidden folder /var/db/locationd/

     

    This database contains information on the programs that use the location services, and should be remade when you re-enable location services and use your various applications again.

     

    To remove this database, first back up your system and then choose "Go to Folder" in the Finder's "Go" menu. Then enter "/var/db" in the text field that appears, and when the hidden "db" folder opens, delete the folder called "locationd" within it. After this, try re-enabling location services and see if the problem continues.

  • Topher Kessler Level 6 Level 6 (9,295 points)
    Currently Being Moderated
    Dec 16, 2012 8:10 PM (in response to Jerome Meyer)

    Try running a permissions fix on the boot drive using Disk Utility. If the problem is a matter of inappropriate file permissions then this should help address the issue, and at least allow the settings to be saved to this location.

  • Linc Davis Level 10 Level 10 (107,540 points)
    Currently Being Moderated
    Dec 16, 2012 9:00 PM (in response to Jerome Meyer)

    Back up all data.

     

    If you have more than one user account, you must be logged in as an administrator to carry out these instructions.

     

    Launch the Terminal application in any of the following ways:

     

    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

     

    ☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

     

    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.

     

    Triple-click the line below to select it, then drag or copy into the Terminal window — do not type — and press return:

     

    sudo find /var/folders -user _locationd -name C -delete

     

    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning. If you don’t have a login password, you’ll need to set one before you can run the command.

     

    Reboot and see whether there's any improvement.

  • Linc Davis Level 10 Level 10 (107,540 points)
    Currently Being Moderated
    Dec 16, 2012 9:39 PM (in response to Jerome Meyer)

    Please read this whole message before doing anything.

    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

    The purpose of the test is to determine whether your problem is caused by third-party system modifications that load automatically at startup or login.

     

    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    • Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    • When you see the gray Apple logo, release the shift key.
    • If you are prompted to log in, type your password, and then hold down the shift key again as you click  Log in.
    *Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.

     

    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.

    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

     

    Test while in safe mode. Same problem?

     

    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Linc Davis Level 10 Level 10 (107,540 points)
    Currently Being Moderated
    Dec 16, 2012 10:05 PM (in response to Jerome Meyer)

    sudo update_dyld_shared_cache -force

  • Linc Davis Level 10 Level 10 (107,540 points)
    Currently Being Moderated
    Dec 16, 2012 10:37 PM (in response to Jerome Meyer)

    Please post the output of the following command, through one launch-crash cycle:

     

    sudo opensnoop -n locationd

1 2 3 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.