Description of problem: I noticed that clone()d thread sleeps forever on exit. The clone()d thread's state becomes zombie, but it is not notified to the process calling waitpid(). Not applying the three patches listed below solves this problem. I think this problem is introduced by one of these patches. # Roland's utrace ptrace replacement. ApplyPatch linux-2.6-ptrace-cleanup.patch ApplyPatch linux-2.6-tracehook.patch ApplyPatch linux-2.6-utrace.patch Version-Release number of selected component (if applicable): Fedora 8's 2.6.26.3-14.fc8 and Fedora 9's 2.6.26.3-29.fc9 are affected. How reproducible: 100% Steps to Reproduce: 1. Compile the following program and run. ---------- #define _GNU_SOURCE #include <sched.h> #include <sys/types.h> #include <sys/wait.h> #include <stdio.h> #include <errno.h> #include <stdlib.h> static int child(void *arg) { return 0; } int main(int argc, char *argv[]) { int error; char *stack = malloc(8192); printf("Calling clone() "); { const pid_t pid = clone(child, stack + (8192 / 2), CLONE_NEWNS, NULL); printf("(pid=%d)\n", pid); fflush(stdout); while (waitpid(pid, &error, __WALL) == EOF && errno == EINTR); } printf("waitpid() returned %d\n", WIFEXITED(error) ? WEXITSTATUS(error) : -1); return 0; } ---------- 2. 3. Actual results: It sleeps forever until terminated by Ctrl-C. Expected results: It sould return immediately. Additional info:
This is fixed in the rawhide kernel.
Hello. > This is fixed in the rawhide kernel. I see. Thanks. But I haven't seen the fixed kernel for Fedora 8 and Fedora 9 yet. Are Fedora 8 and Fedora 9 planning to jump to 2.6.27 without fixing this bug? :-)
I found kernel-2.6.26.6-49.fc8.src.rpm and kernel-2.6.26.6-79.fc9.src.rpm in updates/testing/ repository. Please close this topic. Thank you.