-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process monitor crashes #3010
process monitor crashes #3010
Conversation
n8henrie
commented
Jun 2, 2024
- Simplify locks with @synchronized
- Use a threadsafe dict for data as well as cache
This is intended to fix #3008 |
Hey Nate 👋 :-) Does this actually fix the problem? Have you been running with this and do you still experience crashes? If not - then it looks good to me. My only concern is: does it cause any locks anywhere else in the code? |
Hi Pat!
No, unfortunately. I think I have mostly / partially reverted it in my local branch, will convert this to a draft to reduce confusion. I've finally discovered xcode's thread sanitizer, which I think will be helpful in pinpointing areas of concern, but I've also been busy with a move and an upcoming board exam, so it's been slow going. It also seem that thread sanitizer may have some false positives, as I've spent way too much time trying to hunt down the reported race condition at
NSEnumerationConcurrent (and returns if I put it back in). Either that or it's somewhere in
|
Hey hey! Darn, that's a shame it doesn't work. Although I didn't think this would work - we used thread safe dicts in the past for QSProcessMonitor, but I actually took them out as they weren't helping :( Good to hear you've got the thread sanitizer working! I wonder if ChatGPT can analyze and fix the code for us...? ;-) |
I've tried! Unfortunately doesn't seem to know ObjC very well either. I tried (repeatedly) to get it to recreate a toy program that would crash with |
af772d5
to
363a4de
Compare
@pjrobertson actually, I take it back -- this seems to mitigate the issue at least somewhat. Without this I'm getting crashes within an hour or two, with this it's been running for 2 days without a crash. Let's merge this for now and see if it at least mitigates the issue. |