TSan data race in StopForkServer
Categories
(Core :: IPC, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: jld, Assigned: jld)
References
Details
Attachments
(1 external file)
Seen in a Try run with the forkserver pref flipped. There's a race between ProcessWatcher checking if the fork server is in use (via ForkServiceChild::Get) and the fork server shutdown path (ForkServerLauncher::Observe → StopForkServer). The race seems to be benign, but it causes test failures. I have an idea for a simple fix.
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
There's a race between ProcessWatcher checking if the fork server is
in use (via ForkServiceChild::Get) and the fork server shutdown path
(ForkServerLauncher::Observe calling StopForkServer). The race
seems to be benign, but it causes test failures under TSan.
As a relatively simple fix, this patch changes ProcessWatcher to check
an atomic flag which is true if the fork server has ever been run.
(This also means that, in the case where the fork server has been shut
down but some of its child processes are still running, we will continue
to use the kill(pid, 0) fallback.)
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•