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

Fuzzer generates UTF8 chars are used to convert to integer #10880

Closed
czentgr opened this issue Aug 28, 2024 · 2 comments
Closed

Fuzzer generates UTF8 chars are used to convert to integer #10880

czentgr opened this issue Aug 28, 2024 · 2 comments
Labels
bug Something isn't working enhancement New feature or request fuzzer Issues related the to Velox fuzzer test components. fuzzer-found

Comments

@czentgr
Copy link
Collaborator

czentgr commented Aug 28, 2024

Description

The fuzzer generates VARCHAR data that is causing a problem when used in CAST to integer.

Perhaps it can be enhanced? Or the error reported is actually a user error (user provided bad input data) and not a runtime error?

E20240828 21:06:10.111167    71 Exceptions.h:67] Line: /__w/velox/velox/velox/./velox/expression/CastExpr-inl.h:312, Function:applyCastKernel, Expression: functions::stringCore::isAscii( inputRowValue.data(), inputRowValue.size()) Unicode characters are not supported for conversion to integer types, Source: RUNTIME, ErrorCode: INVALID_STATE
E20240828 21:06:10.111605    71 ExpressionVerifier.cpp:146] Common eval: Exceptions other than VeloxUserError are not allowed.
terminate called after throwing an instance of 'facebook::velox::VeloxRuntimeError'
  what():  Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: INVALID_STATE
Reason: Unicode characters are not supported for conversion to integer types
Retriable: False
Expression: functions::stringCore::isAscii( inputRowValue.data(), inputRowValue.size())
Context: cast((�B	�+M*m�i������:VARCHAR) as SMALLINT)
Function: applyCastKernel
File: /__w/velox/velox/velox/./velox/expression/CastExpr-inl.h
Line: 312
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxException5State4makeIZNS1_C4EPKcmS5_St17basic_string_viewIcSt11char_traitsIcEES9_S9_S9_bNS1_4TypeES9_EUlRT_E_EESt10shared_ptrIKS2_ESA_SB_
# 2  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 3  _ZN8facebook5velox17VeloxRuntimeErrorC2EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bS7_
# 4  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorEPKcEEvRKNS1_18VeloxCheckFailArgsET0_
# 5  _ZN8facebook5velox4exec8CastExpr15applyCastKernelILNS0_8TypeKindE2ELS4_7ENS0_4util16PrestoCastPolicyEEEviRNS1_7EvalCtxEPKNS0_12SimpleVectorINS0_10TypeTraitsIXT0_EE10NativeTypeEEEPNS0_10FlatVectorINSA_IXT_EE10NativeTypeEEE
# 6  _ZZN8facebook5velox4exec8CastExpr19applyCastPrimitivesILNS0_8TypeKindE2ELS4_7EEEvRKNS0_17SelectivityVectorERNS1_7EvalCtxERKNS0_10BaseVectorERSt10shared_ptrISA_EENKUliE0_clEi
# 7  _ZNK8facebook5velox17SelectivityVector15applyToSelectedIZNS0_4exec8CastExpr27applyToSelectedNoThrowLocalIZNS4_19applyCastPrimitivesILNS0_8TypeKindE2ELS7_7EEEvRKS1_RNS3_7EvalCtxERKNS0_10BaseVectorERSt10shared_ptrISC_EEUliE0_EEvSB_S9_SH_OT_EUlSJ_E0_EEvSJ_

See https://github.com/facebookincubator/velox/actions/runs/10603680249/job/29390717357?pr=10767.

Error Reproduction

./velox_expression_fuzzer_test --seed ${RANDOM} --enable_variadic_signatures --velox_fuzzer_enable_complex_types --lazy_vector_generation_ratio 0.2 --velox_fuzzer_enable_column_reuse --velox_fuzzer_enable_expression_reuse --max_expression_trees_per_step 2 --retry_with_try --enable_dereference --duration_sec $DURATION --minloglevel=0 --stderrthreshold=2 --log_dir=/tmp/fuzzer_repro/logs --repro_persist_path=/tmp/fuzzer_repro

${RANDOM} is not reported.

Relevant logs

No response

@czentgr czentgr added bug Something isn't working enhancement New feature or request fuzzer Issues related the to Velox fuzzer test components. fuzzer-found labels Aug 28, 2024
@rui-mo
Copy link
Collaborator

rui-mo commented Sep 9, 2024

A same issue as #10871. Thanks.

@czentgr
Copy link
Collaborator Author

czentgr commented Sep 12, 2024

Closing it then as duplicate .

@czentgr czentgr closed this as completed Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request fuzzer Issues related the to Velox fuzzer test components. fuzzer-found
Projects
None yet
Development

No branches or pull requests

2 participants