Why does launchd keep killing processes

8,947
com.apple.launchd[1] (com.apple.audio.ComponentHelper[8564]): Exited: Killed: 9

This is launchd reporting that a process it had started (number 8564, named "com.apple.audio.ComponentHelper") exited unexpectedly because it was sent signal 9 (SIGKILL).

The cause is actually indicated by the subsequent (rather than the previous) line in your log snippet.

kernel[0]: memorystatus_thread: idle exiting pid 8564 [com.apple.audio.]

(It seems syslog just processed and/or flushed the lines out of order.) The killer is the kernel itself. According to this (see second paragraph under "MemoryStatus and Jetsam" heading), in OS X, the memorystatus thread of the kernel reacts to free memory falling below a certain threshold by killing processes "marked for idle exit".

So, the kernel was killing processes in a last ditch effort to avoid running out of free RAM. I would be skeptical too with that much RAM, but that's what those log entries seem to indicate. Note that "inactive" memory is not free or "no longer necessary". Inactive memory is simply the least recently accessed of the memory currently allocated. It's not available for reuse unless and until its contents have been swapped to disk. (I found this explanation very helpful.) Was your swap file full? Alternatively, I wonder if this could happen if the pager merely couldn't write to disk quickly enough to keep up with a sudden burst of allocation (and actual writing).

Share:
8,947

Related videos on Youtube

Elliott B
Author by

Elliott B

More badges!

Updated on September 18, 2022

Comments

  • Elliott B
    Elliott B over 1 year

    I've noticed my system.log is getting flooded with messages like this:

    May  5 12:56:08 macpro com.apple.launchd[1] (com.apple.qtkittrustedmoviesservice[8568]): Exited: Killed: 9
    May  5 12:56:08 macpro kernel[0]: memorystatus_thread: idle exiting pid 8568 [qtkittrustedmovi]
    May  5 12:56:11 macpro com.apple.launchd[1] (com.apple.audio.ComponentHelper[8564]): Exited: Killed: 9
    May  5 12:56:11 macpro kernel[0]: memorystatus_thread: idle exiting pid 8564 [com.apple.audio.]
    May  5 12:56:12 macpro com.apple.launchd[1] (com.apple.sleepservicesd[8572]): Exited: Killed: 9
    May  5 12:56:12 macpro kernel[0]: memorystatus_thread: idle exiting pid 8572 [SleepServicesD]
    May  5 12:56:12 macpro com.apple.launchd[1] (com.apple.audio.SandboxHelper[8563]): Exited: Killed: 9
    May  5 12:56:12 macpro kernel[0]: memorystatus_thread: idle exiting pid 8563 [com.apple.audio.]
    

    I understand launchd might kill processes when RAM is full, but I think I have plenty of RAM (32GB). I'll usually have a very small amount of free memory, but there is always over 15GB "inactive" memory when I check Activity Monitor. This isn't really causing any problem, but I'd like to declutter my log file so I can see real problems more easily.

    • user3540003
      user3540003 about 11 years
      That looks like a report of exit status (that the process was killed), not necessarily that launchd itself killed it.
    • Elliott B
      Elliott B about 11 years
      Not sure I agree... but if that's the case, do you know how to see what's killing the processes?
  • Elliott B
    Elliott B over 9 years
    I've never thought about a swap file limit on OS X, but mine is never more than 50MB.