What is com.apple.xpc.launchd?
What is com.apple.xpc.launchd?
MacBook, macOS 10.13
What is com.apple.xpc.launchd?
MacBook, macOS 10.13
edfromhillsboro wrote:
For example, what does 'xpc' mean? What is the syntax? Where does it come from? Does it only work with 'launchd', or is it a more general feature?
That's a good question. I don't think anyone has ever asked it before. I've never even thought about it either.
Apparently, it is "IPC" for "MacOS X", therefore "X-IPC" or just "XPC". Of course, Apple doesn't even use the "X" anymore. Funny how these things get lost over the years.
IPC is for Inter-Process Communication. It describes one process (an app, more or less) communicating with another one. Here is an old Apple WWDC developer video describing it back in the day: https://developer.apple.com/videos/play/wwdc2011/206/
The syntax is complicated. The whole idea behind it is that it is an easy to use API (Application Programming Interface) that doesn't require the programmer to know the low-level details of the syntax.
It is a general feature available to any macOS app and used throughout Apple's iOS and macOS operating systems. It is fairly resource-intensive so 3rd party developers can use it on macOS, but not iOS. It doesn't have anything in particular to do with launchd other than being a low-level interface that works closely with launchd. The launchd architecture itself is simply a system for "launch"-ing processes. The "d" stands for "daemon", which is a low-level system process that is always running in the background to handle low-level tasks. Launchd works together with XPC to allow an app to break off a piece of itself to perform some specific task. If that task fails, or has a security issue, or locks up, etc. it will not affect the parent process, at least in theory.
Below is a typical snapshot from Console.
I don't recommend running Console at all. It will really slow down your computer. Plus, the messages it prints have little to no value to anyone. In theory, it is designed for programmers to analyze log messages. But it got out of hand a few years ago. Some "clever" folks at Apple thought it would be nice to redesign the system logging architecture so it could handle an infinite amount of debugging messages. Then, since there was no performance impact from logging messages, every Apple app on the system (and there are hundreds) started logging information at a mind-bogglingly low level of minutiae. It can easily log hundreds of messages a second. Apple took a useful tool and architecture and effectively destroyed it.
These days, I get very suspicious when I see people reference the Console app. I have seen more than one person completely lose touch with reality when looking at the Console. I am not exaggerating on this. It can be like the scrolling text in the matrix. But instead of a cool animation displayed in a film for 10 seconds, it scrolls on and on, for minute, hours, days, without ever once stopping. Some just people can't handle that. They can't conceive of that being normal, of that happening on a billion Apple devices all over the world, all day long, every day, without ever ending. But that's the way it is. All noise, zero signal.
Great advice!
Carbon Copy Cloner does just what it says. It can be used incrementally, but its main benefit is the ability to produce a bit-by-bit bootable copy of the entire system. His advice for the fastest behavior is to use a direct connection and an SSD. As you point out, any combination of wi-fi and NAS slows things down and adds overhead to the process. Also, however, as you point out, it Time Machine does seem to be working in the background. I will check periodically to confirm the backups have taken place and verify I can recover data if the need arises. Other than that I'll just get back to work and let the OS take care of the heavy lifting. Thanks for the deeper prespective.
I don't want to appear ungrateful, or obnoxious, but this is really frustrating.
I have been searching high and low for some background information or general explanation of com.apple.xpc.launchd for days, with no luck. The link provided above was from 2015, and was tagged with 79 other people indicating they had the same problem.
The sum total of the answer says, "It is posting log information so developers can update their apps.
The spindump references indicate something is crashing."
With all due respect, that answer is terse to the point of being useless.
For example, what does 'xpc' mean? What is the syntax? Where does it come from? Does it only work with 'launchd', or is it a more general feature?
Am I missing something here?
Are there any links I can look at?
Apple developer documentation?
Console help does not say anything about it.
I have downloaded both etrecheckPro and Malwarebytes. I have CleanMyMac. No identified problems with malware.
I have T2M2 from EclecticLight, along with other EL utilities, and I have read most of his (very useful) blogs.
Below is a typical snapshot from Console. There will be periods of quiet, and turning off Time Machine seems to help. TM is running alternatively over wifi on two rather old WD MyBookLive NAS drives that appear to be fully functional. I realize wi-fi/NAS will be slow, but the problem(s) clearly appear to be with TM itself and/or Spotlight.
Despite minimal activity on Mac, TM requires 10-15 minutes (or more) of preparation. It then reports, say, 2.3 GB to be backed up and starts the process. According to T2M2 it backs up 50, 60 Mb or so, and then stalls for 10-15 minutes.
At this moment it is showing 84.0 Mb of 1.6 GB, with an estimated time of 1 hour remaining.
At times it will show backup speeds up to 6 MB/s, suggesting the network is OK, at least up to these speeds. As I write this, T2M2 the progress is up to 128 Mb with a backup rate of 0.15 Mb/sec, and now the time remaining shows 2 hours instead of 1 hour.
In the meantime, Console indicates several hundred mdworker.shared --> SGKILL instances, as many as five per second.
I was just getting ready to type "128 MB and three hours, but before I had a chance it was up to four hours.
My previous message was too long so I added more text. Not sure how that works and I couldn't confirm.
Also not sure if etrecheck is appended correctly.
/Users/edward****/Desktop/Edward’s MacBook Pro 2021-01-27.etrecheck
Jan 27 14:12:26 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.07000000-0300-0000-0000-000000000000[2571]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:12:57 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.05000000-0700-0000-0000-000000000000[2577]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:12:59 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.09000000-0100-0000-0000-000000000000[2568]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:00 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.10000000-0700-0000-0000-000000000000[2526]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:00 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.08000000-0500-0000-0000-000000000000[2503]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:03 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.02000000-0400-0000-0000-000000000000[2570]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:04 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0B000000-0100-0000-0000-000000000000[2573]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:05 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0600-0000-0000-000000000000[2574]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:05 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0C000000-0400-0000-0000-000000000000[2578]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:08 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.01000000-0500-0000-0000-000000000000[2576]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:11 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0D000000-0600-0000-0000-000000000000[2569]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:16 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.03000000-0600-0000-0000-000000000000[2575]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:17 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0A000000-0300-0000-0000-000000000000[2552]): Service exited due to SIGKILL | sent by mds[106]
Jan 27 14:13:17 Edwards-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.07000000-0400-0000-0000-000000000000[2579]): Service exited due to SIGKILL | sent by mds[106]
If I did this correctly, here is the etrecheck that I ran while typing this message, and while TM was running.
/Users/edward****/Desktop/Edward’s MacBook Pro 2021-01-27.etrecheck
THANK YOU to all the volunteers that provide expert advice here! This problem is driving me crazy!
EJG
[Personal Information Edited by Moderator]
Thank you very much for the reply!
I meant to applaud etrecheck in my previous message. Phenomenal! I can't (yet) interpret it all, but just browsing through it, it is a great confidence builder.
I particularly appreciate the comments about the potential paranoia risk with Console. I've been on the Mac for decades, with moderate Terminal experience and some Python background, but very little this deep into MacOS. (Which is perfectly OK with me, as long as everything is working.) I'll probably spend a little more time browsing Console (for awhile), but I'll keep your words in mind and won't get too hung up on it.
I do find it interesting to see what, and how much background logging takes place. Unbelievable, actually. My wife and I watch Forensic Files all the time and I tell her she doesn't have anything to worry about with me bumping her off. The science is too good when they can solve a murder with the DNA from a single hair follicle, or tooth pulp. I'm coming to realize the same level of information a forensic computer expert can bring to the surface if they know what they are doing. It looks like they could not only identify one's search history, they could almost sort out the keystrokes to the nearest msec!
You actually *have* answered my initial question, but the reason I was trying to sort it out was because of its potential impact on Time Machine and Spotlight.
If you would be so kind, would you take a look at the 'usual suspects' and see if you can find any clues regarding Time Machine? I know a lot of people have had similar problems.
I also use Carbon Copy Cloner and I'm inclined to follow his advice with a direct Thunderbolt connection to an external SSD device.
Thanks again, and any light you might shed on Time Machine would be appreciated. I'd certainly like to use it for redundancy.
EJG
edfromhillsboro wrote:
I do find it interesting to see what, and how much background logging takes place. Unbelievable, actually. My wife and I watch Forensic Files all the time and I tell her she doesn't have anything to worry about with me bumping her off. The science is too good when they can solve a murder with the DNA from a single hair follicle, or tooth pulp. I'm coming to realize the same level of information a forensic computer expert can bring to the surface if they know what they are doing. It looks like they could not only identify one's search history, they could almost sort out the keystrokes to the nearest msec!
Given the current state of society, I should point out that you are talking about a TV show. It isn't true.
As far as logging goes, Apple embeds privacy deep into the system. The logging system is designed to monitor the health of the computer and operating system, not to track your keystrokes. Anything that might be considered personal information is stripped from the log files by default.
I know a lot of people have had similar problems.
What problems? You mentioned a few utility apps you've been using to look at system behaviour. But is anything broken? Is Time Machine not working properly? If so, the most likely cause it one of those utility apps. The operating system is designed to work out of the box. The first time you turned it on was the last time it ran optimally. Every system modification you add is going to slow it down and cause problems. Sometimes, those system modifications might provide some tangible benefit to your experience that will outweigh their cost. But there is always a cost.
Generally speaking, what you are seeing is a quantum effect. Time Machine is a backup system. The idea is right there in the name "Time Machine". People don't think about that enough. Years ago, people used to say something along the lines of "I wish I had a time machine! Then I could have made a backup of the system before I knew I was going to need it. Now everything is gone." So, Apple made a Time Machine. It runs in the background, making incremental backups as often as once an hour. It uses a unique design for efficient storage and straightforward access to backups. When the day comes that you need a backup, with Time Machine, you will find that your backup is always there, waiting for that day that you needed it. Time Machine works best the less you mess with it. In any backup system, the human is always the weakest link. Any alteration of Time Machine's behaviour will weaken it and make it less reliable. As you might expect, utilities designed to do just that are very popular.
The key point here is that Time Machine is designed to run in the background, unobserved and unnoticed. If you notice the backup, you are more likely to start screwing around with it, thereby weakening it. So Apple has designed it to avoid interfering with your normal use of the system. It doesn't always run every hour. If you are actively using your computer, it might not run. If your computer is sleeping, it might wake up and make a backup.
Now combine this fact with that rhinoceros of an app called Console. Just running Console is a huge performance hit on your computer. It will make the fans scream. In Big Sur, Apple even added a "start streaming" button so developers could have Console running but chose when to power it up and then shut it down right away after only a few seconds. That makes it easier to sort through the 20,000-odd entries that will be generated in those few seconds.
So, if you are using Console to inspect Time Machine, you are changing the behaviour of Time Machine. It will run slower, and perhaps even pause altogether, for no other reason than the fact that you are looking at it. Plus, you appear to be using a NAS. Those are convenient because you don't have to plug in an external drive. They can also be hidden away instead of having an ugly box plugged into your Mac. But they aren't fast even under the best conditions. You even said you are running over WiFi. That's not even the best conditions. Your Time Machine backup speed is going to be dependent on whatever background radiation is currently being broadcast from various devices around your home, your neighbours houses, passing cars, aircraft, the sun, etc.
Once again I've exceeded the 5000 character limit...
I also use Carbon Copy Cloner and I'm inclined to follow his advice with a direct Thunderbolt connection to an external SSD device.
I don't use that app and I don't know what that advice is pertaining to. I know that the app is popular among people with limited knowledge of statistics, engineering, or the macOS operating system. Total disk failures are rare. They do happen, hence the need for backups. But for the vast majority of people, the risk of a total disk failure is very low. Therefore, they should be willing to pay a fairly high cost (as a factor of time) for recovery. If you only experience a total failure once every decade or so, spending two hours to boot into recovery, reinstall the OS, and then migrate from backup isn't that great of a cost. But people misjudge those risks and costs and think they need a magical "bootable backup" so they can restore and get back to work in seconds. To be honest, Facebook isn't going to miss their absence during their two hour Time Machine restore. People who truly do need zero downtime use RAIDs and/or completely redundant systems.
Last but not least, it is important to note that Time Machine is designed to restore from failure, or move to a new device. It should never be used to duplicate or "copy" an installation. Apple sells an entire ecosystem of devices. They are all designed to seamlessly work together. One of the ways that works is that each device is unique. When you make a copy of a hard drive, or even a user account, some of those multi-device features and iCloud will be broken.
Thanks again, and any light you might shed on Time Machine would be appreciated. I'd certainly like to use it for redundancy.
There are multiple meanings for redundancy.
What is com.apple.xpc.launchd?