Skip to content

Try fix rabbitmq potential leak#44897

Merged
qoega merged 5 commits intoClickHouse:masterfrom
kssenii:rabbitmq-leak
Jan 5, 2023
Merged

Try fix rabbitmq potential leak#44897
qoega merged 5 commits intoClickHouse:masterfrom
kssenii:rabbitmq-leak

Conversation

@kssenii
Copy link
Copy Markdown
Member

@kssenii kssenii commented Jan 4, 2023

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Closes #44840.

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 4, 2023
@antonio2368 antonio2368 self-assigned this Jan 4, 2023
@kssenii
Copy link
Copy Markdown
Member Author

kssenii commented Jan 4, 2023

😢
https://s3.amazonaws.com/clickhouse-test-reports/44897/283388cfa6c155120c865094da62b427ce484077/integration_tests__release__[2/4].html

Running the loop runs all pending callbacks and looks like some callback which touchs handler (lies inside connection wrapper) is touched from the callback when we run the loop in the destructor of connection wrapper class and so it crashes. Love asynchronous libraries 🥲

2023.01.04 15:56:58.716302 [ 333 ] {} <Trace> BaseDaemon: Received signal 11
2023.01.04 15:56:58.716525 [ 719 ] {} <Fatal> BaseDaemon: ########################################
2023.01.04 15:56:58.716556 [ 719 ] {} <Fatal> BaseDaemon: (version 22.13.1.1213, build id: BB9F3795EE551878EC1EEE0489113189126FDA47) (from thread 412) (no query) Received signal Segmentation fault (11)
2023.01.04 15:56:58.716577 [ 719 ] {} <Fatal> BaseDaemon: Address: 0xd0 Access: read. Address not mapped to object.
2023.01.04 15:56:58.716596 [ 719 ] {} <Fatal> BaseDaemon: Stack trace: 0x1522dfb4 0x15226538 0x192fd4d1 0x1931a521 0x193163a8 0x19311d12 0x192febe0 0x1930c9bd 0x19306d55 0x1933a9c1 0x19325b18 0x1522db85 0x1522c125 0x152230e5 0x13f42a8e 0x139203e1 0x139239aa 0x139248ce 0xf27bfb6 0xf281181 0x7fcc129cc609 0x7fcc128f1133
2023.01.04 15:56:58.716635 [ 719 ] {} <Fatal> BaseDaemon: 2. DB::RabbitMQHandler::stopLoop() @ 0x1522dfb4 in /usr/bin/clickhouse
2023.01.04 15:56:58.716644 [ 719 ] {} <Fatal> BaseDaemon: 3. ? @ 0x15226538 in /usr/bin/clickhouse
2023.01.04 15:56:58.716653 [ 719 ] {} <Fatal> BaseDaemon: 4. ? @ 0x192fd4d1 in /usr/bin/clickhouse
2023.01.04 15:56:58.716661 [ 719 ] {} <Fatal> BaseDaemon: 5. ? @ 0x1931a521 in /usr/bin/clickhouse
2023.01.04 15:56:58.716669 [ 719 ] {} <Fatal> BaseDaemon: 6. ? @ 0x193163a8 in /usr/bin/clickhouse
2023.01.04 15:56:58.716680 [ 719 ] {} <Fatal> BaseDaemon: 7. AMQP::ReceivedFrame::processQueueFrame(AMQP::ConnectionImpl*) @ 0x19311d12 in /usr/bin/clickhouse
2023.01.04 15:56:58.716691 [ 719 ] {} <Fatal> BaseDaemon: 8. AMQP::ConnectionImpl::parse(AMQP::Buffer const&) @ 0x192febe0 in /usr/bin/clickhouse
2023.01.04 15:56:58.716699 [ 719 ] {} <Fatal> BaseDaemon: 9. ? @ 0x1930c9bd in /usr/bin/clickhouse
2023.01.04 15:56:58.716710 [ 719 ] {} <Fatal> BaseDaemon: 10. ? @ 0x19306d55 in /usr/bin/clickhouse
2023.01.04 15:56:58.716719 [ 719 ] {} <Fatal> BaseDaemon: 11. uv__io_poll @ 0x1933a9c1 in /usr/bin/clickhouse
2023.01.04 15:56:58.716727 [ 719 ] {} <Fatal> BaseDaemon: 12. uv_run @ 0x19325b18 in /usr/bin/clickhouse
2023.01.04 15:56:58.716735 [ 719 ] {} <Fatal> BaseDaemon: 13. DB::RabbitMQHandler::iterateLoop() @ 0x1522db85 in /usr/bin/clickhouse
2023.01.04 15:56:58.716744 [ 719 ] {} <Fatal> BaseDaemon: 14. DB::RabbitMQConnection::~RabbitMQConnection() @ 0x1522c125 in /usr/bin/clickhouse
2023.01.04 15:56:58.716752 [ 719 ] {} <Fatal> BaseDaemon: 15. ? @ 0x152230e5 in /usr/bin/clickhouse
2023.01.04 15:56:58.716761 [ 719 ] {} <Fatal> BaseDaemon: 16. DB::DatabaseCatalog::dropTableDataTask() @ 0x13f42a8e in /usr/bin/clickhouse
2023.01.04 15:56:58.716770 [ 719 ] {} <Fatal> BaseDaemon: 17. DB::BackgroundSchedulePoolTaskInfo::execute() @ 0x139203e1 in /usr/bin/clickhouse
2023.01.04 15:56:58.716778 [ 719 ] {} <Fatal> BaseDaemon: 18. DB::BackgroundSchedulePool::threadFunction() @ 0x139239aa in /usr/bin/clickhouse
2023.01.04 15:56:58.716786 [ 719 ] {} <Fatal> BaseDaemon: 19. ? @ 0x139248ce in /usr/bin/clickhouse
2023.01.04 15:56:58.716798 [ 719 ] {} <Fatal> BaseDaemon: 20. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xf27bfb6 in /usr/bin/clickhouse
2023.01.04 15:56:58.716806 [ 719 ] {} <Fatal> BaseDaemon: 21. ? @ 0xf281181 in /usr/bin/clickhouse
2023.01.04 15:56:58.716814 [ 719 ] {} <Fatal> BaseDaemon: 22. ? @ 0x7fcc129cc609 in ?
2023.01.04 15:56:58.716822 [ 719 ] {} <Fatal> BaseDaemon: 23. __clone @ 0x7fcc128f1133 in ?

@antonio2368
Copy link
Copy Markdown
Member

But it looks good now, so awesome job

@qoega
Copy link
Copy Markdown
Member

qoega commented Jan 5, 2023

@qoega qoega merged commit e4d4a2d into ClickHouse:master Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RabbitMQConnection direct leak

4 participants