macbook pro – MacOS gets stuck for a while before launching new processes (?) … any ideas?

Running Ventura 13.0.1 on a Macbook Pro 2019 (Intel)

Occasionally–several times a day, at what seem like random times–MacOS gets into a temporary state in which it seems to get stuck launching new processes. That is, the symptoms are:

  • Already running apps & desktop still seem to mostly work; I can interact, move windows around, open menus, etc.
  • Entering a command in a shell freezes the shell
  • Opening a new tab in a browser freezes the browser
  • Trying to open a new app from LaunchBar freezes LaunchBar
  • After some amount of time (typically 1-2 minutes), it unfreezes and all the queued up things launch: browser tab loads, shell command runs, etc. And then everything works normally… until the next time.

I.e. it seems to me that when a process tries to launch a child process, the fork() syscall hangs for a while, and in the meantime the parent process is blocked and so unresponsive. If so, it seems like there could be some sort of resource lock/deadlock in the kernel that needs to time out? Of course I could be way off base on all this, maybe something else is going on.

I haven’t noticed any pattern for what triggers this. It only started happening after I updated to Ventura — post hoc ergo procter hoc? I’ve tried the obvious coarse hammers: rebooting, resetting PRAM & SMC. I don’t see anything in the Console logs.

Any ideas for what might be happening? How to debug it? And of course how to fix it? :)

Update: It just happened again, I could pull down iStat menus while new processes were stuck. More things I found:

  • During the stuck time, kernel_task bopped up and down between 20% and 92% CPU; after the stuck time, kernel_task is back down around 3%. RTProtectionDaemon was also bouncing up to 100% and back down, but it does that also when not in the stuck time. No other CPU activity of note.
  • Answering @mmmmmm’s comment: Memory pressure 10%, Memory 55%. No sign of any process swapping hog.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: