@@ -379,16 +379,16 @@ jobs:
379379 flags : ${{ matrix.suite }}
380380 use_oidc : true
381381
382- rust-test :
383- name : " Rust tests (sanitizer)"
382+ rust-test-asan :
383+ name : " Rust tests (address sanitizer)"
384384 timeout-minutes : 40
385385 runs-on : >-
386386 ${{ github.repository == 'vortex-data/vortex'
387- && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-sanitizer', github.run_id)
387+ && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-address- sanitizer', github.run_id)
388388 || 'ubuntu-latest' }}
389389 env :
390390 # Add debug symbols and enable ASAN/LSAN with better output
391- ASAN_OPTIONS : " symbolize=1:print_stats=1:check_initialization_order=1:detect_leaks=1:halt_on_error=0: verbosity=1:leak_check_at_exit=1"
391+ ASAN_OPTIONS : " symbolize=1:print_stats=1:check_initialization_order=1:detect_leaks=1:verbosity=1:leak_check_at_exit=1"
392392 LSAN_OPTIONS : " verbosity=1:report_objects=1"
393393 ASAN_SYMBOLIZER_PATH : " /usr/bin/llvm-symbolizer"
394394 # Link against DuckDB debug build
@@ -416,14 +416,128 @@ jobs:
416416 # Build with full debug info first (helps with caching)
417417 cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
418418 --target x86_64-unknown-linux-gnu \
419- -p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
419+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
420+
421+ # Run tests with sanitizers and debug output
422+ cargo +$NIGHTLY_TOOLCHAIN nextest run \
423+ --locked \
424+ --all-features \
425+ --no-fail-fast \
426+ --target x86_64-unknown-linux-gnu \
427+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
428+
429+ # vortex-ffi requires --no-default-features as otherwise we pull in
430+ # Mimalloc which interferes with sanitizers
431+ # cargo nextest reports less leaks than cargo test
432+ cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
433+ -Zbuild-std --no-fail-fast --target x86_64-unknown-linux-gnu \
434+ -p vortex-ffi -- --no-capture
435+
436+ rust-test-msan :
437+ name : " Rust tests (memory sanitizer)"
438+ timeout-minutes : 40
439+ runs-on : >-
440+ ${{ github.repository == 'vortex-data/vortex'
441+ && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-memory-sanitizer', github.run_id)
442+ || 'ubuntu-latest' }}
443+ env :
444+ # Add debug symbols and enable ASAN/LSAN with better output
445+ MSAN_OPTIONS : " symbolize=1:print_stats=1:verbosity=1"
446+ MSAN_SYMBOLIZER_PATH : " /usr/bin/llvm-symbolizer"
447+ # Link against DuckDB debug build
448+ VX_DUCKDB_DEBUG : " 1"
449+ # Keep frame pointers for better stack traces
450+ CARGO_PROFILE_DEV_DEBUG : " true"
451+ CARGO_PROFILE_TEST_DEBUG : " true"
452+ # Skip slow tests that are too expensive under sanitizer
453+ VORTEX_SKIP_SLOW_TESTS : " 1"
454+ steps :
455+ - uses : runs-on/action@v2
456+ if : github.repository == 'vortex-data/vortex'
457+ with :
458+ sccache : s3
459+ - uses : actions/checkout@v6
460+ - uses : ./.github/actions/setup-prebuild
461+ - name : Install nightly for sanitizer
462+ run : |
463+ rustup toolchain install $NIGHTLY_TOOLCHAIN
464+ rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
465+ - name : Rust Tests
466+ env :
467+ RUSTFLAGS : " -A warnings -Zsanitizer=memory -Cunsafe-allow-abi-mismatch=sanitizer --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none"
468+ run : |
469+ # Build with full debug info first (helps with caching)
470+ cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
471+ --target x86_64-unknown-linux-gnu \
472+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
473+
474+ # Run tests with sanitizers and debug output
475+ cargo +$NIGHTLY_TOOLCHAIN nextest run \
476+ --locked \
477+ --all-features \
478+ --no-fail-fast \
479+ --target x86_64-unknown-linux-gnu \
480+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
481+
482+ # vortex-ffi requires --no-default-features as otherwise we pull in
483+ # Mimalloc which interferes with sanitizers
484+ # cargo nextest reports less leaks than cargo test
485+ cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
486+ -Zbuild-std --no-fail-fast --target x86_64-unknown-linux-gnu \
487+ -p vortex-ffi -- --no-capture
488+
489+ rust-test-tsan :
490+ name : " Rust tests (thread sanitizer)"
491+ timeout-minutes : 40
492+ runs-on : >-
493+ ${{ github.repository == 'vortex-data/vortex'
494+ && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-thread-sanitizer', github.run_id)
495+ || 'ubuntu-latest' }}
496+ env :
497+ # Add debug symbols and enable ASAN/LSAN with better output
498+ TSAN_OPTIONS : " symbolize=1:print_stats=1:check_initialization_order=1:halt_on_error=0:verbosity=1"
499+ TSAN_SYMBOLIZER_PATH : " /usr/bin/llvm-symbolizer"
500+ # Link against DuckDB debug build
501+ VX_DUCKDB_DEBUG : " 1"
502+ # Keep frame pointers for better stack traces
503+ CARGO_PROFILE_DEV_DEBUG : " true"
504+ CARGO_PROFILE_TEST_DEBUG : " true"
505+ # Skip slow tests that are too expensive under sanitizer
506+ VORTEX_SKIP_SLOW_TESTS : " 1"
507+ steps :
508+ - uses : runs-on/action@v2
509+ if : github.repository == 'vortex-data/vortex'
510+ with :
511+ sccache : s3
512+ - uses : actions/checkout@v6
513+ - uses : ./.github/actions/setup-prebuild
514+ - name : Install nightly for sanitizer
515+ run : |
516+ rustup toolchain install $NIGHTLY_TOOLCHAIN
517+ rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
518+ - name : Rust Tests
519+ env :
520+ RUSTFLAGS : " -A warnings -Zsanitizer=thread -Cunsafe-allow-abi-mismatch=sanitizer --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none"
521+ run : |
522+ # Build with full debug info first (helps with caching)
523+ cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
524+ --target x86_64-unknown-linux-gnu \
525+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
526+
420527 # Run tests with sanitizers and debug output
421528 cargo +$NIGHTLY_TOOLCHAIN nextest run \
422529 --locked \
423530 --all-features \
424531 --no-fail-fast \
425532 --target x86_64-unknown-linux-gnu \
426- -p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
533+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
534+
535+ # vortex-ffi requires --no-default-features as otherwise we pull in
536+ # Mimalloc which interferes with sanitizers
537+ # cargo nextest reports less issues than cargo test
538+ cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
539+ -Zbuild-std --no-fail-fast --target x86_64-unknown-linux-gnu \
540+ -p vortex-ffi -- --no-capture
427541
428542 cuda-build-lint :
429543 if : github.repository == 'vortex-data/vortex'
0 commit comments