Clickhouse: Segfault: alter UInt8 -> Nullable(UInt8)

Created on 30 Aug 2019  ยท  19Comments  ยท  Source: ClickHouse/ClickHouse

I launched this query alter table mytable modify column type Nullable(UInt8); through clickhouse-client that resulted to segfault.

The table's schema is:

CREATE TABLE IF NOT EXISTS mytable
(
    fetched_at DateTime,
    id1 UUID,
    id2 UUID,
    id3 UUID,
    id4 UUID,
    id5 UUID,
    inin UInt64,
    outout UInt64,
    in Nullable(UInt64),
    out Nullable(UInt64),
    type UInt8
)
ENGINE = MergeTree
PARTITION BY toDate(fetched_at)
ORDER BY (id4, id3, id5, id2);

Error log output
2019.08.30 11:47:32.781799 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.781814 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 185) Received signal Segmentation fault (11).
2019.08.30 11:47:32.781835 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.781849 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.781866 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.781878 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 223) Received signal Segmentation fault (11).
2019.08.30 11:47:32.781891 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.781904 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.781933 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.781946 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 164) Received signal Segmentation fault (11).
2019.08.30 11:47:32.781959 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.781971 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.781994 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782006 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 264) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782024 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782041 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782064 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782077 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 289) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782089 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782102 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782127 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782151 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 188) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782163 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782175 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782195 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782211 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 171) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782223 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782235 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782251 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782262 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 276) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782274 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782286 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782310 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782322 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 73) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782334 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782346 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782370 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782381 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 211) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782393 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782405 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:32.782421 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:32.782432 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 147) Received signal Segmentation fault (11).
2019.08.30 11:47:32.782444 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:32.782456 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:33.924241 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:33.924290 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 51) Received signal Segmentation fault (11).
2019.08.30 11:47:33.924314 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:33.924341 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:36.383602 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:36.383650 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 193) Received signal Segmentation fault (11).
2019.08.30 11:47:36.383674 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:36.383701 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:36.978698 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:36.978745 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 126) Received signal Segmentation fault (11).
2019.08.30 11:47:36.978770 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:36.978797 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

2019.08.30 11:47:37.312247 [ 298 ] {} BaseDaemon: ########################################
2019.08.30 11:47:37.312280 [ 298 ] {} BaseDaemon: (version 19.13.1.11 (official build)) (from thread 44) Received signal Segmentation fault (11).
2019.08.30 11:47:37.312295 [ 298 ] {} BaseDaemon: Address: 0x188 Access: read. Address not mapped to object.
2019.08.30 11:47:37.312314 [ 298 ] {} BaseDaemon: 0. clickhouse-server(StackTrace::StackTrace(ucontext_t const&)+0x31) [0x7f58f71]

  1. clickhouse-server() [0x3d9d2fe]
  2. /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7fbb7a8070e0]
  3. clickhouse-server() [0x753e164]
  4. clickhouse-server(DB::DataTypeNullable::enumerateStreams(std::function > const&)> const&, std::vector >&) const+0x9b) [0x6c96f1b]
  5. clickhouse-server(DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >&, bool, std::vector >&)+0xb0) [0x753ac60]
  6. clickhouse-server(DB::MergedColumnOnlyOutputStream::writeSuffixAndGetChecksums()+0x259) [0x70cd9e9]
  7. clickhouse-server(DB::MergeTreeData::alterDataPart(DB::NamesAndTypesList const&, std::vector, std::allocator > > const&, bool, std::unique_ptr >&)+0x7cf) [0x704784f]
  8. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a7) [0x3c74537]
  9. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool::scheduleImpl(std::function)::{lambda()#3}>(ThreadPoolImpl::scheduleImpl(std::function)::{lambda()#3}&&)::{lambda()#1}::operator()() const+0x3e) [0x3c74b1e]
  10. clickhouse-server(ThreadPoolImpl::worker(std::_List_iterator)+0x1a6) [0x3c72046]
  11. clickhouse-server() [0xba2baa0]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4) [0x7fbb7a7fd4a4]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbb7a037d0f]

Version 19.13.1.11

bug crash st-accepted

All 19 comments

More details:

