[Bug 57731] Re: Futex hang when exiting using the window close button

2010-11-09 Thread Wayne Salmiaker
By interpreting the 1st argument as an address and reading the value on this address, I get a 0 for the first three lines of my output (which are the futex calls). Very nice how you use awk and the created header file in the middle of your code. I tried it. It works ;-) A few answers ago, you

[Bug 57731] Re: Futex hang when exiting using the window close button

2010-11-08 Thread Wayne Salmiaker
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

[Bug 57731] Re: Futex hang when exiting using the window close button

2010-11-08 Thread Wayne Salmiaker
Thanks for your quick answers! After poking a zero, I performed a little loop to get the system call number (orig_eax) and the next two arguments (ebx, ecx) of the next 20 system calls. This is how it looks: syscall=240 (1st_arg=-1210085564 2nd_arg=0) syscall=240 (1st_arg=-1210085564 2nd_arg=1)

[Bug 57731] Re: Futex hang when exiting using the window close button

2010-11-05 Thread Wayne Salmiaker
Hi Rogers, Thanks for your interesting C-code! Occasionally I am experiencing the same problem. The program freezes due to a FUTEX_WAIT call (detected by the use of strace), directly after the arrival of SIGCHLD. After reading some documents on futexes I believe to know, that the reason for the

[Bug 57731] Re: Futex hang when exiting using the window close button

2010-11-05 Thread Wayne Salmiaker
Basically my program looks like this: static volatile sig_atomic_t child_terminated=0; void sigchld_handler(int sig) { int copy_errno=errno; debug(Received SIGCHLD); child_terminated=1; signal(SIGCHLD,sigchld_handler); errno=copy_errno; } int main() {

[Bug 57731] Re: Futex hang when exiting using the window close button

2010-11-05 Thread Wayne Salmiaker
By the way: The last system call before SIGCHLD arrives is connect. This call is also part of the debug procedure. But strace does not mark this call as unfinished. Normally connect is followed by a send. -- Futex hang when exiting using the window close button