-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-13223: [C++] Fix Thread Sanitizer test failures #10632
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
Conversation
dev/tasks/tasks.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kszucs Does this seem ok?
cpp/src/arrow/util/async_generator.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, we could also not bother with this complication, since worker_thread_id is only used for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but the assert catches an otherwise potentially subtle issue in how BackgroundGenerator is meant to be used. It's not entirely obvious that you aren't allowed to dispose of it from the worker thread and it a fair amount of debugging to discover this root cause.
What was the issue? Is it because the worker thread id might be changing (from set to unset) when the assert in cleanup happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it because the worker thread id might be changing (from set to unset) when the assert in cleanup happens?
Exactly, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this neat trick to turn a thread::id into an int64_t is indeed reliable it might be nice to add int64_t arrow::internal::GetCurrentThreadId(). Probably in thread_pool.h/cc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #10644
|
@github-actions crossbow submit -g cpp |
|
Revision: 6f08ec8c6125422b2d36455d604acd2a6fdefe03 Submitted crossbow builds: ursacomputing/crossbow @ actions-537 |
|
@github-actions crossbow submit -g cpp |
|
Revision: 2b062b03a19ab291ee3401d00333923a6ebaa29f Submitted crossbow builds: ursacomputing/crossbow @ actions-538 |
2b062b0 to
bc4f23f
Compare
|
@github-actions crossbow submit -g cpp |
|
Revision: bc4f23f319ad7922f5a3debb9411d0f6e36fad27 Submitted crossbow builds: ursacomputing/crossbow @ actions-542 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westonpace I had to change this as well, got a sporadic race condition in MergedGeneratorTests/MergedGeneratorTestFixture.MergedLimitedSubscriptions/1.
|
@github-actions crossbow submit -g cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, the Valgrind failure should be fixed if we move computation of the hash into Expresion::Expression(Call)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I had missed the Valgrind failure. My bad.
|
Revision: 8c315e12db500692d42e3c67d078e01f336d12f8 Submitted crossbow builds: ursacomputing/crossbow @ actions-543 |
|
@github-actions crossbow submit -g cpp |
|
Revision: 42c3638600296c3e92b87a82962d23c7a336d578 Submitted crossbow builds: ursacomputing/crossbow @ actions-544 |
Also ensure that the llvm-symbolizer path is correctly set, for useful tracebacks.
42c3638 to
9257932
Compare
|
@github-actions crossbow submit -g cpp |
|
Rebased and fixed conflicts. |
|
Revision: 9257932 Submitted crossbow builds: ursacomputing/crossbow @ actions-545 |
bkietz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@github-actions crossbow submit test-r-linux-valgrind |
|
Revision: 9257932 Submitted crossbow builds: ursacomputing/crossbow @ actions-557
|
Followup to #10632 Closes #10644 from pitrou/ARROW-13244-current-tid Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
Also ensure that the llvm-symbolizer path is correctly set, for useful tracebacks.