Any trick to remove a D-state dead process without rebooting?
valdis.kletnieks at vt.edu
valdis.kletnieks at vt.edu
Mon Dec 4 21:20:38 EST 2017
On Tue, 05 Dec 2017 09:37:26 +0800, Yun-Chih Chen said:
> Does anyone know of any hacks that remove a D-state dead process whose
> parent is pid=1 (actually systemd), without rebooting?
The problem is that D state means that the process is in the middle of a system
call. That means that kernel resources are probably locked and/or there's a
deadlock or the syscall is waiting for an event that will never happen.
There's no really good safe way of fixing this without rebooting - mostly
because trying to patch kernel data structures to "free" the process without
knowing exactly *why* it happened is a fool's errand.
Things to do to gather data:
1) Check your dmesg/syslog for any WARN, BUG, or OOPS messages with tracebacks,
which probably indicates the kernel bug that caused the problem.
2) cat /proc/NNN/stack will give you a hint where the syscall is wedged.
After you got those, reboot.
The serverfault link is about a different situation - a process that has
exited, but no parent process has issued a wait() call to reap its exit status
yet. Usually this means that the parent has exited, but for some reason the
process hasn't been reparented to PID 1 (which is usually a /sbin/init of
sysvinit or systemd flavor) and/or PID 1 has failed to notice the newly
reparented process and reaped it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171204/4d19e187/attachment.bin
More information about the Kernelnewbies
mailing list