-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Investigate segfault #589
Comments
I'm able to replicate it, by increasing the number of iterators in the test to 100, setting |
Nice! |
Jotting down some notes. There are 3 ways for an iterator to be ended, with subtle differences. Internally we have a
I've refactored the code so that there's less code paths, but I only found Problem A after that, then fixed it with a mutex and got the tests to pass. Tomorrow I want to try and revert the refactorings, to see if Problem A is the only problem - or even a problem I introduced 😄 |
It is not the only problem. I suspect that an iterator being in the map doesn't prevent it from getting garbage collected. So, any iterator that is not explicitly ended (and therefore stays in the map) and has no reference to it in JS-land, risks getting garbage collected, after which the map contains a null pointer (or something in that sense), which we hit on close. |
See #587 (comment)
The text was updated successfully, but these errors were encountered: