Skip to content

Nullptr dereference in destructor #35752

@alexey-milovidov

Description

@alexey-milovidov
milovidov@milovidov-nix:~/work/ClickHouse$ clickhouse-client 
ClickHouse client version 22.4.1.1.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 22.4.1 revision 54455.

milovidov-nix :) CREATE TABLE transactions_temp_0
                 (
                     `event_time` DateTime,
                     `timestamp` DateTime,
                     `frb` Int8,
                     `is_test_account` Int8,
                     `country` LowCardinality(String),
                     `type` LowCardinality(String),
                     `language` LowCardinality(String),
                     `platform` LowCardinality(String),
                     `currency` LowCardinality(String),
                     `game_id` LowCardinality(String),
                     `casino_session_id` String,
                     `round_id` String,
                     `trans_id` String,
                     `account_id` String,
                     `casino_id` Int32,
                     `provider_id` Int32,
                     `amount` Decimal(18, 6),
                     `bonus_money` Decimal(18, 6),
                     `real_money` Decimal(18, 6),
                     `response_time` Int64,
                     `groove_status` String,
                     `http_status` Nullable(String),
                     `raw_request` Nullable(String),
                     `raw_response` Nullable(String),
                     `is_valid_response` Nullable(String),
                     `error_message` Nullable(String),
                     `unexpected_error` Nullable(String),
                     `time_before` Nullable(String),
                     `time_after` Nullable(String)
                 )
                 ENGINE = MergeTree
                 PARTITION BY toYYYYMMDD(event_time)
                 ORDER BY (casino_id, game_id, round_id, trans_id, type, groove_status)
                 TTL toStartOfHour(event_time) + toIntervalHour(2)
                 SETTINGS index_granularity = 8192

CREATE TABLE transactions_temp_0
(
    `event_time` DateTime,
    `timestamp` DateTime,
    `frb` Int8,
    `is_test_account` Int8,
    `country` LowCardinality(String),
    `type` LowCardinality(String),
    `language` LowCardinality(String),
    `platform` LowCardinality(String),
    `currency` LowCardinality(String),
    `game_id` LowCardinality(String),
    `casino_session_id` String,
    `round_id` String,
    `trans_id` String,
    `account_id` String,
    `casino_id` Int32,
    `provider_id` Int32,
    `amount` Decimal(18, 6),
    `bonus_money` Decimal(18, 6),
    `real_money` Decimal(18, 6),
    `response_time` Int64,
    `groove_status` String,
    `http_status` Nullable(String),
    `raw_request` Nullable(String),
    `raw_response` Nullable(String),
    `is_valid_response` Nullable(String),
    `error_message` Nullable(String),
    `unexpected_error` Nullable(String),
    `time_before` Nullable(String),
    `time_after` Nullable(String)
)
ENGINE = MergeTree
PARTITION BY toYYYYMMDD(event_time)
ORDER BY (casino_id, game_id, round_id, trans_id, type, groove_status)
TTL toStartOfHour(event_time) + toIntervalHour(2)
SETTINGS index_granularity = 8192

Query id: 23da91bd-b37d-4457-b2bd-e2eef1ea0511

Ok.

0 rows in set. Elapsed: 0.019 sec. 

