Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in between(ipprefix, ipprefix, ipprefix) #11875

Closed
kagamiori opened this issue Dec 16, 2024 · 2 comments
Closed

Bug in between(ipprefix, ipprefix, ipprefix) #11875

kagamiori opened this issue Dec 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working fuzzer-found

Comments

@kagamiori
Copy link
Contributor

Description

Expression fuzzer found a result mismatch between the common eval and simplified eval in between(ipprefix, ipprefix, ipprefix). The mismatch is due to a bug in RowView::compareImpl() where index into DecodedVector is used with the DecodedVector's base vector.

->baseVector()
->compare(
std::get<Is>(*other.childReaders_)->baseVector(),
offset_,
other.offset_,
flags);

Error Reproduction

Run the following command on top of #11846.

velox_expression_fuzzer_test
--enable_variadic_signatures
--velox_fuzzer_enable_complex_types
--lazy_vector_generation_ratio
0.2
--common_dictionary_wraps_generation_ratio=0.3
--velox_fuzzer_enable_column_reuse
--velox_fuzzer_enable_expression_reuse
--max_expression_trees_per_step
2
--retry_with_try
--enable_dereference
--duration_sec
1800
--logtostderr=1
--minloglevel=0
--seed=3877512733

Relevant logs

I20241216 10:09:51.674111 977155 ExpressionFuzzerVerifier.cpp:356] ==============================> Started iteration 0 (seed: 3877512733)
I20241216 10:09:51.674897 977155 ExpressionVerifier.cpp:104] Executing expression 0 : xxhash64(to_utf8(UM_@$-\1Zr[--?c2-*I7x[5P*H=Sqo04!@e''K1@0Tu70]))
I20241216 10:09:51.674919 977155 ExpressionVerifier.cpp:104] Executing expression 1 : between({115133623105189926705148207074365242575, [0->0] 118},"c0",{129013129174304261811603096449703045709, [11->10] [10->15] 103})
I20241216 10:09:51.674968 977155 ExpressionVerifier.cpp:104] Executing expression 2 : "row_number"
I20241216 10:09:51.676100 977155 FuzzerToolkit.cpp:158] Two vectors match.
I20241216 10:09:51.676937 977155 FuzzerToolkit.cpp:158] Two vectors match.
I20241216 10:09:51.677024 977155 FuzzerToolkit.cpp:158] Two vectors match.
E20241216 10:09:51.677047 977155 Exceptions.h:66] Line: /Users/weihe/Development/velox/velox/expression/fuzzer/FuzzerToolkit.cpp:155, Function:operator(), Expression: left->equalValueAt(right.get(), row, row) Different values at idx '2': '[2->87] true' vs. 'false', Source: RUNTIME, ErrorCode: INVALID_STATE
I20241216 10:09:51.677120 977155 ExpressionVerifier.cpp:411] Skipping persistence because repro path is empty.
libc++abi: terminating due to uncaught exception of type facebook::velox::VeloxRuntimeError: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: INVALID_STATE
Reason: Different values at idx '2': '[2->87] true' vs. 'false'
Retriable: False
Expression: left->equalValueAt(right.get(), row, row)
Function: operator()
File: /Users/weihe/Development/velox/velox/expression/fuzzer/FuzzerToolkit.cpp
Line: 155
@kagamiori kagamiori added bug Something isn't working fuzzer-found labels Dec 16, 2024
@kagamiori
Copy link
Contributor Author

cc @yuandagits @kevinwilfong

@kagamiori
Copy link
Contributor Author

This has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer-found
Projects
None yet
Development

No branches or pull requests

2 participants