Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault of 19.17.7 (related to mismatched types in VIEW and underlying table) #10022

Closed
filimonov opened this issue Apr 2, 2020 · 0 comments
Labels
bug Confirmed user-visible misbehaviour in official release crash Crash / segfault / abort duplicate

Comments

@filimonov
Copy link
Contributor

filimonov commented Apr 2, 2020

Stacktrace 1:
2020.04.02 09:27:09.209411 [ 109 ] {} <Fatal> BaseDaemon: ########################################
2020.04.02 09:27:09.209477 [ 109 ] {} <Fatal> BaseDaemon: (version 19.17.7.52 (official build)) (from thread 71) Received signal Segmentation fault (11).
2020.04.02 09:27:09.209514 [ 109 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
2020.04.02 09:27:09.209551 [ 109 ] {} <Fatal> BaseDaemon: Stack trace: 0x55d7593bd26b 0x55d75a241dbb 0x55d75a242241 0x55d75a1986a5 0x55d75a1993e8 0x55d75a134c3f 0x55d75a1355ed 0x55d75678330c 0x55d75c52bb80 0x7f305b2186db 0x7f305ab3588f
2020.04.02 09:27:09.209647 [ 109 ] {} <Fatal> BaseDaemon: 3. 0x55d7593bd26b DB::IAggregateFunctionHelper<DB::AggregateFunctionNullUnary<true> >::addBatch(unsigned long, char**, unsigned long, DB::IColumn const**, DB::Arena*) const /usr/bin/clickhouse
2020.04.02 09:27:09.209740 [ 109 ] {} <Fatal> BaseDaemon: 4. 0x55d75a241dbb void DB::Aggregator::executeImplBatch<DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true, true> > > >(DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true, true> > >&, DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true, true> > >::State&, DB::Arena*, unsigned long, DB::Aggregator::AggregateFunctionInstruction*) const /usr/bin/clickhouse
2020.04.02 09:27:09.209817 [ 109 ] {} <Fatal> BaseDaemon: 5. 0x55d75a242241 void DB::Aggregator::executeImpl<DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true, true> > > >(DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef, void>, HashTableNoState>, DefaultHash<StringRef, void>, HashTableGrower<8ul>, Allocator<true, true> > >&, DB::Arena*, unsigned long, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> >&, DB::Aggregator::AggregateFunctionInstruction*, bool, char*) const /usr/bin/clickhouse
2020.04.02 09:27:09.209875 [ 109 ] {} <Fatal> BaseDaemon: 6. 0x55d75a1986a5 DB::Aggregator::executeOnBlock(std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >, unsigned long, DB::AggregatedDataVariants&, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> >&, std::vector<std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> >, std::allocator<std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> > > >&, bool&) /usr/bin/clickhouse
2020.04.02 09:27:09.209932 [ 109 ] {} <Fatal> BaseDaemon: 7. 0x55d75a1993e8 DB::Aggregator::executeOnBlock(DB::Block const&, DB::AggregatedDataVariants&, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> >&, std::vector<std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> >, std::allocator<std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*> > > >&, bool&) /usr/bin/clickhouse
2020.04.02 09:27:09.209968 [ 109 ] {} <Fatal> BaseDaemon: 8. 0x55d75a134c3f DB::ParallelInputsProcessor<DB::ParallelAggregatingBlockInputStream::Handler>::thread(std::shared_ptr<DB::ThreadGroupStatus>, unsigned long) /usr/bin/clickhouse
2020.04.02 09:27:09.210027 [ 109 ] {} <Fatal> BaseDaemon: 9. 0x55d75a1355ed ThreadFromGlobalPool::ThreadFromGlobalPool<void (DB::ParallelInputsProcessor<DB::ParallelAggregatingBlockInputStream::Handler>::*)(std::shared_ptr<DB::ThreadGroupStatus>, unsigned long), DB::ParallelInputsProcessor<DB::ParallelAggregatingBlockInputStream::Handler>*, std::shared_ptr<DB::ThreadGroupStatus>, unsigned long&>(void (DB::ParallelInputsProcessor<DB::ParallelAggregatingBlockInputStream::Handler>::*&&)(std::shared_ptr<DB::ThreadGroupStatus>, unsigned long), DB::ParallelInputsProcessor<DB::ParallelAggregatingBlockInputStream::Handler>*&&, std::shared_ptr<DB::ThreadGroupStatus>&&, unsigned long&)::{lambda()#1}::operator()() const /usr/bin/clickhouse
2020.04.02 09:27:09.210066 [ 109 ] {} <Fatal> BaseDaemon: 10. 0x55d75678330c ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>) /usr/bin/clickhouse
2020.04.02 09:27:09.210108 [ 109 ] {} <Fatal> BaseDaemon: 11. 0x55d75c52bb80 ? /usr/bin/clickhouse
2020.04.02 09:27:09.210145 [ 109 ] {} <Fatal> BaseDaemon: 12. 0x7f305b2186db start_thread /lib/x86_64-linux-gnu/libpthread-2.27.so
2020.04.02 09:27:09.210184 [ 109 ] {} <Fatal> BaseDaemon: 13. 0x7f305ab3588f clone /lib/x86_64-linux-gnu/libc-2.27.so

Query is quite complicated, it start appearing after one of VIEWs used in that query the type of column in underlying table was changed like that:

CREATE table x ( x FixedString(2) ) Engine=MergeTree() ORDER BY tuple();
CREATE VIEW y AS select x, dictGet('...', '...', tuple(toString(x))) x_dicted FROM x; -- the query which crashed use that view
CREATE table x_new ( x String ) Engine=MergeTree() ORDER BY tuple();
RENAME TABLE x TO x_old, x_new TO x;

i wasn't able to reproduce it on simple test case fast.

UPD: recreating of VIEW with proper type resolved the issue.

@filimonov filimonov added bug Confirmed user-visible misbehaviour in official release crash Crash / segfault / abort v19.17 labels Apr 2, 2020
@filimonov filimonov changed the title Segfault of 19.17.7 Segfault of 19.17.7 (related to mismarched types in VIEW and underlying table) Apr 2, 2020
@filimonov filimonov changed the title Segfault of 19.17.7 (related to mismarched types in VIEW and underlying table) Segfault of 19.17.7 (related to mismatched types in VIEW and underlying table) Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release crash Crash / segfault / abort duplicate
Projects
None yet
Development

No branches or pull requests

2 participants