Skip to content

Another segfault on INSERT into source table for several MATERIALIZED VIEWs. #6245

@banburybill

Description

@banburybill

We are seeing segfaults on INSERT in ClickHouse installed on Ubuntu Xenial from stable deb packages from 19.11.2.7 onwards. From the backtraces I believe several are related, so am reporting these as a single issue. This was discovered while updating from 18.5.1 to 19.11.3.11. So far in our testing it appears 19.10.1.5 does not have the problem.

The segfaults are frequent, but cannot be reliably triggered by a particular insert. At this point we have not managed to isolate a simple method to reproduce, but hope the backtraces may give sufficient clues.

The inserts are to a simple table, but that table is in turn used as the source for a collection of MATERIALIZED VIEWs, using either SummingMergeTree or AggregatingMergeTree.

This may have the same underlying cause as #6244, but I'm not sure, so am filing as a separate issue.

ClickHouse 19.11.3.11:

2019.07.30 12:40:25.074322 [ 64 ] {} <Error> BaseDaemon: ########################################
2019.07.30 12:40:25.074352 [ 64 ] {} <Error> BaseDaemon: (version 19.11.3.11 (official build)) (from thread 7) Received signal Segmentation fault (11).
2019.07.30 12:40:25.074363 [ 64 ] {} <Error> BaseDaemon: Address: 0x18 Access: read. Address not mapped to object.
2019.07.30 12:40:25.136573 [ 64 ] {} <Error> BaseDaemon: 0. /usr/bin/clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x22) [0x781c2a2]
1. /usr/bin/clickhouse-server() [0x3b139ce]
2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f5200e17390]
3. /usr/bin/clickhouse-server(std::_Rb_tree_increment(std::_Rb_tree_node_base*)+0x37) [0xb2402d7]
4. /usr/bin/clickhouse-server(DB::MergeTreeDataPart::remove() const+0x1ab) [0x6a5b26b]
5. /usr/bin/clickhouse-server(DB::MergeTreeData::clearOldPartsFromFilesystem()+0x12e) [0x6a2f98e]
6. /usr/bin/clickhouse-server(DB::StorageMergeTree::backgroundTask()+0x116) [0x698db76]
7. /usr/bin/clickhouse-server(DB::BackgroundProcessingPool::threadFunction()+0x44e) [0x69fc2be]
8. /usr/bin/clickhouse-server() [0x69fcd39]
9. /usr/bin/clickhouse-server(ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>)+0x1af) [0x71c778f]
10. /usr/bin/clickhouse-server() [0xb2ac5bf]
11. /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f5200e0d6ba]
12. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f520063641d]

ClickHouse 19.11.2.7:

2019.07.31 13:20:05.117066 [ 70 ] {} <Error> BaseDaemon: ########################################
2019.07.31 13:20:05.117166 [ 70 ] {} <Error> BaseDaemon: (version 19.11.2.7 (official build)) (from thread 16) Received signal Segmentation fault (11).
2019.07.31 13:20:05.117223 [ 70 ] {} <Error> BaseDaemon: Address: 0x18 Access: read. Address not mapped to object.
2019.07.31 13:20:05.204502 [ 70 ] {} <Error> BaseDaemon: 0. /usr/bin/clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x22) [0x781b0a2]
1. /usr/bin/clickhouse-server() [0x3b1337e]
2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f2497f02390]
3. /usr/bin/clickhouse-server(std::_Rb_tree_increment(std::_Rb_tree_node_base*)+0x37) [0xb23f0d7]
4. /usr/bin/clickhouse-server(DB::MergeTreeDataPart::remove() const+0x1ab) [0x6a5a08b]
5. /usr/bin/clickhouse-server(DB::MergeTreeData::clearOldPartsFromFilesystem()+0x12e) [0x6a2e7ae]
6. /usr/bin/clickhouse-server(DB::StorageMergeTree::backgroundTask()+0x116) [0x698c9b6]
7. /usr/bin/clickhouse-server(DB::BackgroundProcessingPool::threadFunction()+0x44e) [0x69fb0de]
8. /usr/bin/clickhouse-server() [0x69fbb59]
9. /usr/bin/clickhouse-server(ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>)+0x1af) [0x71c659f]
10. /usr/bin/clickhouse-server() [0xb2ab3bf]
11. /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f2497ef86ba]
12. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f249772141d]

Metadata

Metadata

Labels

bugConfirmed user-visible misbehaviour in official releasecrashCrash / segfault / abort

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions