"kernel[0]: process X thread Y caught burning CPU" - need to disable this!
Does anyone know of a means to disable this check, even at my own risk?
This self-protective behavior is damaging when a user is intentionally running a CPU-intensive task. Just today, I had a virtual machine's disk (virtualbox .vdi) corrupt when OSX terminated the process that was merging a snapshot. I'm having to restore this (100gb) file from a backup, and lost nearly an hour's worth of work.
I would expect the user to be prompted before processes (childen of a login session at least) are terminated because of such a check. Unfortunately that does not seem to be the case. Research on this hasn't gone anywhere as far as the functionality itself, only troubleshooting processes that were misbehaving. In this context, nothing was misbehaving - I was running two VMs while merging disk snapshots of a third. Very CPU intensive and long running, but entirely wholesome.
I am assuming that a spindump effectively terminates a process (analogous to SIGABRT) - but I am unfamiliar with it. Either it does do so, or it triggered a fault in the process, as virtualbox reported unexpected termination and the files on disk that were being process were left mangled.
Here's what was listed in the system log when this occurred:
Aug 28 16:32:07 {snip} kernel[0]: process VirtualBox[2406] thread 140121 caught burning CPU! It used more than 50% CPU (Actual recent usage: 53%) over 180 seconds. thread lifetime cpu usage 93.311191 seconds, (16.523197 user, 76.787994 system) ledger info: balance: 90094490199 credit: 92576340798 debit: 2481850599 limit: 90000000000 (50%) period: 180000000000 time since last refill (ns): 168624025435
Aug 28 16:32:07 {snip} com.apple.xpc.launchd[1] (com.apple.ReportCrash.Root[2498]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash.DirectoryService
Aug 28 16:32:07 {snip} ReportCrash[2498]: Invoking spindump for pid=2406 thread=140121 percent_cpu=53 duration=170 because of excessive cpu utilization
Aug 28 16:32:10 {snip} spindump[558]: Saved cpu_resource.diag report for VirtualBox version 5.1.4 (5.1.4) to /Library/Logs/DiagnosticReports/VirtualBox_2016-08-28-163210_{snip}.cpu_resourc e.diag
Aug 28 16:32:19 {snip} kernel[0]: VirtualBoxVM[2499] triggered unnest of range 0x7fff8a000000->0x7fff8a200000 of DYLD shared region in VM map 0xcc582fc6d848ca3. While not abnormal for debuggers, this increases system memory footprint until the target exits.
MacBook Pro, OS X El Capitan (10.11.6)