TSAN reports parser script issue
The util/parse_tsan.py
script has an issue when translating the original mutex identifiers into new sequential identifiers.
For example, the Cycle in lock order graph: M0 (0x7b2000014a20) => M1 (0x7b5400041be0) => M2 (0x7b2400024c78) => M3 (0x7b7c00003808) => M0
line is converted to Cycle in lock order graph: M4 (0x000000000001) => M4 (0x000000000002) => M4 (0x000000000003) => M4 (0x000000000004) => M4
.
Quoting @michal:
take a line like this:
Cycle in lock order graph: M0 (0x7b2000014a20) => M1 (0x7b5400041be0) => M2 (0x7b2400024c78) => M3 (0x7b7c00003808) => M0
what the code does is it creates a table of "mutex identifier translations":
"M0" => 1 "M1" => 2 "M2" => 3 "M3" => 4
and then sequentially replaces all occurrences of "M0" with "M1", all occurrences of "M1" with "M2" etc.
but the "target identifiers" already exist, so if the mutex numbers increase sequentially, after iterating through the entire table it will end up with all mutexes being known as "M4"