Re: Any trick to remove a D-state dead process without rebooting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: pgpASIYyqYko2.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux