Files
rust/library/std/src
bors eb476b172f 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 354f19cf24, reversing changes made to 0cfba2fd09.

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
2021-03-08 22:53:20 +00:00
..
2021-02-06 13:05:56 +01:00
2020-11-07 16:15:48 +01:00
2020-10-21 20:44:03 -07:00
2021-01-07 09:13:21 +01:00
2020-09-02 17:37:40 -04:00
2021-01-23 11:56:33 -06:00
2021-02-26 19:03:44 +01:00
2021-02-26 19:03:44 +01:00
2021-01-31 11:07:37 +01:00
2021-02-28 12:57:38 -08:00
2021-02-23 15:54:55 +01:00
2021-02-13 16:59:06 +01:00
2020-11-22 17:11:41 -05:00