Repository navigation
Backlog
Description
- Crash File:
crash-7fb791cb15cb7ed80c70c1ac839ce61d5d2f075e - Commit: 644837d
- Crash Artifact: https://github.com/vortex-data/vortex/actions/runs/46716040995/artifacts/15532607222
Target crashed at vortex-array/src/scalar_fn/builtin/numeric/row.rs:134:numeric_error:
Failed to compute validity mask:
integer overflow in checked sub
Stack trace
stack backtrace:
1: core::panicking::panic_fmt
at /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/core/src/panicking.rs:80:14
2: panic_display<vortex_error::VortexError>
at /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:259:5
3: result_expect_failed<vortex_error::VortexError>
at ./vortex-error/src/lib.rs:553:9
4: vortex_expect<vortex_mask::Mask, vortex_error::VortexError>
at ./vortex-error/src/lib.rs:258:25
5: to_mask_fill_null_false<vortex_array::array::typed::Array<vortex_array::arrays::bool::vtable::Bool>>
at ./vortex-array/src/arrays/bool/array.rs:132:14
6: execute
at ./vortex-functions/src/case_when/mod.rs:271:39
7: execute_step<vortex_functions::case_when::CaseWhen>
at ./vortex-array/src/scalar_fn/vtable.rs:242:14
8: execute_step<vortex_functions::case_when::CaseWhen>
at ./vortex-array/src/scalar_fn/typed.rs:198:22
9: execute_step
at ./vortex-array/src/scalar_fn/erased.rs:164:16
10: execute
at ./vortex-array/src/arrays/scalar_fn/vtable/mod.rs:155:33
11: execute_encoding<vortex_array::arrays::scalar_fn::vtable::ScalarFn>
at ./vortex-array/src/array/mod.rs:271:5
12: execute_encoding_unchecked
at ./vortex-array/src/array/erased.rs:752:9
13: execute_until<vortex_array::canonical::AnyCanonical>
at ./vortex-array/src/executor/mod.rs:455:40
14: execute
at ./vortex-array/src/canonical.rs:597:28
15: execute<vortex_array::canonical::Canonical>
at ./vortex-array/src/executor/mod.rs:109:9
16: execute
at ./vortex-array/src/canonical.rs:806:21
17: execute<vortex_array::canonical::RecursiveCanonical>
at ./vortex-array/src/executor/mod.rs:109:9
18: {closure#0}<vortex_io::runtime::current::CurrentThreadIterator<core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>>, file_scan_expr_v2::_::__libfuzzer_sys_run::{closure_env#0}>
at ./fuzz/scan_expr.rs:89:24
19: run<vortex_io::runtime::current::CurrentThreadIterator<core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>>, file_scan_expr_v2::_::__libfuzzer_sys_run::{closure_env#0}>
at ./fuzz/scan_expr.rs:93:9
20: run_file_scan_expr<vortex_io::runtime::current::CurrentThreadIterator<core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>>, file_scan_expr_v2::_::__libfuzzer_sys_run::{closure_env#0}>
... (29 more frames truncated)
To reproduce, download the crash artifact to ~/Downloads and run these
commands from the repository root:
unzip ~/Downloads/file_scan_expr_v2-crash-artifacts.zip -d fuzz-artifacts
RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none \
file_scan_expr_v2 \
fuzz-artifacts/file_scan_expr_v2/crash-7fb791cb15cb7ed80c70c1ac839ce61d5d2f075e \
-- -rss_limit_mb=0Auto-created by fuzzing workflow
Activity
github-actions commentedon Dec 1, 2026
Seen 7 times
github-actions commentedon Dec 2, 2026
🤖 Fuzzer fix: ✅ succeeded
The fix passed the
fuzz-fix-reviewskill, and a draft pull request is open: #12559Run 46803940979, attempt 1 · started 2026-12-02T04:54:37Z · finished 2026-12-02T05:13:31Z
vortex-claude commentedon Dec 2, 2026
Root cause
This is a library bug, not a harness bug. The harness already discards scan errors (
once().ok()infuzz/scan_expr.rs), so only a panic counts as a failure.The crashing projection is a
CASE WHEN(noELSE) whose condition is:Here
$is a non-nullablei64column.Mask::execute_canonicalkeeps the unexecuted mask argument as the lazy validity of its result. This is intended:So after
CaseWhenexecutes the condition to aBoolArray, the condition's validity still contains4415723635229167453 - $. That checked subtraction overflows on the file's data. This is a legitimate, data-dependent error, andValidity::execute_maskreturnsVortexResultfor that reason.BoolArrayExt::to_mask_fill_null_falsethen turned the error into a panic.Crash location
vortex-array/src/arrays/bool/array.rs:129-132, called fromvortex-functions/src/case_when/mod.rs:271:Fix
to_mask_fill_null_falsenow returnsVortexResult<Mask>, and the callers propagate the error.vortex-array/src/arrays/bool/array.rs:Call-site changes. Each one-line change is inside an existing function that already returns
VortexResult:Two callers keep their previous panic behaviour, with
vortex_expectat the call site, matching the steps around them:API change: the return type of the public
BoolArrayExt::to_mask_fill_null_falsechanged fromMasktoVortexResult<Mask>.Regression test
vortex-functions/src/case_when/tests.rs:Commands run
cargo test -p vortex-functions --lib condition_validity_error_is_returned(before fix)Failed to compute validity mask: integer overflow in checked subcargo test -p vortex-functions --lib condition_validity_error_is_returned(after fix)cargo +nightly-2026-11-13 fuzz run --dev --sanitizer=none file_scan_expr_v2 crash-7fb791cb15cb7ed80c70c1ac839ce61d5d2f075e -- -runs=1 -rss_limit_mb=0Executed ... in 179 ms), no paniccargo clippy -p vortex-array -p vortex-functions -p vortex-fuzz --all-targets --all-features -- -D warningscargo clippy -p vortex-python --all-targets --all-features -- -D warningscargo +nightly-2026-11-13 fmt -p vortex-array -p vortex-functions -p vortex-python -p vortex-fuzzI did not run the full test suites of the changed crates.
Review
The verdict from the
fuzz-fix-reviewskill is approve. Suggested title: Return validity errors from CaseWhen and Zip conditions instead of panicking.The reviewer re-ran the crash input, the regression test, clippy and fmt, and all passed. It could not create a worktree to watch the test fail on the unfixed code. I ran the test before the fix myself: it failed with the crash's panic, as shown above.
Findings (both nits, not addressed in this change):
vortex-array/src/arrays/bool/array.rs:132: the signature change to the publicBoolArrayExt::to_mask_fill_null_falsebreaks downstream callers. A maintainer should decide whether the PR needschangelog/break.execute_mask(...).vortex_expect("Failed to compute validity mask")pattern remains atvortex-array/src/arrays/varbin/compute/filter.rs:77and:184, and atencodings/sparse/src/canonical.rs:607and:808. A failing lazy validity would panic there too. The fuzz input does not reach these call sites, so they are left for a follow-up.