py-spy sometimes combines different threads from differnet pools with the same TID into the same view
Sometimes I find that when i run py-spy on a process with multiple threadpools with varying spiky worker sizes, the TIDs briefly overlap across thread pools, causing the same tid to appear with clearly incorrect data (for example, double or even triple the expected runtime, with the same data fighting across the same timeranges and confusing the visualizer). I can tell this is happening when the data looks like this screenshot (with the data much more fragmented than it should be, perhaps because it is completely different stack traces multiple times at once), or the stack traces include data that was clearly from some other thread:
Unfortunately I do not yet have an MRE of this, but i did not see any similar reports and I think I have a reasonably clear understanding of the cause so figured I would flag it anyway.
Source: benfred/py-spy