ClickHouse: Segmentation fault when a query to a distributed table is merging data from shards
19.3.3.26 19.9.3.31 The query groups data by a String column. The initiator crashes when it is merging results from the shards.
2019.08.23 12:43:31.685382 [ 50 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> ParallelAggregatingBlockInputStream: Aggregating
2019.08.23 12:43:31.686828 [ 63 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> Aggregator: Aggregation method: key_string
2019.08.23 12:43:31.686847 [ 62 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> Aggregator: Aggregation method: key_string
2019.08.23 12:43:31.693262 [ 50 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> ParallelAggregatingBlockInputStream: Aggregated. 157588 to 10357 rows (from 2.131 MiB) in 0.008 sec. (20135750.336 rows/sec., 272.275 MiB/sec.)
2019.08.23 12:43:31.693288 [ 50 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> ParallelAggregatingBlockInputStream: Aggregated. 229175 to 14401 rows (from 3.102 MiB) in 0.008 sec. (29282753.656 rows/sec., 396.396 MiB/sec.)
2019.08.23 12:43:31.693296 [ 50 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> ParallelAggregatingBlockInputStream: Aggregated. 0 to 0 rows (from 0.000 MiB) in 0.008 sec. (0.000 rows/sec., 0.000 MiB/sec.)
2019.08.23 12:43:31.693304 [ 50 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> ParallelAggregatingBlockInputStream: Total aggregated. 386763 rows (from 5.233 MiB) in 0.008 sec. (49418503.991 rows/sec., 668.671 MiB/sec.)
2019.08.23 12:43:31.693309 [ 50 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> Aggregator: Merging aggregated data
...
2019.08.23 12:43:32.385399 [ 59 ] {e1f857f8-785f-4cbd-a536-32a2b799ff4c} <Trace> Aggregator: Merging partially aggregated blocks (bucket = -1).
2019.08.23 12:43:32.389026 [ 65 ] {} <Error> BaseDaemon: ########################################
2019.08.23 12:43:32.389063 [ 65 ] {} <Error> BaseDaemon: (version 19.13.3.26 (official build)) (from thread 59) Received signal Segmentation fault (11).
2019.08.23 12:43:32.389078 [ 65 ] {} <Error> BaseDaemon: Address: 0x26 Access: read. Address not mapped to object.
2019.08.23 12:43:32.417367 [ 65 ] {} <Error> BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f6b631]
1. clickhouse-server() [0x3da132e]
2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0) [0x7f9e1a21d0c0]
3. clickhouse-server(CityHash_v1_0_2::CityHash64(char const*, unsigned long)+0x2a) [0x7f6deaa]
4. clickhouse-server(void DB::Aggregator::mergeStreamsImplCase<false, DB::AggregationMethodString<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, StringRefHash64, HashTableNoState>, StringRefHash64, HashTableGrower<8ul>, AllocatorWithHint<true, AllocatorHints::DefaultHint, 67108864ul> > >, HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, StringRefHash64, HashTableNoState>, StringRefHash64, HashTableGrower<8ul>, AllocatorWithHint<true, AllocatorHints::DefaultHint, 67108864ul> > >(DB::Block&, DB::Arena*, DB::AggregationMethodString<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, StringRefHash64, HashTableNoState>, StringRefHash64, HashTableGrower<8ul>, AllocatorWithHint<true, AllocatorHints::DefaultHint, 67108864ul> > >&, HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, StringRefHash64, HashTableNoState>, StringRefHash64, HashTableGrower<8ul>, AllocatorWithHint<true, AllocatorHints::DefaultHint, 67108864ul> >&, char*) const+0x20e) [0x7434b5e]
5. clickhouse-server(DB::Aggregator::mergeBlocks(std::__cxx11::list<DB::Block, std::allocator<DB::Block> >&, bool)+0x10eb) [0x73a6aeb]
6. clickhouse-server(DB::MergingAggregatedMemoryEfficientBlockInputStream::mergeThread(std::shared_ptr<DB::ThreadGroupStatus>)+0x24c) [0x734390c]
7. clickhouse-server() [0x734429d]
8. clickhouse-server(ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::_List_iterator<ThreadFromGlobalPool>)+0x1a7) [0x3c785e7]
9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool<ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::function<void ()>, int, std::optional<unsigned long>)::{lambda()#3}>(ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::function<void ()>, int, std::optional<unsigned long>)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c78bce]
10. clickhouse-server(ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>)+0x1a6) [0x3c760f6]
11. clickhouse-server() [0xba3e1a0]
12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x7494) [0x7f9e1a213494]
13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f9e19a4dacf]
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (13 by maintainers)
Commits related to this issue
- Added test for Distributed table with Seting looking at tables with LowCardinality(String) in presense of memory efficient aggregation setting #6638 — committed to ClickHouse/ClickHouse by alexey-milovidov 4 years ago
test_cluster_two_shards is enough
yes
not necessary
yes
Here is what I got:
I think that there may be incorrect types for LowCardinality, i.e. missing
getDictionaryType().get(), but need to verify, I looked only briefly for now