Assertion failures in threads wreak havoc
Entering a subtest or a fixture stores the current stack with sigsetjmp, failing an assertions ends up calling siglongjmp. Failing in an assertion in a thread ends up calling sigsetjmp in a thread different from the one that created the jmpbuf, which is undefined behaviour.
An initial POC unit test can be found at adrinael/igt-gpu-tools@ad0ac818
Key observations: Thread count of 128 wasn't enough to reproduce anything reliably, 1024 is enough to just about 100%. Getting backtraces from 1024 threads with interleaved output is a cosmetic issue, a more dire one is the race of exiting the subtest and thus marking us not being in a subtest, and triggering the assertion failure in another thread after that, hitting the igt_can_fail() assert in that assertion's handler, and also proceeding to the igt_fixture which sometimes fudges the stack enough to produce nonprintable characters in other threads' call stack, breaking CI results.