-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Fix use after free bug in actor heap finalisation that can lead to a segfault #4522
Fix use after free bug in actor heap finalisation that can lead to a segfault #4522
Conversation
this is needed to reliably trigger heap finaliser bug and can be reverted after the bug is fixed.
This was supposed to be opened as a |
There was a small grey text "convert to draft" under the reviewers section. I clicked it for you. (was curious how to do it myself) |
thanks.. much appreciated.. |
no clue why |
this is mostly ready in case anyone wants to take a peek.. it still needs things like a fancy description and release notes and any code cleanup/formatting changes before it is marked but the core bug (object finalisers can reference other objects whose memory might have already been freed/reused) has been reproduced and resolved on all architectures.. |
the various the i don't seem to have the ability to restart any failed jobs so i would appreciate it if someone who does have the appropriate privileges can restart them.. |
given that the please either keep retrying until it succeeds or mark it as success/ignore so the downstream jobs can run.. |
So the regression test that failed is for #3615. The actual regression isn't an issue but we did get a segfault which is concerning. |
@SeanTAllen the |
I agree it seems unrelated. @dipinhora can you open an issue for the kabooms? |
@SeanTAllen #4524 has been created |
A long time ago, some rando decided to be clever and rework how objects with finalisers are stored/garbage collected in actor heaps (see: #1638). Unfortunately for us all, he wasn't nearly as clever as he thought and introduced a use after free bug that only occurs when finalisers have logic to reference other objects that might have already been freed and reused during the same garbage collection process. Luckily for us, a smarterer rando has come along to save the day.
This PR adds in tests to reproduce the bug and rework the actor heap garbage collection logic to make sure this issue can no longer occur by making sure that: