On Mo, 04.12.17 23:15, Yun-Chih Chen (yunchih....@gmail.com) wrote: > Hi, fellows: > > How do I remove a dead process (D-state process) wrapped as a Systemd > service unit? The process's parent is systemd (pid=1) and I still did not > find a way to remove such process without rebooting. I have tried the > following: > > $ systemctl restart <my_service> # timeout > $ systemctl daemon-reexec > $ kill -9 <pid of my process> # won't work of course > > Or anyone knows of hacks that do the trick?
You cannot kill "D" state processes on Linux. That's what "D" state means ultimately: *uninterruptible* sleep. The kill command can't kill such processes, and neither can systemd. If you see processes like this, then either you have very slow I/O, or this points to some form of kernel/driver problem, as sleeping in this state should usually be for short periods only. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel