I’ve been working on Mac support for rbspy, and I accidentally
found something that looks like a Mac kernel bug! Basically I managed to write a very short (17
line) C program that reliably causes ps
to stop working. Without allocating any memory or anything
like that!
This seems to be a kernel bug on High Sierra, but not Sierra – someone tried to reproduce on Sierra and couldn’t. So looks like it’s a new bug.
mysterious freezes on mac
This past week I’ve been building Mac support for rbspy (my Ruby profiler). I put a Mac support
branch on github yesterday. Some amazing early adopters tried out the branch and reported that it
froze their computer (Activity Monitor stopped working, they couldn’t open new terminals, etc). This
was extremely surprising – how could that happen?!? There’s a very detailed report at
https://github.com/rbspy/rbspy/issues/70.
I was really mystified by this – how could a program not running as root freeze someone’s
computer? Somebody suggested that maybe the program was allocating a lot of
memory, but I didn’t think it was. And it turns out that memory allocations weren’t the problem.
A 17-line C program that freezes (parts of) my Mac
@parkr was incredibly helpful and managed to narrow d