about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-08 22:53:20 +0000
committerbors <bors@rust-lang.org>2021-03-08 22:53:20 +0000
commiteb476b172f12dfbbee386d027b1ad6c0bc203a9b (patch)
tree7e55d5d064b5c24f8cbbf4a58b11472f297a4406 /compiler/rustc_mir/src/transform/coverage/debug.rs
parent8f349be27815d43d462a32faeb270a22a68486b6 (diff)
parentacdca316c3d42299d31c1b47eb792006ffdfc29c (diff)
downloadrust-eb476b172f12dfbbee386d027b1ad6c0bc203a9b.tar.gz
rust-eb476b172f12dfbbee386d027b1ad6c0bc203a9b.zip
Auto merge of #82877 - ehuss:revert-rwlock, r=m-ou-se
Revert switch of env locking to rwlock, to fix deadlock in process spawning

This reverts commit 354f19cf2475148994954b6783341620c7445071, reversing changes made to 0cfba2fd090834c909d5ed9deccdee8170da791b.

PR https://github.com/rust-lang/rust/pull/81850 switched the environment lock from a mutex to an rwlock. However, process spawning (when not able to use `posix_spawn`) locks the environment before forking, and unlocks it after forking (in both the parent and the child). With a mutex, this works (although probably not correct even with a mutex). With an rwlock, on at least some targets, unlocking in the child does not work correctly, resulting in a deadlock.

This has manifested as CI hangs on i686 Linux; that target doesn't use `posix_spawn` in the CI environment due to the age of the installed C library (currently glibc 2.23). (Switching to `posix_spawn` would just mask this issue, though, which would still arise in any case that can't use `posix_spawn`.)

Some additional cleanup of environment handling around process spawning may help, but for now, revert the PR and go back to a standard mutex.

Fixes #82221
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions