Messages in this thread | | | From | "Matthias Urlichs" <> | Date | Sat, 31 Jan 2004 21:49:14 +0100 | Subject | Re: BUG: NTPL: waitpid() doesn't return? |
| |
Hi,
bert hubert: > [Matthias reports that threads forking multiple programs and running waitpid > on them has problems] > To recap:
This process, on a SMP machine, does generate a few threads. Each thread forks off some process, which it then waitpid()s for. There is no SIGCHLD handler.
All but the last of these waitpid()s, as seen in strace output, never return.
31342 <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x416dbc18) = 31346 31346 execve("/usr/bin/apt-ftparchive", ["apt-ftparchive", "packages", "testing/all"], [/* 12 vars */] <unfinished ...> 31346 <... execve resumed> ) = 0 31346 exit_group(0) = ? 31340 --- SIGCHLD (Child exited) @ 0 (0) --- 31342 waitpid(31346, <unfinished ...>
Your test program works... except that it reports, when I strace it,
[pid 10629] waitpid(10631, Process 10629 suspended <unfinished ...> [pid 10628] <... mmap2 resumed> ) = 0x41966000 [pid 10630] waitpid(10632, Process 10630 suspended <unfinished ...>
Those "Process ### suspended" messages did NOT happen with the Python script that exhibits the bug.
-- Matthias Urlichs | noris network AG | http://smurf.noris.de/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |