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
Race condition suspected in runtime #2155
Comments
The above code snippet (assuming it does not contain errors) reproduces for me reliably on two machines OSX/Linux an error in the copy_if calculation, which I believe is caused by a race condition somewhere in hpx. |
Note : this is a very high priority for me because when I run the benchmark suite for vtkm, it tests thousands of iterations of algorithms and during these tests I get random segfaults/errors that I cannot explain in terms of faulty algorithms. The HPX unit tests usually only test a small number of iterations and do not show any signs of this error. edit : git commit 483b8a9 is used as the base for the test edit2: the fact that a particular seed triggers an error might mean the algorithm is broken somewhere rather than a race condition? |
This is nonsense. It gives an error even with seq policy and hpx:threads=1 I must have made a mistake in the checks |
The error is which is actually 0xFFFFFFFF80000000 - some sort of overflow is taking place |
@biddisco the error is happening when you iterate over source vector with iota and get signed overrflow (actually, undefined behaviour) |
so a static_cast<> should fix it.... |
@biddisco: the fix might be to do something like
:) |
As a side note, MSVC |
@AntonBikineev I put int |
@biddisco are you still getting segfaults? I've tried the code on OS X and Linux with --hpx:threads=8 and couldn't reproduce. |
I used the iota fix above and the errors are gone. The segfaults are in my main benchmarking code and I tried to reproduce them by making a cut-down test based on the copy_if test. When I got errors with the copy_if test I thought 'aha' this might be a symptom of the same underlying problem (my code calls copy_if etc etc) and it seems like I was chasing a red-herring. |
Closing this issue because although I still have suspicions about races in the runtime, the test above was not relevant. |
The text was updated successfully, but these errors were encountered: