Score:0

Can't kill defunct process or its parent. It never goes away

es flag

I have a defunct process that just simply won't go away, no matter what kill command I run. I have referred to What is a <defunct> process, and why doesn't it get killed? and several other articles as well, but this just simply doesn't work.

For example:

┌──(rootdd651bca9e63447)-[~]
└─# ps -ef | grep defunct | grep -v grep | cut -b8-20 | xargs kill -9

┌──(rootdd651bca9e63447)-[~]
└─# ps aux | grep -i 13899
root     13899  6.0  0.0      0     0 ?        Z    11:49   0:16 [my-service] <defunct>
root     15987  0.0  0.0   5200   720 pts/6    S+   11:53   0:00 grep --color=auto -i 13899

┌──(rootdd651bca9e63447)-[~]
└─#

As a result, I'm unable to restart the service obfuscated as my-service because it claims it's already running. How do I resolve this? I'm running this in a docker image so, unfortunately, I can't just "reboot" the docker image because my access to the host has expired and will require me to run through several hours of processes to get re-established to the host.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.