Skip to content

Try to fix deadlock in ThreadPool#24457

Merged
nikitamikhaylov merged 4 commits intoClickHouse:masterfrom
nikitamikhaylov:thread-pool-deadlock
May 26, 2021
Merged

Try to fix deadlock in ThreadPool#24457
nikitamikhaylov merged 4 commits intoClickHouse:masterfrom
nikitamikhaylov:thread-pool-deadlock

Conversation

@nikitamikhaylov
Copy link
Copy Markdown
Member

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed the behavior when query SYSTEM RESTART REPLICA or SYSTEM SYNC REPLICA is being processed infinitely. This was detected on server with extremely little amount of RAM.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label May 24, 2021
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug how I think was here. In case of exception from threads.emplace_front() we don't signal on this event, but a task was added to the queue.

@nikitamikhaylov
Copy link
Copy Markdown
Member Author

@Mergifyio update

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented May 24, 2021

Command update: success

Branch has been successfully updated

@KochetovNicolai KochetovNicolai self-assigned this May 25, 2021
Copy link
Copy Markdown
Member

@KochetovNicolai KochetovNicolai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to me.
Maybe you can add some more comments to avoid such a case in future?

@nikitamikhaylov
Copy link
Copy Markdown
Member Author

@Mergifyio update

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented May 26, 2021

Command update: success

Branch has been successfully updated

@nikitamikhaylov nikitamikhaylov merged commit 0d3462a into ClickHouse:master May 26, 2021
nikitamikhaylov added a commit that referenced this pull request May 28, 2021
Backport #24457 to 21.6: Try to fix deadlock in ThreadPool
nikitamikhaylov added a commit that referenced this pull request May 28, 2021
Backport #24457 to 21.5: Try to fix deadlock in ThreadPool
nikitamikhaylov added a commit that referenced this pull request May 28, 2021
Backport #24457 to 21.4: Try to fix deadlock in ThreadPool
nikitamikhaylov added a commit that referenced this pull request May 31, 2021
Backport #24457 to 21.3: Try to fix deadlock in ThreadPool
nikitamikhaylov added a commit that referenced this pull request May 31, 2021
Backport #24457 to 20.8: Try to fix deadlock in ThreadPool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants