Sample Header Ad - 728x90

How to debug a freezing dtrace on Ventura

5 votes
0 answers
513 views
I'm trying to use dtrace on a very new system: Ventura 13.2.1, MBP M2. Any attempt to run it ends up with the terminal and most of macos system gui freezing. (beachballing, I can switch the apps, but not necessarily interact with them, no new process can start) I can't ctrl+c from dtrace, or restart in a nice way. Only long power-button works to power off. No traces are left in the logs as far as I can tell, there's nothing in spin reports, nothing in crash reports. There's a report from a full restart, but it only mentions:
"16673" : {
  "timesThrottled":0,
  "pageIns":939,
  "waitInfo":["thread 154195: mach_msg receive on port set 0x455bc6f06e98c60b"],
  "timesDidThrottle":0,
  "procname":"dtrace",
  "copyOnWriteFaults":79,
  "threadById":{"154192":
    {
      "systemTime":33.911615916000002,
      "system_usec":33911615,
      "kernelFrames":[[1,1742012],[1,1742012],[1,1778052],[1,2167476],[1,2076660],[1,2079988],[1,2073412],[1,2125476],[1,2656208],[1,2596516],[1,5500264],[1,5931364],[1,6995680],[1,1747532],[1,30596],[2,0]],
      "id":154192,
      "basePriority":31,
      "user_usec":91864,
      "dispatch_queue_label":"com.apple.main-thread",
      "schedPriority":54,
      "userFrames":[[12,3745116],[12,929556476],[12,929541340],[458,15648],[12,671312],[2,0]]
and the kernel part:
"154193":{
  "userTime":0,
  "systemTime":8.208e-06,
  "name":"dtrace_fasttrap_cleanup_thread",
  "id":154193,
  "basePriority":46,
  "user_usec":0,
  "system_usec":8,
  "schedPriority":46,
  "kernelFrames":[[1,582920],[1,576644],[1,482176],[1,5791432],[1,2171304],[1,52184]],
  "state":["TH_WAIT","TH_UNINT"],
  "waitEvent":[1,2171180]
}
Which honestly doesn't provide actionable info. The freeze happens every single time, even from running:
dtrace -n 'syscall::open:entry { printf("open\n"); }'
Asked by viraptor (191 rep)
Mar 16, 2023, 02:09 AM
Last activity: Apr 20, 2023, 07:17 PM