Confirm runtime events ring is still active after callback#13522
Confirm runtime events ring is still active after callback#13522sadiqj merged 1 commit intoocaml:trunkfrom
Conversation
sadiqj
left a comment
There was a problem hiding this comment.
Good find and the fix seems correct, thanks!
ghost
left a comment
There was a problem hiding this comment.
Makes sense to me. Thanks for looking into this.
3cf68f3 to
370b052
Compare
|
My understanding:
|
|
Agree with your assessment. I would expect the guard added in this PR to only trigger rarely in racy programs where some domain is writing to the ring while another domain is actively terminating the program. Given that the program is terminating, it is better to take the simpler route of dropping the write. Tools like |
|
The data race in |
|
@gasche do you have any objections to merging this PR? |
Need to check whether the ring is still active after a callback. It may be possible that ring has been destroyed during the execution of the callback.
370b052 to
c298125
Compare
|
None. (I haven't looked at this enough to have formed an opinion, and I'm happy to trust the process :-) |
|
Great. Merging! Thanks @kayceesrk |
Need to check whether the ring is still active after a callback. It may be possible that ring has been destroyed during the execution of the callback. (cherry picked from commit bf63f88)
|
Cherry-picked to 5.3 in ebc3c13. Is this wanted for 5.2.1 as well? |
We need to check whether the ring is still active after a callback. It may be that the ring was destroyed during the callback execution. If this were the case, the subsequent call to
write_to_ringwould crash.