1 2 3 Previous Next 43 Replies Latest reply: Jan 5, 2014 2:39 PM by yorgerson
Jerome Meyer Level 1 Level 1 (0 points)

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?

  • 1. Re: locationd keeps crashing every 3 seconds
    Grigory Entin Level 1 Level 1 (5 points)

    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.

  • 2. Re: locationd keeps crashing every 3 seconds
    Knoddix Level 1 Level 1 (125 points)

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

  • 3. Re: locationd keeps crashing every 3 seconds
    Topher Kessler Level 6 Level 6 (9,340 points)

    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.

  • 4. Re: locationd keeps crashing every 3 seconds
    Jerome Meyer Level 1 Level 1 (0 points)

    I can't seem to install the combo update as I am already running 10.8.2 (updated through the App Store).

  • 5. Re: locationd keeps crashing every 3 seconds
    Jerome Meyer Level 1 Level 1 (0 points)

    Removing the locationd database did not help - in fact it seems to have made things worse (even after a backup restore). Now the checkbox for Location Services won't stay checked.

  • 6. Re: locationd keeps crashing every 3 seconds
    Topher Kessler Level 6 Level 6 (9,340 points)

    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.

  • 7. Re: locationd keeps crashing every 3 seconds
    Jerome Meyer Level 1 Level 1 (0 points)

    I did that just now, and all the permissions were fine (nothing to repair).

  • 8. Re: locationd keeps crashing every 3 seconds
    Linc Davis Level 10 Level 10 (117,990 points)

    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.

  • 9. Re: locationd keeps crashing every 3 seconds
    Jerome Meyer Level 1 Level 1 (0 points)

    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

     

    Just tried this, but it didn't resolve the issue either. I can check the 'Enable Location Services' box, it'll stay checked for a few seconds then I get a beachball - and it will uncheck itself right after that.

     

    I did quite a bit of Googling around and can't seem to find a procedure to rebuild this locationd DB... Which looks like it's the culprit here.

  • 10. Re: locationd keeps crashing every 3 seconds
    Linc Davis Level 10 Level 10 (117,990 points)

    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.

  • 11. Re: locationd keeps crashing every 3 seconds
    Jerome Meyer Level 1 Level 1 (0 points)

    Unfortunately I can't boot in safe mode - I am using Filevault 2 (and also have a firmware password).

  • 12. Re: locationd keeps crashing every 3 seconds
    Linc Davis Level 10 Level 10 (117,990 points)

    sudo update_dyld_shared_cache -force

  • 13. Re: locationd keeps crashing every 3 seconds
    Jerome Meyer Level 1 Level 1 (0 points)

    sudo update_dyld_shared_cache -force

    No change as far as I can tell...

  • 14. Re: locationd keeps crashing every 3 seconds
    Linc Davis Level 10 Level 10 (117,990 points)

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

     

    sudo opensnoop -n locationd

1 2 3 Previous Next