$ addr2line -afiCe clickhouse 0x6c96f1b 0x753ac60
0x0000000006c96f1b
DB::DataTypeNullable::enumerateStreams(std::function<void (std::vector<DB::IDataType::Substream, std::allocator<DB::IDataType::Substream> > const&)> const&, std::vector<DB::IDataType::Substream, std::allocator<DB::IDataType::Substream> >&) const
/usr/include/c++/9/bits/stl_iterator.h:807
??
/usr/include/c++/9/bits/stl_vector.h:827
??
/usr/include/c++/9/bits/stl_vector.h:1143
DB::DataTypeNullable::enumerateStreams(std::function<void (std::vector<DB::IDataType::Substream, std::allocator<DB::IDataType::Substream> > const&)> const&, std::vector<DB::IDataType::Substream, std::allocator<DB::IDataType::Substream> >&) const
/build/obj-x86_64-linux-gnu/../dbms/src/DataTypes/DataTypeNullable.cpp:44
0x000000000753ac60
DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<DB::IDataType const>, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool, std::vector<DB::IDataType::Substream, std::allocator<DB::IDataType::Substream> >&)
/usr/include/c++/9/bits/std_function.h:259
??
/usr/include/c++/9/bits/std_function.h:373
??
/build/obj-x86_64-linux-gnu/../dbms/src/Storages/MergeTree/IMergedBlockOutputStream.cpp:154
DB::IMergedBlockOutputStream::writeFinalMark(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<DB::IDataType const>, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool, std::vector<DB::IDataType::Substream, std::allocator<DB::IDataType::Substream> >&)
/build/obj-x86_64-linux-gnu/../dbms/src/Storages/MergeTree/IMergedBlockOutputStream.cpp:294

@simPod Can you provide table partitions?

@alesapin what exactly do you mean by that?

Your table data which allows to reproduce the issue.

If it's synthetic than generating query/script will be OK.

@simPod is it possible?

@alesapin do you have any simple guide, how to do that? Is SQL insert enought? Any place where to send it, I'd prefer not to upload it to github.

It's better to put table data from filesystem into .tar and send it in any preferred form to [email protected] (it is private e-mail address) or upload to Dropbox or Google Drive and send a link.

@simPod any updates?

@alesapin just mailed the dropbox link to the email address given.

@simPod, does segfault reproduced only once or it's constant error?

It's constant, just reproduced on my instance. @alesapin

I cannot reproduce it locally :( Maybe my table scheme is incorrect? You send only partitions without .sql file, but they contain other columns. Also, maybe I'm doing another alter. Can I paste here deduced table scheme and ALTER query with real column names, so you can validate them?

@alesapin

CREATE TABLE default.counters_bytes (`fetched_at` DateTime, `device_id` UUID, `port_id` UUID, `contract_id` UUID, `customer_id` UUID, `server_id` UUID, `counter_in` UInt64, `counter_out` UInt64, `bps_in` Nullable(UInt64), `bps_out` Nullable(UInt64), `server_port_link_type` UInt8, `peering_cz_traffic_type` LowCardinality(String)) ENGINE = MergeTree PARTITION BY toDate(fetched_at) ORDER BY (contract_id, customer_id, server_id, port_id) SETTINGS index_granularity = 8192

alter table counters_bytes modify column server_port_link_type Nullable(UInt8);

Still cannot reproduce:

click.sas.yp-c.yandex.net :) select count(*) from counters_bytes;                                                                                                                                                                               

SELECT count(*)
FROM counters_bytes

โ”Œโ”€โ”€count()โ”€โ”
โ”‚ 57451567 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

1 rows in set. Elapsed: 0.056 sec. Processed 57.45 million rows, 57.48 MB (1.03 billion rows/s., 1.03 GB/s.)

click.sas.yp-c.yandex.net :) alter table counters_bytes modify column server_port_link_type Nullable(UInt8);
ALTER TABLE counters_bytes
    MODIFY COLUMN 
    `server_port_link_type` Nullable(UInt8)


Ok.

0 rows in set. Elapsed: 0.060 sec.

Is server under heavy load? Can you show some information from system tables?
SELECT * FROM system.mutations\G
SELECT * FROM system.merges\G
?

@alesapin avg cpu load is around 20 %

some mutations are happening from time to but all are is_done=1

Also there's nothing stuck in merges table, all is merged within few seconds max.

Not sure what might be the cause, maybe there are some partitions that cause problems but it's not the one I sent to you?

Yes, maybe you sent other partitions. Also, maybe not all columns exist since table creation, especially server_port_link_type? Maybe some of them are added with ALTER TABLE ADD COLUMN query? If so try to find partition with the smallest number of columns.

Can you try to reproduce it on your machine with sent partitions?
Create table copy with your CREATE QUERY, move partition files to clickhouse's data directory mv 2019* /var/lib/clickhouse/data/default/counters_bytes_copy/ and restart server. After that try to execute ALTER query.

I managed to reproduce, sending new email with data.

reproduced on my machine.

Was this page helpful?
0 / 5 - 0 ratings