Repository navigation
Backlog
Description
- Crash File:
crash-71561a38e95bdbd69096c96b41e87ff3cda070c1 - Commit: 97bccab
- Crash Artifact: https://github.com/vortex-data/vortex/actions/runs/46782629229/artifacts/15564635069
Target crashed at vortex-array/src/validity.rs:480:cast_nullability:
Failed to compute validity mask:
Cannot cast array with invalid values to non-nullable type.
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-71561a38e95bdbd69096c96b41e87ff3cda070c1 \
-- -rss_limit_mb=0Auto-created by fuzzing workflow
Activity
github-actions commentedon Dec 2, 2026
Seen 13 times
github-actions commentedon Dec 2, 2026
🤖 Fuzzer fix: ✅ succeeded
The fix passed the
fuzz-fix-reviewskill, and a draft pull request is open: #12560Run 46803941014, attempt 1 · started 2026-12-02T05:13:07Z · finished 2026-12-02T05:44:56Z
vortex-claude commentedon Dec 2, 2026
Root cause
The crash comes from this projection:
The
castto non-nullableBoolis invalid for this input, becausenot_ilikeyields nulls for null rows. That should be a normalVortexError. The error is not raised where the cast is built.Mask::execute_canonicalattaches the mask child to the result as lazyValidity::Arraywithout executing it. Lazy mask validity is deliberate: see theMaskReducedocs and theall_valid_input_attaches_lazy_masktest.vortex-array/src/scalar_fn/builtin/mask/mod.rs:198:CASE WHEN then turns the condition into a mask.
BoolArrayExt::to_mask_fill_null_falseexecutes the lazy validity, the cast fails, andvortex_expectturns the error into a panic.Crash location,
vortex-array/src/arrays/bool/array.rs:129(before the fix):Validity::execute_maskalready returnsVortexResult, because executing lazy validity can fail. The bug is in the library:to_mask_fill_null_falseassumed that execution could not fail.Fix
to_mask_fill_null_falsenow returnsVortexResult<Mask>. Its callers that run in library code pass the error on with?:CaseWhen::execute,Zip::executeand PythonPyArray::filter. The fuzzfile_iotarget and thecompute::conformance::maskhelper keepvortex_expect, as test code.This changes the signature of the public
BoolArrayExttrait, so the PR should carrychangelog/break.Caller changes:
I rejected the other option, executing the mask child eagerly in
Mask::execute_canonical. It would undo the documented lazy-mask design, and the error would still panic for any other lazy validity that fails.Regression test
The test is in
vortex-functions/src/case_when/tests.rs. It goes through the same path as the crash: expression application, then CASE WHEN execution, then the lazymaskvalidity.Commands run
cargo test -p vortex-functions condition_with_failing_lazy_validitybefore the fixFailed to compute validity mask: Cannot cast array with invalid values to non-nullable type.(the crash message)cargo test -p vortex-functions -- case_when:: zip::cargo +nightly-2026-11-13 fuzz run --dev --sanitizer=none file_scan_expr_v2 crash-71561a38e95bdbd69096c96b41e87ff3cda070c1 -- -runs=1 -rss_limit_mb=0cargo clippy -p {vortex-array, vortex-functions, vortex-python, vortex-fuzz} --all-targets --all-features -- -D warningscargo +nightly-2026-11-13 fmt -p vortex-array -p vortex-functions -p vortex-python -p vortex-fuzzTo find the expression, I added a temporary
eprintln!of the projection and filter tofuzz/scan_expr.rsand removed it before the review.Review
The
fuzz-fix-reviewskill ran twice, and both reviews approved.is_err(), and it wrotevortex_expr::mask/vortex_expr::castas full paths. I fixed both: the test now checks the error message and imports the functions at the top of the file.BoolArrayExt::to_mask_fill_null_falsesignature and should be labelledchangelog/break, notchangelog/fix.