-
Notifications
You must be signed in to change notification settings - Fork 8.3k
std::bad_typeid in JSONLength #11885
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers
Description
Describe the bug
Crash in debug build in CI
Related #8327
How to reproduce
SELECT
JSONExtractKeysAndValues([], JSONLength('^?V{LSwp')),
NULL
Received exception from server (version 20.5.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: std::bad_typeid.2020.06.22 21:42:53.687489 [ 7895 ] {e20c51df-3124-4c85-b737-84735964f788} <Debug> executeQuery: (from [::1]:56266) SELECT JSONExtractKeysAndValues([], JSONLength('^?V{LSwp')), N
ULL;
2020.06.22 21:42:53.689028 [ 7895 ] {e20c51df-3124-4c85-b737-84735964f788} <Error> : Logical error: 'std::bad_typeid'.
2020.06.22 21:42:53.690169 [ 201 ] {} <Trace> BaseDaemon: Received signal 6
2020.06.22 21:42:53.690586 [ 219400 ] {} <Fatal> BaseDaemon: ########################################
2020.06.22 21:42:53.690726 [ 219400 ] {} <Fatal> BaseDaemon: (version 20.5.1.3835 (official build), build id: D63B507E6702D44C) (from thread 7895) (query_id: e20c51df-3124-4c85-b737-84735964f788) Received signal Aborted (6)
2020.06.22 21:42:53.690813 [ 219400 ] {} <Fatal> BaseDaemon:
2020.06.22 21:42:53.690924 [ 219400 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f1d3ed473eb 0x7f1d3ed26899 0x7f1d3ed26769 0x7f1d3ed38006 0x1581c608 0x167aacd7 0x1683b541 0x16833d01 0x167a4e89 0x1685b505 0x1685c76b 0x1686cf89 0x16860b97 0x1c472de0 0x1c4728c3 0x1c77bb12 0x1c784406 0x1c77ef0a 0x1c77bf17 0x1c7658eb 0x1c775186 0x1c7658fd 0x1c75d1cd 0x1c760162 0x1c762d38 0x1c4ed542 0x1c4ead62 0x1c4e7c1b
2020.06.22 21:42:53.691132 [ 219400 ] {} <Fatal> BaseDaemon: 4. gsignal @ 0x463eb in /usr/lib/x86_64-linux-gnu/libc-2.30.so
2020.06.22 21:42:53.691222 [ 219400 ] {} <Fatal> BaseDaemon: 5. abort @ 0x25899 in /usr/lib/x86_64-linux-gnu/libc-2.30.so
2020.06.22 21:42:53.691305 [ 219400 ] {} <Fatal> BaseDaemon: 6. ? @ 0x25769 in /usr/lib/x86_64-linux-gnu/libc-2.30.so
2020.06.22 21:42:53.691385 [ 219400 ] {} <Fatal> BaseDaemon: 7. ? @ 0x37006 in /usr/lib/x86_64-linux-gnu/libc-2.30.so
2020.06.22 21:42:53.691558 [ 219400 ] {} <Fatal> BaseDaemon: 8. /build/obj-x86_64-linux-gnu/../src/Common/Exception.cpp:48: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1581c608 in /usr/bin/clickhouse
2020.06.22 21:42:53.695840 [ 219400 ] {} <Fatal> BaseDaemon: 9. /build/obj-x86_64-linux-gnu/../src/Common/typeid_cast.h:57: std::__1::enable_if<std::is_pointer_v<DB::ColumnConst const*>, DB::ColumnConst const*>::type typeid_cast<DB::ColumnConst const*, DB::IColumn const>(DB::IColumn const*) @ 0x167aacd7 in /usr/bin/clickhouse
2020.06.22 21:42:53.704836 [ 219400 ] {} <Fatal> BaseDaemon: 10. /build/obj-x86_64-linux-gnu/../src/Functions/FunctionsJSON.h:929: DB::JSONExtractKeysAndValuesImpl<DB::DummyJSONParser>::getType(char const*, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) @ 0x1683b541 in /usr/bin/clickhouse
2020.06.22 21:42:53.713513 [ 219400 ] {} <Fatal> BaseDaemon: 11. /build/obj-x86_64-linux-gnu/../src/Functions/FunctionsJSON.h:64: DB::FunctionJSON<DB::NameJSONExtractKeysAndValues, DB::JSONExtractKeysAndValuesImpl>::getReturnTypeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x16833d01 in /usr/bin/clickhouse
2020.06.22 21:42:53.717253 [ 219400 ] {} <Fatal> BaseDaemon: 12. /build/obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:245: DB::DefaultOverloadResolver::getReturnType(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x167a4e89 in /usr/bin/clickhouse
2020.06.22 21:42:53.721089 [ 219400 ] {} <Fatal> BaseDaemon: 13. /build/obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:0: DB::FunctionOverloadResolverAdaptor::getReturnTypeWithoutLowCardinality(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1685b505 in /usr/bin/clickhouse
2020.06.22 21:42:53.724979 [ 219400 ] {} <Fatal> BaseDaemon: 14. /build/obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:631: DB::FunctionOverloadResolverAdaptor::getReturnType(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1685c76b in /usr/bin/clickhouse
2020.06.22 21:42:53.730056 [ 219400 ] {} <Fatal> BaseDaemon: 15. /build/obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:111: DB::FunctionOverloadResolverAdaptor::buildImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1686cf89 in /usr/bin/clickhouse
2020.06.22 21:42:53.734134 [ 219400 ] {} <Fatal> BaseDaemon: 16. /build/obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:116: DB::FunctionOverloadResolverAdaptor::build(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x16860b97 in /usr/bin/clickhouse
2020.06.22 21:42:53.763090 [ 219400 ] {} <Fatal> BaseDaemon: 17. /build/obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:608: DB::ExpressionActions::addImpl(DB::ExpressionAction, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) @ 0x1c472de0 in /usr/bin/clickhouse
2020.06.22 21:42:53.792023 [ 219400 ] {} <Fatal> BaseDaemon: 18. /build/obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:577: DB::ExpressionActions::add(DB::ExpressionAction const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) @ 0x1c4728c3 in /usr/bin/clickhouse
2020.06.22 21:42:53.821231 [ 219400 ] {} <Fatal> BaseDaemon: 19. /build/obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:253: DB::ScopeStack::addAction(DB::ExpressionAction const&) @ 0x1c77bb12 in /usr/bin/clickhouse
2020.06.22 21:42:53.850937 [ 219400 ] {} <Fatal> BaseDaemon: 20. /build/obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:117: DB::ActionsMatcher::Data::addAction(DB::ExpressionAction const&) @ 0x1c784406 in /usr/bin/clickhouse
2020.06.22 21:42:53.868897 [ 257 ] {} <Debug> system.query_thread_log (MergerMutator): Merge sorted 17519 rows, containing 37 columns (37 merged, 0 gathered) in 0.204117567 sec., 85827.9875538591 rows/sec., 77.03 MiB/sec.
2020.06.22 21:42:53.880335 [ 219400 ] {} <Fatal> BaseDaemon: 21. /build/obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:593: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x1c77ef0a in /usr/bin/clickhouse
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers