-
Type:
Task
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
DevProd Test Infrastructure
-
Fully Compatible
-
DevProd Test Infra 2026-06-02
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When SIGUSR1 fires (task timeout), resmoke was setting `HANG_ANALYZER_CALLED` before collecting subprocess PIDs. Other threads observe that flag and can tear down fixtures (killing mongod/mongo processes) before `_get_pids()` runs, causing `test_analysis.txt` to contain fewer PIDs than expected.
Fix: snapshot subprocess PIDs at the very start of both signal handlers, before `HANG_ANALYZER_CALLED` is set, and pass the snapshot forward to `_analyze_pids`.
Also change `test_analysis()` to open `test_analysis.txt` in append mode (`"a"`) instead of write mode (`"w"`), so concurrent callers from the sighandler and per-test `on_timeout` paths don't clobber each other's output.