milovidov-nix :) INSERT INTO transactions_temp_0
                  SELECT NOW() AS event_time , toDateTime(timestamp) AS timestamp, frb, is_test_account, country, IF(type = 'wager' AND round_id LIKE '%', 'tip', type), language, platform, 1,
                  game_id, casino_session_id, ifNull(round_id, ''), ifNull(trans_id, ''), account_id ,casino_id, provider_id, ifNull(amount, toDecimal64(0, 6)), bonus_money, real_money, ifNull(response_time, 0), multiIf(isNull(raw_request), '200', isNull(grooveStatus), '500', toString(grooveStatus)) AS groove_status, toString(httpStatus) AS http_status, raw_request, raw_response,
                  if(isNull(IsValidResponse), '0', toString(IsValidResponse)) AS is_valid_response, ErrorMessage AS error_message, unexpectedError AS unexpected_error, timeBefore AS time_before, timeAfter AS time_after 
                  FROM generateRandom(
                  'type String,
                  frb BOOLEAN,
                  round_id Nullable(String),
                  trans_id Nullable(String),
                  amount Nullable(Decimal(16, 6)),
                  account_id String,
                  casino_id Int32,
                  provider_id Int32,
                  casino_session_id String,
                  provider_session_id String,
                  currency String,
                  game_id String,
                  language String,
                  platform String,
                  country String,
                  is_test_account BOOLEAN,
                  bonus_money Decimal(16, 6),
                  real_money Decimal(16, 6),
                  timestamp String,
                  IsValidResponse Nullable(BOOLEAN),
                  ErrorMessage Nullable(String),
                  grooveStatus Nullable(Int32),
                  httpStatus  Nullable(Int32),
                  raw_request Nullable(String),
                  raw_response Nullable(String),
                  timeBefore Nullable(String),
                  timeAfter Nullable(String),
                  unexpectedError Nullable(String),
                  response_time Nullable(Int64)') SETTINGS  input_format_skip_unknown_fields=1, input_format_allow_errors_ratio=0.5, input_format_allow_errors_num=1000000, max_threads = 2

INSERT INTO transactions_temp_0 SELECT
    NOW() AS event_time,
    toDateTime(timestamp) AS timestamp,
    frb,
    is_test_account,
    country,
    IF((type = 'wager') AND (round_id LIKE '%'), 'tip', type),
    language,
    platform,
    1,
    game_id,
    casino_session_id,
    ifNull(round_id, ''),
    ifNull(trans_id, ''),
    account_id,
    casino_id,
    provider_id,
    ifNull(amount, toDecimal64(0, 6)),
    bonus_money,
    real_money,
    ifNull(response_time, 0),
    multiIf(raw_request IS NULL, '200', grooveStatus IS NULL, '500', toString(grooveStatus)) AS groove_status,
    toString(httpStatus) AS http_status,
    raw_request,
    raw_response,
    if(IsValidResponse IS NULL, '0', toString(IsValidResponse)) AS is_valid_response,
    ErrorMessage AS error_message,
    unexpectedError AS unexpected_error,
    timeBefore AS time_before,
    timeAfter AS time_after
FROM generateRandom('type String,\n frb BOOLEAN,\n round_id Nullable(String),\n trans_id Nullable(String),\n amount Nullable(Decimal(16, 6)),\n account_id String,\n casino_id Int32,\n provider_id Int32,\n casino_session_id String,\n provider_session_id String,\n currency String,\n game_id String,\n language String,\n platform String,\n country String,\n is_test_account BOOLEAN,\n bonus_money Decimal(16, 6),\n real_money Decimal(16, 6),\n timestamp String,\n IsValidResponse Nullable(BOOLEAN),\n ErrorMessage Nullable(String),\n grooveStatus Nullable(Int32),\n httpStatus  Nullable(Int32),\n raw_request Nullable(String),\n raw_response Nullable(String),\n timeBefore Nullable(String),\n timeAfter Nullable(String),\n unexpectedError Nullable(String),\n response_time Nullable(Int64)')
SETTINGS input_format_skip_unknown_fields = 1, input_format_allow_errors_ratio = 0.5, input_format_allow_errors_num = 1000000, max_threads = 2
SETTINGS input_format_skip_unknown_fields = 1, input_format_allow_errors_ratio = 0.5, input_format_allow_errors_num = 1000000, max_threads = 2

Query id: acb9976c-5b80-463c-97be-9b86615fd52b

[milovidov-nix] 2022.03.30 11:40:32.679020 [ 15678 ] <Fatal> BaseDaemon: ########################################
[milovidov-nix] 2022.03.30 11:40:32.679167 [ 15678 ] <Fatal> BaseDaemon: (version 22.4.1.1, build id: 90783A368E745446D54C1BBFFCA3CF40509ED180) (from thread 15389) (query_id: acb9976c-5b80-463c-97be-9b86615fd52b) (query: INSERT INTO transactions_temp_0
 SELECT NOW() AS event_time , toDateTime(timestamp) AS timestamp, frb, is_test_account, country, IF(type = 'wager' AND round_id LIKE '%', 'tip', type), language, platform, 1,
 game_id, casino_session_id, ifNull(round_id, ''), ifNull(trans_id, ''), account_id ,casino_id, provider_id, ifNull(amount, toDecimal64(0, 6)), bonus_money, real_money, ifNull(response_time, 0), multiIf(isNull(raw_request), '200', isNull(grooveStatus), '500', toString(grooveStatus)) AS groove_status, toString(httpStatus) AS http_status, raw_request, raw_response,
 if(isNull(IsValidResponse), '0', toString(IsValidResponse)) AS is_valid_response, ErrorMessage AS error_message, unexpectedError AS unexpected_error, timeBefore AS time_before, timeAfter AS time_after 
 FROM generateRandom(
 'type String,
 frb BOOLEAN,
 round_id Nullable(String),
 trans_id Nullable(String),
 amount Nullable(Decimal(16, 6)),
 account_id String,
 casino_id Int32,
 provider_id Int32,
 casino_session_id String,
 provider_session_id String,
 currency String,
 game_id String,
 language String,
 platform String,
 country String,
 is_test_account BOOLEAN,
 bonus_money Decimal(16, 6),
 real_money Decimal(16, 6),
 timestamp String,
 IsValidResponse Nullable(BOOLEAN),
 ErrorMessage Nullable(String),
 grooveStatus Nullable(Int32),
 httpStatus  Nullable(Int32),
 raw_request Nullable(String),
 raw_response Nullable(String),
 timeBefore Nullable(String),
 timeAfter Nullable(String),
 unexpectedError Nullable(String),
 response_time Nullable(Int64)') SETTINGS  input_format_skip_unknown_fields=1, input_format_allow_errors_ratio=0.5, input_format_allow_errors_num=1000000, max_threads = 2) Received signal Segmentation fault (11)
[milovidov-nix] 2022.03.30 11:40:32.679309 [ 15678 ] <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
[milovidov-nix] 2022.03.30 11:40:32.679398 [ 15678 ] <Fatal> BaseDaemon: Stack trace: 0x1374754e 0xad06ff4 0x132458ca 0x13243c1b 0x135f26d4 0x135f0c6c 0x13ef784d 0x13f04ef9 0x161836e7 0x16183ba5 0x162ec167 0x162e9da3 0x7fc3b22c66db 0x7fc3b1fef71f
[milovidov-nix] 2022.03.30 11:40:32.850703 [ 15678 ] <Fatal> BaseDaemon: 3.1. inlined from ./build/./contrib/boost/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp:43: boost::detail::atomic_count::operator--()
[milovidov-nix] 2022.03.30 11:40:32.850830 [ 15678 ] <Fatal> BaseDaemon: 3.2. inlined from ./contrib/boost/boost/smart_ptr/intrusive_ref_counter.hpp:87: boost::sp_adl_block::thread_safe_counter::decrement(boost::detail::atomic_count&)
[milovidov-nix] 2022.03.30 11:40:32.850911 [ 15678 ] <Fatal> BaseDaemon: 3.3. inlined from ./contrib/boost/boost/smart_ptr/intrusive_ref_counter.hpp:172: void boost::sp_adl_block::intrusive_ptr_release<DB::IColumn, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<DB::IColumn, boost::sp_adl_block::thread_safe_counter> const*)
[milovidov-nix] 2022.03.30 11:40:32.851018 [ 15678 ] <Fatal> BaseDaemon: 3.4. inlined from ./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:98: ~intrusive_ptr
[milovidov-nix] 2022.03.30 11:40:32.851102 [ 15678 ] <Fatal> BaseDaemon: 3.5. inlined from ./src/Common/COW.h:195: ~chameleon_ptr
[milovidov-nix] 2022.03.30 11:40:32.851185 [ 15678 ] <Fatal> BaseDaemon: 3.6. inlined from ./src/Columns/ColumnNullable.h:26: ~ColumnNullable
[milovidov-nix] 2022.03.30 11:40:32.851270 [ 15678 ] <Fatal> BaseDaemon: 3. ./src/Columns/ColumnNullable.h:26: DB::ColumnNullable::~ColumnNullable() @ 0x1374754e in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:32.884423 [ 15678 ] <Fatal> BaseDaemon: 4.1. inlined from ./build/./contrib/boost/boost/smart_ptr/intrusive_ref_counter.hpp:0: void boost::sp_adl_block::intrusive_ptr_release<DB::IColumn, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<DB::IColumn, boost::sp_adl_block::thread_safe_counter> const*)
[milovidov-nix] 2022.03.30 11:40:32.884459 [ 15678 ] <Fatal> BaseDaemon: 4.2. inlined from ./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:98: ~intrusive_ptr
[milovidov-nix] 2022.03.30 11:40:32.884475 [ 15678 ] <Fatal> BaseDaemon: 4.3. inlined from ./src/Core/ColumnWithTypeAndName.h:19: ~ColumnWithTypeAndName
[milovidov-nix] 2022.03.30 11:40:32.884492 [ 15678 ] <Fatal> BaseDaemon: 4.4. inlined from ./contrib/libcxx/include/memory:891: std::__1::allocator<DB::ColumnWithTypeAndName>::destroy(DB::ColumnWithTypeAndName*)
[milovidov-nix] 2022.03.30 11:40:32.884566 [ 15678 ] <Fatal> BaseDaemon: 4.5. inlined from ./contrib/libcxx/include/__memory/allocator_traits.h:539: void std::__1::allocator_traits<std::__1::allocator<DB::ColumnWithTypeAndName> >::__destroy<DB::ColumnWithTypeAndName>(std::__1::integral_constant<bool, true>, std::__1::allocator<DB::ColumnWithTypeAndName>&, DB::ColumnWithTypeAndName*)
[milovidov-nix] 2022.03.30 11:40:32.884581 [ 15678 ] <Fatal> BaseDaemon: 4.6. inlined from ./contrib/libcxx/include/__memory/allocator_traits.h:487: void std::__1::allocator_traits<std::__1::allocator<DB::ColumnWithTypeAndName> >::destroy<DB::ColumnWithTypeAndName>(std::__1::allocator<DB::ColumnWithTypeAndName>&, DB::ColumnWithTypeAndName*)
[milovidov-nix] 2022.03.30 11:40:32.884601 [ 15678 ] <Fatal> BaseDaemon: 4.7. inlined from ./contrib/libcxx/include/vector:428: std::__1::__vector_base<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >::__destruct_at_end(DB::ColumnWithTypeAndName*)
[milovidov-nix] 2022.03.30 11:40:32.884623 [ 15678 ] <Fatal> BaseDaemon: 4.8. inlined from ./contrib/libcxx/include/vector:371: std::__1::__vector_base<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >::clear()
[milovidov-nix] 2022.03.30 11:40:32.884643 [ 15678 ] <Fatal> BaseDaemon: 4. ./contrib/libcxx/include/vector:465: std::__1::__vector_base<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >::~__vector_base() @ 0xad06ff4 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:32.904719 [ 15678 ] <Fatal> BaseDaemon: 5.1. inlined from ./build/./contrib/libcxx/include/memory:3211: ~shared_ptr
[milovidov-nix] 2022.03.30 11:40:32.904758 [ 15678 ] <Fatal> BaseDaemon: 5. ./src/Interpreters/IInterpreterUnionOrSelectQuery.h:35: DB::IInterpreterUnionOrSelectQuery::~IInterpreterUnionOrSelectQuery() @ 0x132458ca in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:32.967116 [ 15678 ] <Fatal> BaseDaemon: 6. ./build/./src/Interpreters/InterpreterInsertQuery.cpp:0: DB::InterpreterInsertQuery::execute() @ 0x13243c1b in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.083993 [ 15678 ] <Fatal> BaseDaemon: 7. ./build/./src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x135f26d4 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.121325 [ 15678 ] <Fatal> BaseDaemon: 8. ./build/./src/Interpreters/executeQuery.cpp:986: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x135f0c6c in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.198994 [ 15678 ] <Fatal> BaseDaemon: 9. ./build/./src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x13ef784d in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.244329 [ 15678 ] <Fatal> BaseDaemon: 10. ./build/./src/Server/TCPHandler.cpp:1769: DB::TCPHandler::run() @ 0x13f04ef9 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.248374 [ 15678 ] <Fatal> BaseDaemon: 11. ./build/./contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x161836e7 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.260114 [ 15678 ] <Fatal> BaseDaemon: 12.1. inlined from ./build/./contrib/libcxx/include/memory:1397: std::__1::default_delete<Poco::Net::TCPServerConnection>::operator()(Poco::Net::TCPServerConnection*) const
[milovidov-nix] 2022.03.30 11:40:33.260154 [ 15678 ] <Fatal> BaseDaemon: 12.2. inlined from ./contrib/libcxx/include/memory:1658: std::__1::unique_ptr<Poco::Net::TCPServerConnection, std::__1::default_delete<Poco::Net::TCPServerConnection> >::reset(Poco::Net::TCPServerConnection*)
[milovidov-nix] 2022.03.30 11:40:33.260168 [ 15678 ] <Fatal> BaseDaemon: 12.3. inlined from ./contrib/libcxx/include/memory:1612: ~unique_ptr
[milovidov-nix] 2022.03.30 11:40:33.260179 [ 15678 ] <Fatal> BaseDaemon: 12. ./contrib/poco/Net/src/TCPServerDispatcher.cpp:116: Poco::Net::TCPServerDispatcher::run() @ 0x16183ba5 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.279080 [ 15678 ] <Fatal> BaseDaemon: 13. ./build/./contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x162ec167 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.289034 [ 15678 ] <Fatal> BaseDaemon: 14.1. inlined from ./build/./contrib/poco/Foundation/include/Poco/SharedPtr.h:156: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >::assign(Poco::Runnable*)
[milovidov-nix] 2022.03.30 11:40:33.289101 [ 15678 ] <Fatal> BaseDaemon: 14.2. inlined from ./contrib/poco/Foundation/include/Poco/SharedPtr.h:208: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >::operator=(Poco::Runnable*)
[milovidov-nix] 2022.03.30 11:40:33.289133 [ 15678 ] <Fatal> BaseDaemon: 14. ./contrib/poco/Foundation/src/Thread_POSIX.cpp:360: Poco::ThreadImpl::runnableEntry(void*) @ 0x162e9da3 in /home/milovidov/work/ClickHouse/build/programs/clickhouse
[milovidov-nix] 2022.03.30 11:40:33.289176 [ 15678 ] <Fatal> BaseDaemon: 15. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
[milovidov-nix] 2022.03.30 11:40:33.289295 [ 15678 ] <Fatal> BaseDaemon: 16. /build/glibc-S9d2JN/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97: clone @ 0x12171f in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
[milovidov-nix] 2022.03.30 11:40:33.436818 [ 15678 ] <Fatal> BaseDaemon: Calculated checksum of the binary: ADE2EF6CE50241A16CA11E1B8074D0E0. There is no information about the reference checksum.
Exception on client:
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)

Connecting to localhost:9000 as user default.
Code: 210. DB::NetException: Connection refused (localhost:9000). (NETWORK_ERROR)

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasemajor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions