Skip to content

json_extract: throw when wrapped in try() #13682

Open
@kagamiori

Description

@kagamiori

Description

The expression fuzzer without Presto caught one issues at commit time test, complaining that only simplified path throws. https://github.com/facebookincubator/velox/actions/runs/15477837292/job/43580064641.

Error Reproduction

I'm unfortunately not able to reproduce this failure so far. The save artifacts cannot reproduce the error due to #13676.

Relevant logs

E20250605 23:05:45.222383    70 FuzzerToolkit.cpp:115] Only simplified path threw exception:
E20250605 23:05:45.224390    70 ExceptionTracer.cpp:219] terminate() called, exception stack follows
E20250605 23:05:45.224434    70 ExceptionTracer.cpp:221] Exception type: (unknown type) (12 frames)
    @ 0000000000d6378f _ZZN12_GLOBAL__N_111InitializerC4EvENKUlNSt15__exception_ptr13exception_ptrEE3_clES2_
                       /build/deps-download/folly/folly/debugging/exception_tracer/ExceptionStackTraceLib.cpp:120
    @ 0000000000d637af _ZZN12_GLOBAL__N_111InitializerC4EvENUlNSt15__exception_ptr13exception_ptrEE3_4_FUNES2_
                       /build/deps-download/folly/folly/debugging/exception_tracer/ExceptionStackTraceLib.cpp:120
    @ 0000000000d6701a _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE
                       /build/deps-download/folly/folly/debugging/exception_tracer/ExceptionTracerLib.cpp:82
    @ 000000000ea8b8b3 _ZN8facebook5velox6fuzzer17compareExceptionsENSt15__exception_ptr13exception_ptrES3_
                       /__w/velox/velox/velox/velox/expression/fuzzer/FuzzerToolkit.cpp:123
    @ 000000000ea7859e _ZN8facebook5velox4test18ExpressionVerifier6verifyERKSt6vectorISt10shared_ptrIKNS0_4core10ITypedExprEESaIS8_EERKS3_INS0_6fuzzer13InputTestCaseESaISE_EEOS4_INS0_10BaseVectorEEbRKNSD_16InputRowMetadataE
                       /__w/velox/velox/velox/velox/expression/tests/ExpressionVerifier.cpp:545
    @ 0000000009053795 _ZN8facebook5velox6fuzzer24ExpressionFuzzerVerifier12retryWithTryESt6vectorISt10shared_ptrIKNS0_4core10ITypedExprEESaIS8_EES3_INS1_13InputTestCaseESaISB_EERKS4_INS0_10BaseVectorEERKNS1_16InputRowMetadataE
                       /__w/velox/velox/velox/velox/expression/fuzzer/ExpressionFuzzerVerifier.cpp:304
    @ 0000000009054aa3 _ZN8facebook5velox6fuzzer24ExpressionFuzzerVerifier2goEv
                       /__w/velox/velox/velox/velox/expression/fuzzer/ExpressionFuzzerVerifier.cpp:479
    @ 0000000009038ca5 _ZN8facebook5velox6fuzzer12FuzzerRunner12runFromGtestEmRKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS9_ESt8equal_toIS9_ESaIS9_EERKSt13unordered_mapIS9_St10shared_ptrINS0_4exec4test15ExprTransformerEESB_SD_SaISt4pairIKS9_SN_EEERKSI_IS9_S9_SB_SD_SaISO_ISP_S9_EEERKSI_IS9_SJ_INS1_17ArgTypesGeneratorEESB_SD_SaISO_ISP_S11_EEERKSI_IS9_SJ_INS1_18ArgValuesGeneratorEESB_SD_SaISO_ISP_S18_EEESJ_INSL_20ReferenceQueryRunnerEERKSJ_INS1_29SpecialFormSignatureGeneratorEE
                       /__w/velox/velox/velox/velox/expression/fuzzer/FuzzerRunner.cpp:281
    @ 0000000009008f55 main
                       /__w/velox/velox/velox/velox/expression/fuzzer/ExpressionFuzzerTest.cpp:280
    @ 00000000000295d0 __libc_start_call_main
    @ 0000000000029680 __libc_start_main
    @ 0000000008e505c5 _start

E20250605 23:05:45.380060    70 ExceptionTracer.cpp:223] exception stack complete
terminate called after throwing an instance of 'facebook::velox::VeloxUserError'
  what():  Exception: VeloxUserError
Error Source: USER
Error Code: INVALID_ARGUMENT
Reason: TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc.
Retriable: False
Context: json_extract(c0, c1)
Function: applyFunction
File: /__w/velox/velox/velox/velox/expression/Expr.cpp
Line: 1560
Stack trace:
Stack trace has been disabled. Use --velox_exception_user_stacktrace_enabled=true to enable it.

*** Aborted at 1749164745 (Unix time, try 'date -d @1749164745') ***
*** Signal 6 (SIGABRT) (0x46) received by PID 70 (pthread TID 0x7fa38220b680) (linux TID 70) (maybe from PID 70, UID 0) (code: -6), stack trace: ***
(error retrieving stack trace)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfuzzerIssues related the to Velox fuzzer test components.fuzzer-found

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions