-
Notifications
You must be signed in to change notification settings - Fork 165
Insert into Indexmap randomly fails #330
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
Comments
Is it always those exact numbers, Is there anything else "weird" going on during your tests, like panics? I'm guessing that we might get into a bad state if some user code like Is your test suite available for others to run to reproduce this problem? |
Also, can your tests run under |
I'm thinking it may have to do with me using Lazy to wrap the object that contains the indexmap. I'm gonna rework my code to not use it and see if that makes a difference. If it doesn't I'll make my test suite available so you can take a look at what's going on. Currently on a windows box, so miri isn't available. I'll see if I can wrangle a linux or mac setup |
I've reworked my code to not use once_cell::sync::Lazy and this has fixed the issue. So something about Lazy is causing inconsistencies with Indexmap. Sorry for the false failure! |
Ok! I would still be interested in seeing the reproducer, if possible, to see if I can track down the problem in |
Manged to get a branch back into the failure state: https://gitlab.com/open-craft/opencraft/-/tree/reproduction-branch?ref_type=heads |
I believe your For example, in
|
Ah, so the issue was that the tests were being run in parallel. Gotcha |
Yes, but it is also a hazard for regular use of your API if it may be called from multiple threads. |
Out of every 4 test runs I get the following error at least once:
The text was updated successfully, but these errors were encountered: