mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
The constructor's spawn loop pushed to _threads without holding _threads_mutex. A just-spawned autoscale worker could time out on the empty queue (especially with a small idle_threshold_usecs) and call _try_remove_self_if_above, which acquires _threads_mutex and modifies _threads (find + erase). Concurrent unlocked push_back and locked erase on the same vector is undefined behavior per the C++ memory model, even when reserve() prevents reallocation. The same race applied to the _threads.empty() and _threads.size() reads after the spawn loop. Fix: lock _threads_mutex around push_back in the spawn loop and around the post-loop size check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||