dtrace freezes macOS Sequoia 15.3.1 on M2

Hi gurus,

Recently I tried to use dtrace on macOS to do some performance analysis, and found that dtrace reliably freezes the whole system.

I have disabled SIP (recovery mode, csrutil disable), when I run sudo filebyproc.d (or any other dtrace command), the whole system just freezes, only hard restart (press power button) can restore the system.

I saw someone answered in https://developer.apple.com/forums/thread/735939 mentioning restart the system without sleep can work around this issue, but in my case, it doesn't work, even after fresh restart, it's the same.

Is this a known issue? Any way around this issue?

My system: macOS Sequoia 15.3.1 on M2.

Regards, jz

Answered by DTS Engineer in 832933022

I tried this in a macOS 15.3.2 VM and it didn’t see the crash:

% sw_vers
ProductName: macOS
ProductVersion: 15.3.2
BuildVersion: 24D81
% csrutil status
System Integrity Protection status: disabled.
% sudo filebyproc.d
dtrace: script '/usr/bin/filebyproc.d' matched 8 probes
CPU ID FUNCTION:NAME
2 964 open_nocancel:entry adprivacyd /usr/lib/log/

I don’t have time today to try it on real hardware.

I’m not aware of any systematic problem with DTrace on recent systems [1]. My advice would be for you to try it on a ‘clean’ system, just to make sure there’s nothing specific about your Mac that’s triggering the problems. And if it continues to fail, file a bug about that.

If you do file a bug, please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Other than the fact that you have to disable SIP )-:

I tried this in a macOS 15.3.2 VM and it didn’t see the crash:

% sw_vers
ProductName: macOS
ProductVersion: 15.3.2
BuildVersion: 24D81
% csrutil status
System Integrity Protection status: disabled.
% sudo filebyproc.d
dtrace: script '/usr/bin/filebyproc.d' matched 8 probes
CPU ID FUNCTION:NAME
2 964 open_nocancel:entry adprivacyd /usr/lib/log/

I don’t have time today to try it on real hardware.

I’m not aware of any systematic problem with DTrace on recent systems [1]. My advice would be for you to try it on a ‘clean’ system, just to make sure there’s nothing specific about your Mac that’s triggering the problems. And if it continues to fail, file a bug about that.

If you do file a bug, please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Other than the fact that you have to disable SIP )-:

@DTS Engineer Thanks a lot for your information, could you help try on a physical M2 pro MacBook Pro machine? Here on my machine, the problem is reliably reproducible.

I have filed a bug via Feedback Assistant: FB17159064 (dtrace freezes macOS Sequoia 15.3.1 on M2 Pro (MacBook Pro))

and have sysdiagnose and system info attached. If you need any more information, please let me know~

PS: I also tried on a M3 machine, dtrace works correctly, so I'm guessing this has to do something with M2 specifically.

Same problem (or similar) on an M2 Pro here (Sequoia 15.4). Interestingly, the system doesn't freeze immediately; after I start dtrace I can switch windows, interact some with the browser, type things. But gradually each piece of the system freezes up and won't respond to anything. It feels like it's anytime something tries to fork a new process, it freezes. The clearest example is that typing a command in iTerm and hitting enter causes iTerm to freeze. Trying to launch something with Spotlight or the Dock or Quicksilver causes those components to freeze. Eventually everything is wedged enough that I have to hard-reboot. Does that match what you see, @zjz ?

dtrace freezes macOS Sequoia 15.3.1 on M2
 
 
Q