mockingbirdnest / Principia

𝑛-Body and Extended Body Gravitation for Kerbal Space Program
MIT License
774 stars 70 forks source link

Fix locking in PushPullCallback #3882

Closed pleroy closed 9 months ago

pleroy commented 9 months ago

The journal replaying for #3872 was not completely conclusive as it didn't reproduce the crash. However, it told us exactly what code we were executing when the crash happened. After staring at this code for a while, @eggrobin noticed that the PushPullCallback class would always be destroyed with its internal mutex held. That's violates the invariants of Mutex and might cause plague and pestilence.

This change may or may not address #3872.