zombie thread
by will_intelli from LinuxQuestions.org on (#5NQXN)
Hello,
I'm trying to find the cause of a zombie thread in my application, I'm seeing my application end up in this state:
Code:UID PID PPID LWP C NLWP STIME TTY TIME CMD
root 16133 1 16133 0 4 21:30 ? 00:00:00 [client] <defunct>
root 16133 1 16135 0 4 21:30 ? 00:00:00 /bin/client
root 16133 1 16136 0 4 21:30 ? 00:00:00 /bin/client
root 16133 1 16137 0 4 21:30 ? 00:00:00 /bin/clientSo it seems the main thread is becoming a zombie, but other sub-threads created from the main thread are staying active.
Its my understanding that if the main thread dies, either all threads should die, or if the main thread ends with a pthread_exit(), sub-threads will stay active, but will be listed as zombies, the output above isn't either of those.
Does anyone have any ideas about how an application could end up in the above state?
Thanks,
Will.
I'm trying to find the cause of a zombie thread in my application, I'm seeing my application end up in this state:
Code:UID PID PPID LWP C NLWP STIME TTY TIME CMD
root 16133 1 16133 0 4 21:30 ? 00:00:00 [client] <defunct>
root 16133 1 16135 0 4 21:30 ? 00:00:00 /bin/client
root 16133 1 16136 0 4 21:30 ? 00:00:00 /bin/client
root 16133 1 16137 0 4 21:30 ? 00:00:00 /bin/clientSo it seems the main thread is becoming a zombie, but other sub-threads created from the main thread are staying active.
Its my understanding that if the main thread dies, either all threads should die, or if the main thread ends with a pthread_exit(), sub-threads will stay active, but will be listed as zombies, the output above isn't either of those.
Does anyone have any ideas about how an application could end up in the above state?
Thanks,
Will.