Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
OS X Process.threads can crash a process #514
OS: OS X 10.9.3
I'm not quite sure why the code causes the target process to crash, it's rare on my laptop, impossible on a VM, but occurs often on other laptops.
Crash logs always indicate:
From what I can tell, the culprit is https://github.com/giampaolo/psutil/blob/master/psutil/_psutil_osx.c#L408
The next virtual memory region isn't necessarily a size offset from the current. The start of the next memory address can be page aligned.
does what you're experiencing cause just the target process to crash? or the host itself to crash? i'm experiencing a similar issue (python 2.7) but in random cases it causes the host itself to crash.. (10.8 and 10.9)
i have a feeling we're having similar but different issues; wanting to verify...
I've done some additional testing and I've come to the conclusion that it is not get_memory_maps but instead get_threads. I'm still testing to see if other attributes will cause failure.
If you crash launchd (OS X's version of init), the kernel will panic causing an auto reboot which @wesyoung may have seen.
added a commit
Oct 5, 2016
I know this is a long standing issue but I think I may have found the cause of this. We forgot to check the return value of