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...

-- 
Futex hang when exiting using the window close button
https://bugs.launchpad.net/bugs/57731
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to