[SERVER-23541] Add thread sanitizer support via the new GCC toolchain Created: 05/Apr/16 Updated: 06/Dec/22 Resolved: 29/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive) |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Server Development Platform
|
||||
| Participants: | |||||
| Description |
|
The new GCC 5.3 based toolchain has thread sanitizer support including exceptions. We should try to enable it. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 29/Jun/20 ] |
|
This ticket is subsumed by the linked epic. |
| Comment by Andrew Morrow (Inactive) [ 09/Sep/19 ] |
|
louis.williams - I would expect it to, yes. It probably follows the same format as etc/ubsan.blacklist, and I think --sanitize=thread would already look for etc/tsan.blacklist. You could certainly give it a try. As a word of caution, the challenge with standing up a sanitizer isn't so much getting it running, but that you have to get it to all green on evergreen before it provides value. That can be a much bigger project than it seems. On the other hand, the value of doing so is very great, which is why TSAN has been on our backlog for a long time. |
| Comment by Louis Williams [ 09/Sep/19 ] |
|
acm, that makes sense. Does TSAN support blacklisting files? If so, that would be another option. geert.bosch would need to confirm, but I don't know if our lock manager would pass TSAN either. If blacklisting is an option, however, I think we should start there. |
| Comment by Andrew Morrow (Inactive) [ 09/Sep/19 ] |
|
louis.williams - The barrier to deploying TSAN (which we very much want to do) isn't really the toolchain anymore, now that we have v3. The biggest obstacle is that WT doesn't use a memory model that TSAN understands. Our options are to TSAN a different storage engine (which one?) or to update WT to use the C or C++ memory model explicitly. |
| Comment by Louis Williams [ 29/Aug/19 ] |
|
A thread-sanitizer may have been able to detect this long-standing concurrency bug in the catalog (since 3.4): |