[Cocoa] semaphore_timedwait() can return KERN_ABORTED
Created attachment 456436 [details] Patch
Comment on attachment 456436 [details] Patch Do you know how this happens? According to documentation, KERN_ABORTED means somebody manually terminated the thread or something like that. That's a bit surprising. Not sure how it would happen. Might be some other bug?
I only saw it happen while attached to the process in Xcode. I’m not sure exactly what’s happening but it might be due to the debugger.
Committed r292267 (249165@main): <https://commits.webkit.org/249165@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456436 [details].
<rdar://problem/91202104>
(In reply to Geoffrey Garen from comment #2) > Comment on attachment 456436 [details] > Patch > > Do you know how this happens? > > According to documentation, KERN_ABORTED means somebody manually terminated > the thread or something like that. That's a bit surprising. Not sure how it > would happen. Might be some other bug? I think this can get called if the remote process (holding the other end of the IPC semaphore) is crashing, no?
> I think this can get called if the remote process (holding the other end of > the IPC semaphore) is crashing, no? KERN_TERMINATED means the semaphore was destroyed (which I think is what happens when its creator crashes). If Xcode interruption triggers KERN_ABORTED on our semaphore, I wonder if execution continues correctly after that?