30

I looked in iStat Menus and noticed that a process named lsd was consuming 99% of my CPU (Out of 400% for 4 cores). I searched around for a bit, but couldn't find out what this was, and why it's using so much processing power. It's not Little Snitch Daemon, as I never installed that. Someone else said that it could be Launch Services Daemon, but I thought that process was launchd. It's Launch Services Daemon.

Upon looking in the console, I notice these messages when searching for lsd:

22/12/2015 9:36:02.000 a.m. kernel[0]: Sandbox: AssetCacheLocato(400) deny(1) mach-lookup com.apple.lsd.mapdb
22/12/2015 9:36:02.931 a.m. AssetCacheLocatorService[400]: LaunchServices: disconnect event received for service com.apple.lsd.mapdb
22/12/2015 9:36:02.000 a.m. kernel[0]: Sandbox: AssetCacheLocato(400) deny(1) mach-lookup com.apple.lsd.mapdb
22/12/2015 9:36:02.932 a.m. AssetCacheLocatorService[400]: LaunchServices: disconnect event received for service com.apple.lsd.mapdb
22/12/2015 9:36:03.000 a.m. kernel[0]: Sandbox: AssetCacheLocato(400) deny(1) mach-lookup com.apple.lsd.modifydb
22/12/2015 9:36:03.657 a.m. AssetCacheLocatorService[400]: LaunchServices: disconnect event received for service com.apple.lsd.modifydb
22/12/2015 9:39:41.000 a.m. kernel[0]: Sandbox: SpotlightNetHelp(376) deny(1) mach-lookup com.apple.lsd.mapdb
22/12/2015 9:39:41.995 a.m. SpotlightNetHelper[376]: LaunchServices: disconnect event received for service com.apple.lsd.mapdb
22/12/2015 9:39:41.000 a.m. kernel[0]: Sandbox: SpotlightNetHelp(376) deny(1) mach-lookup com.apple.lsd.mapdb
22/12/2015 9:39:41.996 a.m. SpotlightNetHelper[376]: LaunchServices: disconnect event received for service com.apple.lsd.mapdb
22/12/2015 9:39:42.000 a.m. kernel[0]: Sandbox: SpotlightNetHelp(376) deny(1) mach-lookup com.apple.lsd.modifydb
22/12/2015 9:39:42.370 a.m. SpotlightNetHelper[376]: LaunchServices: disconnect event received for service com.apple.lsd.modifydb
22/12/2015 9:39:58.100 a.m. lsd[296]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 10:01:15.000 a.m. kernel[0]: process lsd[237] thread 19967 caught burning CPU!; EXC_RESOURCE supressed due to audio playback
22/12/2015 3:34:04.828 p.m. lsd[296]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 3:44:07.469 p.m. sudo[45308]:     MyUsername : TTY=ttys000 ; PWD=/private/var/db ; USER=root ; COMMAND=/bin/mkdir lsd
22/12/2015 3:49:09.183 p.m. lsd[306]: LaunchServices: Scheme mapping file does not exist, creating file.
22/12/2015 3:49:09.400 p.m. lsd[306]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 3:49:09.407 p.m. lsd[306]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 3:49:39.366 p.m. lsd[306]: LaunchServices: Currently 0 installed placeholders: ()
22/12/2015 3:49:50.000 p.m. kernel[0]: Sandbox: AssetCacheLocato(535) deny(1) mach-lookup com.apple.lsd.mapdb
22/12/2015 3:49:50.802 p.m. AssetCacheLocatorService[535]: LaunchServices: disconnect event received for service com.apple.lsd.mapdb
22/12/2015 3:49:51.000 p.m. kernel[0]: Sandbox: AssetCacheLocato(535) deny(1) mach-lookup com.apple.lsd.modifydb
22/12/2015 3:49:51.002 p.m. AssetCacheLocatorService[535]: LaunchServices: disconnect event received for service com.apple.lsd.modifydb
22/12/2015 4:31:57.573 p.m. lsd[306]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 4:34:34.075 p.m. lsd[306]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 4:34:34.290 p.m. lsd[306]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
22/12/2015 4:37:20.000 p.m. kernel[0]: process lsd[220] thread 26462 caught burning CPU!; EXC_RESOURCE supressed due to audio playback

