Skip to content

Logical error in codec Delta: value in memory is not of fixed size #12110

@akuzm

Description

@akuzm
CREATE TABLE delta_codec_synthetic
(
    `id` UInt64 CODEC(Delta, ZSTD(1048577))
)
ENGINE = MergeTree()
ORDER BY tuple()

[akuzm-nix] 2020.07.03 15:29:55.317909 [ 174944 ] <Fatal> BaseDaemon: ########################################
[akuzm-nix] 2020.07.03 15:29:55.319439 [ 174944 ] <Fatal> BaseDaemon: (version 20.6.1.1, build id: F54929D398A68BF3) (from thread 172629) (query_id: a5a3c0e2-85d4-4a8c-b769-82a183aeb0d1) Received signal Aborted (6)
[akuzm-nix] 2020.07.03 15:29:55.319915 [ 174944 ] <Fatal> BaseDaemon: 
[akuzm-nix] 2020.07.03 15:29:55.320401 [ 174944 ] <Fatal> BaseDaemon: Stack trace: 0x7f44215c418b 0x7f44215a3859 0x7f44215a3729 0x7f44215b4f36 0x7f44253b37bb 0x7f44163d4ada 0x7f44167a2a69 0x7f44167a4aca 0x7f44167a4a31 0x7f44167a4990 0x7f44167a4920 0x7f44167a3a52 0x7f44167e8513 0x7f44167de9eb 0x7f44167d9632 0x7f44167d8e0e 0x7f4415927206 0x7f44159277f1 0x7f4415929ab6 0x7f441592b9f4 0x7f4415d318da 0x7f4415d3099a 0x7f4412ac2953 0x7f4412ac9812 0x7f4422738d9c 0x7f44227395aa 0x7f442224c173 0x7f442224903d
[akuzm-nix] 2020.07.03 15:29:55.334424 [ 174944 ] <Fatal> BaseDaemon: 4. /build/glibc-YYA7BZ/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51: gsignal @ 0x4618b in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[akuzm-nix] 2020.07.03 15:29:55.335313 [ 174944 ] <Fatal> BaseDaemon: 5. /build/glibc-YYA7BZ/glibc-2.31/stdlib/abort.c:81: abort @ 0x25859 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[akuzm-nix] 2020.07.03 15:29:55.336317 [ 174944 ] <Fatal> BaseDaemon: 6. /build/glibc-YYA7BZ/glibc-2.31/intl/loadmsgcat.c:509: _nl_load_domain.cold @ 0x25729 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[akuzm-nix] 2020.07.03 15:29:55.337074 [ 174944 ] <Fatal> BaseDaemon: 7. ? @ 0x36f36 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
[akuzm-nix] 2020.07.03 15:29:55.337663 [ 174944 ] <Fatal> BaseDaemon: 8. /home/akuzm/ch4/ch/src/Common/Exception.cpp:48: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1b57bb in /home/akuzm/ch4/build-clang10/src/libclickhouse_common_iod.so
[akuzm-nix] 2020.07.03 15:29:55.338774 [ 174944 ] <Fatal> BaseDaemon: 9. /home/akuzm/ch4/ch/src/DataTypes/DataTypeNullable.cpp:500: DB::DataTypeNullable::getSizeOfValueInMemory() const @ 0x37bada in /home/akuzm/ch4/build-clang10/src/libclickhouse_datatypesd.so
[akuzm-nix] 2020.07.03 15:29:55.344357 [ 174944 ] <Fatal> BaseDaemon: 10. /home/akuzm/ch4/ch/src/Compression/CompressionCodecDelta.cpp:142: DB::(anonymous namespace)::getDeltaBytesSize(std::__1::shared_ptr<DB::IDataType const>) @ 0x8da69 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.345064 [ 174944 ] <Fatal> BaseDaemon: 11. /home/akuzm/ch4/ch/src/Compression/CompressionCodecDelta.cpp:161: DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>) const @ 0x8faca in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.345843 [ 174944 ] <Fatal> BaseDaemon: 12. /home/akuzm/ch4/ch/contrib/libcxx/include/type_traits:3519: decltype(std::__1::forward<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0&>(fp)(std::__1::forward<std::__1::shared_ptr<DB::IAST> const&>(fp0), std::__1::forward<std::__1::shared_ptr<DB::IDataType const> >(fp0))) std::__1::__invoke<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const> >(DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>&&) @ 0x8fa31 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.346690 [ 174944 ] <Fatal> BaseDaemon: 13. /home/akuzm/ch4/ch/contrib/libcxx/include/__functional_base:317: std::__1::shared_ptr<DB::ICompressionCodec> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<DB::ICompressionCodec> >::__call<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const> >(DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>&&) @ 0x8f990 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.347558 [ 174944 ] <Fatal> BaseDaemon: 14. /home/akuzm/ch4/ch/contrib/libcxx/include/functional:1540: std::__1::__function::__alloc_func<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0, std::__1::allocator<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0>, std::__1::shared_ptr<DB::ICompressionCodec> (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>&&) @ 0x8f920 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.348380 [ 174944 ] <Fatal> BaseDaemon: 15. /home/akuzm/ch4/ch/contrib/libcxx/include/functional:1714: std::__1::__function::__func<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0, std::__1::allocator<DB::registerCodecDelta(DB::CompressionCodecFactory&)::$_0>, std::__1::shared_ptr<DB::ICompressionCodec> (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>&&) @ 0x8ea52 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.361561 [ 174944 ] <Fatal> BaseDaemon: 16. /home/akuzm/ch4/ch/contrib/libcxx/include/functional:1867: std::__1::__function::__value_func<std::__1::shared_ptr<DB::ICompressionCodec> (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>&&) const @ 0xd3513 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.362409 [ 174944 ] <Fatal> BaseDaemon: 17. /home/akuzm/ch4/ch/contrib/libcxx/include/functional:2473: std::__1::function<std::__1::shared_ptr<DB::ICompressionCodec> (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>) const @ 0xc99eb in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.362952 [ 174944 ] <Fatal> BaseDaemon: 18. /home/akuzm/ch4/ch/src/Compression/CompressionFactory.cpp:106: DB::CompressionCodecFactory::getImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>) const @ 0xc4632 in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.363430 [ 174944 ] <Fatal> BaseDaemon: 19. /home/akuzm/ch4/ch/src/Compression/CompressionFactory.cpp:59: DB::CompressionCodecFactory::get(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IDataType const>, bool) const @ 0xc3e0e in /home/akuzm/ch4/build-clang10/src/libclickhouse_compressiond.so
[akuzm-nix] 2020.07.03 15:29:55.366271 [ 174944 ] <Fatal> BaseDaemon: 20. /home/akuzm/ch4/ch/src/Interpreters/InterpreterCreateQuery.cpp:378: DB::InterpreterCreateQuery::getColumnsDescription(DB::ASTExpressionList const&, DB::Context const&, bool) @ 0x13d1206 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
[akuzm-nix] 2020.07.03 15:29:55.369148 [ 174944 ] <Fatal> BaseDaemon: 21. /home/akuzm/ch4/ch/src/Interpreters/InterpreterCreateQuery.cpp:415: DB::InterpreterCreateQuery::setProperties(DB::ASTCreateQuery&) const @ 0x13d17f1 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
[akuzm-nix] 2020.07.03 15:29:55.372375 [ 174944 ] <Fatal> BaseDaemon: 22. /home/akuzm/ch4/ch/src/Interpreters/InterpreterCreateQuery.cpp:602: DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x13d3ab6 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
[akuzm-nix] 2020.07.03 15:29:55.375799 [ 174944 ] <Fatal> BaseDaemon: 23. /home/akuzm/ch4/ch/src/Interpreters/InterpreterCreateQuery.cpp:792: DB::InterpreterCreateQuery::execute() @ 0x13d59f4 in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
[akuzm-nix] 2020.07.03 15:29:55.398181 [ 174944 ] <Fatal> BaseDaemon: 24. /home/akuzm/ch4/ch/src/Interpreters/executeQuery.cpp:385: DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) @ 0x17db8da in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
[akuzm-nix] 2020.07.03 15:29:55.405188 [ 174944 ] <Fatal> BaseDaemon: 25. /home/akuzm/ch4/ch/src/Interpreters/executeQuery.cpp:644: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0x17da99a in /home/akuzm/ch4/build-clang10/src/libclickhouse_interpretersd.so
[akuzm-nix] 2020.07.03 15:29:55.406361 [ 174944 ] <Fatal> BaseDaemon: 26. /home/akuzm/ch4/ch/src/Server/TCPHandler.cpp:253: DB::TCPHandler::runImpl() @ 0x279953 in /home/akuzm/ch4/build-clang10/src/libclickhouse_serverd.so
[akuzm-nix] 2020.07.03 15:29:55.407652 [ 174944 ] <Fatal> BaseDaemon: 27. /home/akuzm/ch4/ch/src/Server/TCPHandler.cpp:1201: DB::TCPHandler::run() @ 0x280812 in /home/akuzm/ch4/build-clang10/src/libclickhouse_serverd.so
[akuzm-nix] 2020.07.03 15:29:55.408576 [ 174944 ] <Fatal> BaseDaemon: 28. /home/akuzm/ch4/ch/contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x1b7d9c in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Net/lib_poco_netd.so
[akuzm-nix] 2020.07.03 15:29:55.425533 [ 174944 ] <Fatal> BaseDaemon: 29. /home/akuzm/ch4/ch/contrib/poco/Net/src/TCPServerDispatcher.cpp:114: Poco::Net::TCPServerDispatcher::run() @ 0x1b85aa in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Net/lib_poco_netd.so
[akuzm-nix] 2020.07.03 15:29:55.426658 [ 174944 ] <Fatal> BaseDaemon: 30. /home/akuzm/ch4/ch/contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x276173 in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Foundation/lib_poco_foundationd.so
[akuzm-nix] 2020.07.03 15:29:55.427729 [ 174944 ] <Fatal> BaseDaemon: 31. /home/akuzm/ch4/ch/contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x27303d in /home/akuzm/ch4/build-clang10/contrib/poco-cmake/Foundation/lib_poco_foundationd.so
Error on processing query: CREATE TABLE delta_codec_synthetic (`id` UInt64 CODEC(Delta, ZSTD(1048577))) ENGINE = MergeTree() ORDER BY tuple()
Code: 32, e.displayText() = DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000, Stack trace (when copying this message, always include the lines below):

Metadata

Metadata

Labels

bugConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions