sandialabs / qthreads

Lightweight locality-aware user-level threading runtime.
https://www.sandia.gov/qthreads/
Other
169 stars 34 forks source link

Thread Sanitizer Interop #249

Open insertinterestingnamehere opened 6 months ago

insertinterestingnamehere commented 6 months ago

This adds the API calls needed to help the thread sanitizer correctly carry its happens-before relationships across context swaps.

insertinterestingnamehere commented 6 months ago

Okay, doing another round of careful review of the fences in FEBs seems to have fixed the bugs I was trying to address here. On the other hand, this patch is still causing some mysterious issues. The interface I'm using is poorly documented so it's hard to say for sure if I'm using it correctly. I'm going to leave this open for a bit in case I need to come back to it, but for now I'm going to try to just move on without it.

insertinterestingnamehere commented 5 months ago

Rebased to depend on #256 to avoid conflicts.

insertinterestingnamehere commented 5 months ago

Okay, I think this is at least nominally working. There's something wrong where if we free the tsan fiber objects at the end it segfaults which is bizarre. Maybe something's getting double-freed during runtime cleanup.

insertinterestingnamehere commented 5 months ago

Nevermind, that was just a testing failure causing a false success. Marking this as a draft again for more debugging.

insertinterestingnamehere commented 1 month ago

Okay, this still needs some restructuring for clarity, but it is actually working now.