Thread takeover on attach fails b/c SIGUSR2 is blocked: switch to another signal?
Attaching (via ptrace #38 or for statically-linked DR) to a process that has masked most non-fatal signals fails to take over the rest of the app threads. We could try to use ptrace to take them over but that is difficult for the static-link case. Or we could switch from SIGUSR2 to a signal less likely to be masked, like SIGFPE. We would distinguish from a synchronous signal by looking at si->code (set as far back as 2.2 kernel; some other siginfo fields were unreliable back then but not this one) and other fields.
E.g., this is hit attaching to mysqld, which blocks all non-fatal signals. The ptrace attach succeeds but then DR's takeover times out and fails.