Comment 13 for bug 57731

Revision history for this message
Wayne Salmiaker (hannessteltzer) wrote :

You are right. I dont need to restore the signal handler - one system call less in my signal handler.
I now saved a snapshot of the unfinished futex call. So I can experiment as often as I want.
Poking a 1 does not work. But Poking a 0 works perfektly fine.
And youre also right : I cannot use strace when the process is alredy attached to my ptrace stuff.
So I will implement some PTRACE_SYSCALL steps myself to see the process continuing after poking a 0.

Do you think, that errno could be the problem as well? Maybe a system call is assinging a value to errno. Then the signal arrives and the handler tries to access errno, too, which is blocked now?
If really the debug() call is the reason, I wonder why this problem does not happen more often. I am debugging a lot in my code. And besides the debug calls like every 2nd or 3rd code line ends up as a system call. If interrupting a system call and executing another system call in the handler should cause the problem, I feel like this kind of deadlock should happen more often...