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

[C++] Missing joinable check for thread in AsofJoinNode Destructor #44526

Open
mroz45 opened this issue Oct 24, 2024 · 3 comments
Open

[C++] Missing joinable check for thread in AsofJoinNode Destructor #44526

mroz45 opened this issue Oct 24, 2024 · 3 comments

Comments

@mroz45
Copy link
Contributor

mroz45 commented Oct 24, 2024

Describe the bug, including details regarding any error messages, version, and platform.

In the destructor of the AsofJoinNode class, no check is performed to ensure that the process_thread_ is joinable before calling the join() method. This can lead to an std::system_error exception if the thread has not been initialized, which can happen if the creation of the plan fails.

Component(s)

C++

@mroz45 mroz45 changed the title Missing joinable check for thread in AsofJoinNode Destructor [C++] Missing joinable check for thread in AsofJoinNode Destructor Oct 24, 2024
@raulcd
Copy link
Member

raulcd commented Oct 25, 2024

Here the code being mentioned for context:

virtual ~AsofJoinNode() {
#ifdef ARROW_ENABLE_THREADING
PushProcess(false);
process_thread_.join();
#endif
}

CC @zanmato1984 @westonpace

@zanmato1984
Copy link
Collaborator

Hi @mroz45 , thanks for reporting this. Are you willing to submit a fix? And I can help to review. It's OK if not, then I'll take a look soon.

@mroz45
Copy link
Contributor Author

mroz45 commented Oct 30, 2024

Hi @zanmato1984, I am working on this, and I will add a PR soon.

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

No branches or pull requests

3 participants