com.apple.xpc.launchd & com.apple.mdworker.bundles pollute logs with errors

I made a clean install of Yosemite to MacBook Pro (13-inch, Early 2011), and restored documents and apps from TM backup, no problems so far, but I observe following repeating messages in system log and it concerns me, because apparently, launchd is trying to do something related to spotlight, but fails and this happens every 10 seconds.. I see no suspicious activity apart from too much CPU time spent on mds and mds_stores (but I guess it's due to fresh install, hence Spotlight needs to index everything...).


Any ideas where to dig?


21/10/2557 BE 2:11:43.811 PM com.apple.xpc.launchd[1]: (com.apple.mdworker.bundles[2654]) Could not find uid associated with service: 0: Undefined error: 0 502

21/10/2557 BE 2:11:43.835 PM com.apple.xpc.launchd[1]: (com.apple.mdworker.bundles) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

21/10/2557 BE 2:11:53.838 PM com.apple.xpc.launchd[1]: (com.apple.mdworker.bundles[2655]) Could not find uid associated with service: 0: Undefined error: 0 502

21/10/2557 BE 2:11:53.838 PM com.apple.xpc.launchd[1]: (com.apple.mdworker.bundles) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

[goes forever]

Posted on Oct 21, 2014 12:44 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 27, 2014 3:58 PM

I see, Dustmoo.. I thought the issue was caused by having that account with UID 502 in my main partition. So I dug it a bit more using your example. I actually couldn't find any mdworkers directory in /var. So I looked for the files owned by UID 502 (but it could be any other UID. One must check the last number in the error message, the one I underlined in my first post and use it instead of 502 in the following code):


cd /var

sudo find . -user 502 -exec ls -ld {} \;


This has been the output:


drwx------ 5 michele _spotlight 170 Oct 16 19:10 ./folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.Spotlight/502

drwx------ 2 michele _spotlight 68 Oct 16 19:10 ./folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.Spotlight/502/0

drwx------ 2 michele _spotlight 68 Oct 16 19:10 ./folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.Spotlight/502/C

drwx------ 2 michele _spotlight 68 Oct 16 19:10 ./folders/zz/zyxvpxvq6csfxvn_n0000000000000/0/com.apple.Spotlight/502/T


(michele is my username for UID 502)


So it was still in the /var/folder directory, but something related to or created by Spotlight one week ago. Not sure how it went there, since this was a fresh installation in that partition. It really looks like junk to me.


Just in case I removed the incriminated directory:


cd /private/var/folders/zz/

# I did some directory listing and other things just to check

sudo rm -r zyxvpxvq6csfxvn_n0000000000000

And rebooted. I can't really say if it changed anything because I had already made the new account, but it does look like the culprit.

63 replies

Apr 3, 2015 2:48 PM in response to Michelasso

Thanks for the hint; deleting (not chown’ing) 502-owned folders/files in the /var subdirectories definitively helped (after a reboot, of course). In addition I found a 502-owned app bundle in /Applications that I chown’ed to me (501).


Though, no idea what is spawning these 502 attributions. A user 502 didn’t exist on my system.

Oct 31, 2014 11:10 AM in response to Andras Dombovari

Were the files you found on the boot drive?


All the 504 references I found were on other drives, specifically a Mountain Lion boot drive (at the time 504 was a real user account) and backups of that drive. I'm not at home to look, but from memory, the files were in the user folder, not applications.


Which leads me to something I haven't tested yet, unmounting those drives or excluding from Spotlight search. Something to play with while handing out Halloween candy.

Nov 5, 2014 5:33 AM in response to wsrphoto

After some thought I did a few things which after one day so far the Mac Pro has not had the error messages every 10 seconds, not even once. First, I removed the files as people have noted in previous posts. Second, I the reinstalled OS-X 10.10 using the command-R option which took about 3 hours and only changed a few settings (Notification) while keeping everything else unchanged. This resolved the issue after booting in safe mode of doubling the total used memory in the initial state after rebooting where it's back to normal. Third, I effectively shut down Spotlight using the privacy menu to exclude the entire Mac from its search. Since I don't use Spotlight, nothing is hurt if it doesn't do anything and all the other apps, Finder, Time Machine, etc., all have their own search tools. So far so good, the problem hasn't returned.

Oct 29, 2014 10:45 AM in response to William Paplham

William, you wrote that you had the issue with UID 1104188992 as well? Did you check for it? I meant, that looks like all but an usual UID. I believe something else is cooking under the hood. Like some pieces of old applications left running.


I'd suggest to search for files own buy both UIDs. Then if you still have the issue you may try downloading "etreCheck" (just google it) and do a scan. It reports a few things that may be wrong in the installation.

Oct 29, 2014 12:29 PM in response to Cyril Kay

I ran the command (thanks). I found 504 again in the directories discussed in this forum. I also had several thousand hits, all in backups.


594 appears to be an account for my son.


I had done a clean install of mavericks prior to installing yosemite. I did not migrate accounts (I was trying to clean detritus, possibly from consecutive upgrades/migrations going all the way back to a Centris 650). I have the only account on the computer, all other references are in backup files or on other hard drives with older versions of the operating system.


The 1104188992 id was there as well. I deleted both folders.


Also folders for:

89 (spotlight)

235 (assetcache)


I found this command online


dscl . -list /Users UniqueID


Useful as it lists all ids on the computer. 504 and 1104188992 were not on the list.


Posting before reboot so I still had info handy. Hopefully this works.

Oct 30, 2014 1:07 PM in response to Cyril Kay

I have this similar issue, with the 502 UID. This user is non existent on my system.

I deleted the files suggested in the /var folder, but the warnings are still happening.

Running the search suggested by Cyril resulted in a long list of files elsewhere on the drive.

sudo find / -user 504 -exec ls -ld {} \;


I have Applications owned by this user, tons of files in /Library, etc.

Which probably explains why this message appears in the Console over and over. Whenever mdworker finds one of them, to writes this message into the Console.


I wish there was a way to run "lsof" only in the newly spawned processes....

Should we maybe fix / set the user of these files to something else?

Something that exists in the system?

Oct 31, 2014 7:45 PM in response to William Paplham

Interesting behavior on booting back to my main system drive. I wasn't getting mdworker errors related to "phantom" ids.


I manually started Time Machine to see if I could trigger errors. It appears that running on another boot drive for a day changed enough files that Time Machine could not used it's cached scans. From logs:

Oct 31 20:31:27 Mac-Pro-2.local com.apple.backupd[929]: Starting manual backup

Oct 31 20:31:28 Mac-Pro-2.local com.apple.backupd[929]: Backing up to /dev/disk11s2: /Volumes/DroboTM/Backups.backupdb

Oct 31 20:31:32 Mac-Pro-2.local com.apple.backupd[929]: Event store UUIDs don't match for volume: Hitachi 2TB

Oct 31 20:31:32 WMac-Pro-2.local com.apple.backupd[929]: Event store UUIDs don't match for volume: Seagate 4TB

Oct 31 20:31:32 Mac-Pro-2.local com.apple.backupd[929]: Event store UUIDs don't match for volume: WD Black 1000

Oct 31 20:31:32 Mac-Pro-2.local com.apple.backupd[929]: Forcing deep traversal on source: "SanDisk240" (device: /dev/disk0s2 mount: '/' fsUUID: 31D86B38-3F77-30C7-B2AC-8E0274C41535 eventDBUUID: 235CDDDF-EDF3-40C4-9C10-2B11DD9CBEE8)

Oct 31 20:31:48 Mac-Pro-2.local com.apple.backupd[929]: Deep event scan at path:/Volumes/Hitachi 2TB reason:must scan subdirs|new event db|

Oct 31 20:31:48 Mac-Pro-2.local com.apple.backupd[929]: Unable to use cached scan; fsevent uuid mismatch

Oct 31 20:31:48 Mac-Pro-2.local com.apple.backupd[929]: Running event scan

Oct 31 20:32:29 Mac-Pro-2.local com.apple.backupd[929]: Finished scan

Oct 31 20:32:29 Mac-Pro-2.local com.apple.backupd[929]: Saved event cache at /Volumes/DroboTM/Backups.backupdb/William’s Mac Pro (2)/2014-10-31-203132.inProgress/EC26B84B-A5EA-4C88-829E-27733E985103/.CF113335 -FFC3-394A-B363-1A0B068CB412.eventdb

Oct 31 20:32:29 Mac-Pro-2.local com.apple.backupd[929]: Not using file event preflight for Hitachi 2TB

Oct 31 20:32:33 Mac-Pro-2.local com.apple.backupd[929]: Deep event scan at path:/Volumes/Seagate 4TB reason:must scan subdirs|new event db|

Oct 31 20:32:33 Mac-Pro-2.local com.apple.backupd[929]: Unable to use cached scan; fsevent uuid mismatch

Oct 31 20:32:33 Mac-Pro-2.local com.apple.backupd[929]: Running event scan

Oct 31 20:32:36 Mac-Pro-2.local com.apple.backupd[929]: Finished scan

Oct 31 20:32:36 Mac-Pro-2.local com.apple.backupd[929]: Saved event cache at /Volumes/DroboTM/Backups.backupdb/William’s Mac Pro (2)/2014-10-31-203132.inProgress/EC26B84B-A5EA-4C88-829E-27733E985103/.0DC0DAA8 -2F46-36FD-9A05-638EF4172DD7.eventdb


This was repeated for all backed up drives.


I still have some time to go (somehow it found 46 GB of material that needed backup), but hopefully this cleaned everything out.


The one error I am getting consistently is

Oct 31 21:51:48 Mac-Pro-2.local mdworker[1217]: code validation failed in the process of getting signing information: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"

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.

com.apple.xpc.launchd & com.apple.mdworker.bundles pollute logs with errors

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