mergerfs/vendored/libfuse/include
Antonio S. Musumeci 81e8f6281a fix data race on _threads between constructor and autoscale workers
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>
2026-04-10 22:24:14 -04:00
..
moodycamel Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
base_types.h Add support for FUSE_COPY_FILE_RANGE_64 2026-04-01 23:20:05 -05:00
bounded_queue.hpp Fix semaphore drift from enqueue_unbounded in BoundedQueue 2026-04-09 20:21:36 -04:00
debug.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
extern_c.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fatal.hpp Use fatal::abort() rather than assert in places 2026-03-24 21:13:34 -04:00
fs_dirent64.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse.h Rework open file resource management 2026-03-31 19:53:17 -04:00
fuse_attr.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_cfg.hpp Add FUSE request_timeout 2026-04-01 23:20:05 -05:00
fuse_common.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_conn_info.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_dirent.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_direntplus.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_dirents.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_entry.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_kernel.h Add support for FUSE_COPY_FILE_RANGE_64 2026-04-01 23:20:05 -05:00
fuse_lowlevel.h Add support for FUSE_COPY_FILE_RANGE_64 2026-04-01 23:20:05 -05:00
fuse_msgbuf.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_msgbuf_t.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_opt.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_pollhandle.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_req.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_req_ctx.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_timeouts.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
invocable.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
kvec.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
maintenance_thread.hpp Move maintainence thread func take u64 rather than int 2026-03-24 21:13:34 -04:00
mutex.hpp Replace two-statement mutex_lockguard macro with single RAII declaration 2026-04-09 21:42:24 -04:00
mutex_debug.hpp Replace two-statement mutex_lockguard macro with single RAII declaration 2026-04-09 21:42:24 -04:00
mutex_ndebug.hpp Replace two-statement mutex_lockguard macro with single RAII declaration 2026-04-09 21:42:24 -04:00
objpool.hpp fix objpool: add size tracking, improve allocation matching; fix msgbuf: clear pool on size change 2026-03-24 21:13:34 -04:00
stat_utils.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
syslog.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
thread_pool.hpp fix data race on _threads between constructor and autoscale workers 2026-04-10 22:24:14 -04:00