I have noticed big peaks of activity of processes:
- mdworker (multiple processes)
The console loops over two messages from mds:
LaunchServices: Database mapping failed with result -10813, retries = X
LaunchServices: storeXPCRepresentation or url (null) was nil -10813, retrying
I tried to reset Spotlight via mdutil, following https://apple.stackexchange.com/a/191503/204565. The first step kills the processes using the CPU, but after following all the steps, the problem came back (not only the CPU usage which would seem normal when reindexing the system, but the errors in the console failure messages too).
I saw https://discussions.apple.com/thread/8158217 but unlike him, my Time Machine saves seem to work.
My computer is a MacBook Pro mid-2012. I changed the HDD to a Samsung 850 EVO some time ago (more than 3 years).
I also noticed that the modification date of some folders doesn't make any sense.
At some point, I noticed failures of lsd:
*** CSStore corruption detected (2). ffff6d74 54 4ce74318 3
I looked at the console during a backup and backupd shows the same messages as mds (1. and 2.)
sudo mdutil -a -i off, which solves the CPU usage problem, symptomsd logs 1. and 2..