Skip to content

Commit 6662984

Browse files
committed
Fix race condition in parallel FastGA execution
This commit resolves intermittent segfaults when multiple FastGA processes run concurrently by implementing two key fixes: FIX 1: Use unique temp directories per FastGA invocation - Create a unique temp directory for each FastGA process - Pass it via the -P flag to prevent collisions in shared /tmp - Prevents race conditions in GDB file creation and temp file handling FIX 2: Use tempfile crate for .1aln output - Replace PID-based naming with tempfile::Builder for guaranteed uniqueness - Provides atomic file creation even under heavy contention - Defense-in-depth against temp file collisions Testing: - All integration tests pass with --test-threads=8 (previously failing at 30-50% rate) - Verified stability across multiple test runs - No performance regression observed CI Changes: - Restored parallel test execution (removed --test-threads=1 workaround) - Expected to reduce CI time from 12min back to ~5min References: See RACE_CONDITION_ANALYSIS.md for detailed investigation
1 parent 329c164 commit 6662984

File tree

4 files changed

+504
-6
lines changed

4 files changed

+504
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: cargo build --release
3737

3838
- name: Run tests
39-
run: cargo test --release -- --test-threads=1
39+
run: cargo test --release
4040

4141
- name: Run clippy
4242
run: cargo clippy -- -D warnings

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)