Skip to content
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

native: Try hard to not malloc on a forked child #13393

Merged
merged 1 commit into from
Apr 8, 2014

Conversation

alexcrichton
Copy link
Member

This appears to be causing the BSD bots to lock up when looking at the core
dumps I've managed to get. Dropping the FileDesc structure triggers the Arc
it's contained in to get cleaned up, invoking free(). This instead just closes
the file descriptor (the arc itself is never cleaned up).

I'm still not entirely sure why this is a problem because the pthreads runtime
should register hooks for fork() to prevent this sort of deadlock, but perhaps
that's only done on linux?

This appears to be causing the BSD bots to lock up when looking at the core
dumps I've managed to get. Dropping the `FileDesc` structure triggers the `Arc`
it's contained in to get cleaned up, invoking free(). This instead just closes
the file descriptor (the arc itself is never cleaned up).

I'm still not entirely sure why this is a problem because the pthreads runtime
should register hooks for fork() to prevent this sort of deadlock, but perhaps
that's only done on linux?
@alexcrichton
Copy link
Member Author

Comment added

bors added a commit that referenced this pull request Apr 8, 2014
This appears to be causing the BSD bots to lock up when looking at the core
dumps I've managed to get. Dropping the `FileDesc` structure triggers the `Arc`
it's contained in to get cleaned up, invoking free(). This instead just closes
the file descriptor (the arc itself is never cleaned up).

I'm still not entirely sure why this is a problem because the pthreads runtime
should register hooks for fork() to prevent this sort of deadlock, but perhaps
that's only done on linux?
@bors bors closed this Apr 8, 2014
@bors bors merged commit 7da2109 into rust-lang:master Apr 8, 2014
@alexcrichton alexcrichton deleted the hopefully-fix-bsd branch April 8, 2014 06:15
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 3, 2024
fix: Specifying reason in expect(clippy::needless_return) no longer triggers false positive

fixes rust-lang#13366
changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants