-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
zipos threading stress test #1011
Conversation
This test usually passes, sometimes deadlocks, and rarely raises |
Current guess is that it's a duplicate |
As for the segfault, I haven't managed to get good tracing on it, but from what I've seen it's happening in the |
Synchronization issues and crashes in ZipOS are normally tricky to debug, due to the need to block signals when ZipOS does heavy lifting inside functions like open(), which prevents crash reports / backtraces from being shown. You might have more luck troubleshooting things if you comment out the |
The only |
Sample
And another:
|
So, the segfault looks like a straightforward synchronization failure on To avoid a lock here, maybe instead of mutating |
Strange, adding |
Now the segfault is much rarer (and the deadlock is totally gone afaict), but it is only happening in the |
Locks `g_fds` for /zip `close()` calls. Moves lock to the top level in `__zipos_postdup`. The latter needs review for signal blocking correctness; it is no more wrong than it was before on that front, but I'm not at all confident that it was ever right. Added a defensive assert in `__zipos_read`.
Cracked it. Test passes all day now. Needs review, but the deadlock and segfault is gone. |
(N.B. this may be the wrong solution; it blocks signals for |
This was wrong before. Now it mirrors `sys_dup_nt`. As far as I can tell this is okay at all call sites; most of the time, there are parallel code paths for `sys_dup_nt` anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
No description provided.