You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check --read-data can panic with "index still in use" #606
check with read_data sometimes panics with index still in use when the machine is under load. We hit it on a busy CI runner with 0.13.0, and it reproduces on main.
thread '...' panicked at crates/core/src/index.rs:312:38:
index still in use
TreeStreamerOnce::new spawns the tree loaders with a clone of the index each and drops their JoinHandles (tree.rs). Once check_trees is done, check calls into_index() (check.rs), which only gives the loaders 100 ms to release their clones before the expect (index.rs). A loader that isn't scheduled in time triggers the panic.
To reproduce: an in-memory repo with ~120 directories, check with read_data in a loop, process pinned with taskset -c 0 next to 64 busy threads. 20 out of 20 runs panic on main.
Joining the loaders when the streamer is dropped fixes it, PR follows. #546 is related (loaders stop when the receiver is gone, but are still not joined).
Activity
fix: join tree loader threads before releasing the index (rustic-rs#607)
fix: join tree loader threads before releasing the index (rustic-rs#607)