As for this message:

22/12/2015 3:44:07.469 p.m. sudo[45308]:     MyUsername : TTY=ttys000 ; PWD=/private/var/db ; USER=root ; COMMAND=/bin/mkdir lsd

I did try making a dir called /private/var/db/lsd as root.

Also, my CPU usage seems to be very intermittent (which it never did before).

Intermittent CPU Usage

Looking into /usr/libexec, I found lsd and noticed that it has been created on 17 Sep 2015. Why is it so new (along with everything else in that directory)?

21

lsd in OS X is indeed the LaunchServiceDaemon. launchd is a launch daemon manager! It provides probably the same function as in iOS. According to Apple it provides

support for launching apps and matching document types to apps. As a result, the keys recognized by Launch Services allow you to specify the desired execution environment for your bundled code.

lsd was apparently introduced in OS X 10.11 El Capitan because I can't find it in older systems. The latest version (included in 10.11.2) should have the mod date Dec 3, 2015.


To troubleshoot

  • the "LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist" problem check this post:

    Probably not the best way, but I seem to have fixed/suppressed that error message. This is what I did:

    cd /private/var/db

    lsd directory did not exist

    mkdir lsd

    Still no joy

    chmod -R 777 /private/var/db/lsd
    (i know, i just opened up my gibson to being hacked)
    touch /private/var/db/lsd/com.apple.lsdschemes.plist

    Seemed to go away after that. Willing to bet a disk repair/permissions check will break it again, but have not tried. If I cat that file the following is the content:

    bplist00?

  • the 100 % CPU-usage: /usr/libexec/lsd using 100% of CPU

  • Ah, thanks for clearing that up (and I'm still on 10.11.1) I still have no idea why it need so much CPU power though... – CraftedCart Dec 22 '15 at 19:01
  • After a lot of digging, I think I may have found the app causing the 100% problem. Robocraft. Lets see if updating it works, and if not, I'll have to uninstall it. – CraftedCart Dec 22 '15 at 19:57
  • I have a properly working lsd and no directory /private/var/db/lsd existing - perhaps that's a red herring from systems that are older than 10.11 ? It still does a lot of disk writing for reasons I haven't been able to identify from time to time - perhaps that translates into a lot of CPU for systems with spinning hard drives and/or large filesystems with significant data stores? – bmike Feb 25 '16 at 14:01
5

It seems that lsd gets stuck on _LSCreateRegistrationData for a certain app. If you're having the same issue, follow the guide below.

  1. Open activity monitor and search for lsd
  2. Get the PID of the lsd owned by the root user
  3. Open the terminal
  4. Enter sudo sample PID-HERE (Of course, replacing PID-HERE with the PID you got in step 2)
  5. If you're having the same issue, there should be something about _LSCreateRegistrationData in the call graph (near the top of the whole output)
  6. Enter sudo lsof -p PID-HERE

You should be able to recognise an app package within that output. Try deleting or updating it and see if it solves the issue

2

I too discovered that I had problems with lsd. It seems that it is enough to create the directory and touch the file, there was (at least in my case) no need to fiddle with the permissions as described by klanomath.

In my case, it did stop the lsd errors, but I was still seeing frequent errors like these:

Feb 25 14:06:07 iMac system_profiler[259]: LaunchServices: Database mapping failed with result -10822, retrying

Feb 25 14:06:07 iMac system_profiler[259]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database

Feb 25 14:06:07 iMac com.apple.xpc.launchd[1] (com.nomachine.nxserver): Service only ran for 7 seconds. Pushing respawn out by 3 seconds.

I had an installation of NoMachine and deleting that (since I only ever really did use the nxplayer anyway), that error stopped as well.

1

What worked for me was "sudo xcrun xcscontrol --reset" cpu went from pulsing 95% down to about 4%.

  • Throws an error message: xcrun: error: unable to find utility "xcscontrol", not a developer tool or in PATH – user26732 Apr 8 '17 at 13:25
0

It's part of LaunchServices. You can extract some info (strings) out of it with the strings command:

hostname:~ username$ strings /usr/libexec/lsd
@(#)PROGRAM:lsd  PROJECT:LaunchServices-
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
</dict>
</plist>

Other than that, it seems your problem is also being discussed here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .