You might be hitting an issue where some hardware memory protection gets incorrectly reenabled for a SIP-disabled system upon wake from sleep, which then causes the DTrace freeze you are seeing.
I'm assuming you already have SIP disabled on your machine (if not that would be the first step). However, in some cases when the machine goes to sleep and wakes up some memory protection that was disabled as part of disabling SIP may get reenabled. This prevents DTrace from writing to a memory region it needs and causes it to freeze.
A reboot will reset the permission and protection settings correctly.
So as a workaround until this is fixed, you can try to prevent your machine from going to sleep after a reboot or reboot before you want to use DTrace.
We are investigating the issue. If you would like to be notified when this is fixed, feel free to file a feedback and post it here. We can then link it to the internal issue.
If you are seeing this behavior with SIP disabled after a fresh reboot (without the machine going to sleep in-between), please let us know.
Hey there Permissions & SIP: If you're on a newer macOS version, the System Integrity Protection (SIP) can interfere with dtrace. While I don't recommend it for long-term use, you might want to try disabling SIP temporarily to see if it makes a difference. Boot into Recovery Mode (by holding Command + R during startup) > Utilities > Terminal, then enter csrutil disable.
Hope this helps, you get to the bottom of this issue soon.
Ahmad.
Same issue here - with SIP disabled.
I have this too. This completely locks up my system. No wake or sleep involved. Restart, try to use dtrace (via dtruss) and boom freeze everything but the UI.