Skip to content

ARROW-15593: [C++] Fix a race condition in the thread pool#12350

Closed
framlog wants to merge 1 commit intoapache:masterfrom
framlog:master
Closed

ARROW-15593: [C++] Fix a race condition in the thread pool#12350
framlog wants to merge 1 commit intoapache:masterfrom
framlog:master

Conversation

@framlog
Copy link
Copy Markdown

@framlog framlog commented Feb 7, 2022

Test Plan: Manually

This closes #12329.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 7, 2022

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 7, 2022

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

Comment thread cpp/src/arrow/util/thread_pool.h Outdated
@pitrou pitrou changed the title ARROW-15593: [C++] fixes a race condition in the thread pool ARROW-15593: [C++] Fix a race condition in the thread pool Feb 7, 2022
int capacity = 0;
if (current_pid != old_pid) {
// FIXME: It may get deadlock here if users fork processes while the parent runs
// in the middle of resetting states.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FTR, I'm working on a better fix for this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Great. Feel free to close this then.

@pitrou
Copy link
Copy Markdown
Member

pitrou commented Feb 7, 2022

See PR #12358. The tests I added there sometimes fail with this PR.

@cyb70289
Copy link
Copy Markdown
Contributor

cyb70289 commented Feb 8, 2022

Close this PR as it's fixed in #12358.
Thanks @framlog to investigate this tricky issue !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An unhandled race condition exists in ThreadPool

3 participants