Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use the parking_lot locking primitives #56410
Use the parking_lot locking primitives #56410
Changes from 1 commit
7b0ad27
1aab11d
e313500
20ab8d2
7cafa6d
7c42fc8
3b23add
f58fc9b
81a1e21
5a3dd8a
d354b95
8edc128
4f0f8e1
a0b366c
8dfad4b
d6fab63
fc379ee
142bda2
eaaca60
0d679ef
e8e355e
55f1ed2
c6c6fb1
f1a805b
0b1a6e9
a562580
b50a20e
6ad5485
0070390
c294204
c301ce0
dd30a55
e0fd309
0048440
e49bbd1
f40d609
56c2805
7124cae
6695be8
795285f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I removed this test, since it was testing something one should not be doing in the first place, and with the new lock impl this caused a deadlock.
If the parent process is multi threaded, a child process is not supposed to call anything but syscalls after the
fork
. Hereenv::set_var
will try to lock theENV_LOCK
mutex which triggers a deadlock because of howparking_lot
is not fork-safe. See the comment around thefork
call.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.
This seems like a problem... I argued for
pre_exec
becoming unsafe for a reason, but it is still useful for extra "setup" that might have to be done before theexec
in the forked-off process, and it doesn't seem too far-fetched to assume that someone might want to set env vars there. I knowCommand
can do that, but someone might either not be aware or it doesn't really fit the way their code is written.