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
Segmentation fault in dealii::Threads::Task<...>::TaskData::~TaskData() with libc++ #15478
Comments
Thanks for the investigation. As I've not written the code, could you please elaborate on
More precisely, where are you seeing the reliance on implementation details, where one could start to look? Is it the fact that dealii/include/deal.II/base/thread_management.h Lines 1046 to 1067 in 4ee9f01
|
@kronbichler The difference that I can see between the cppreference example und our implementation is the fact that we move the promise into a lambda for the But apart from that - I don't know what I was writing any more. It was very late. |
Yes, this was my recollection as well. @bangerth you originally wrote the code in question, any comment on how to proceed? I would suggest to try to keep the |
The thing is that the
So when in the lambda declaration we do
we don't actually move the object, we just transfer ownership from a |
The error happens in the destructor of the |
But I think I see what's happening. |
There are two peculiarly failing tests on the Clang-16 libc++ regression tester variant:
multithreading/task_01_exception
: https://cdash.dealii.org/test/669690multithreading/task_01_exception_02
: https://cdash.dealii.org/test/671376They are caused by an invalid read of the pthread mutex locking mechanism with the following stacktrace:
The code surrounding this issue is quite tricky because it relies on implementation details not guaranteed by the standard. BUT, the
std::future
in question [1] should still be alive when this lock is taken...I will set this issue to high priority for the time being - simply because I think this is important to figure out for the release (and once this is fixed, we should have zero failing tests for the clang-16 libc++ regression tester. At least apart from a small amount of test failures triggered by bugs in external libraries.)
[1] https://github.com/dealii/dealii/blob/master/include/deal.II/base/thread_management.h#L1427
In reference to #15383
The text was updated successfully, but these errors were encountered: