How can I reap a zombie process that is not a child of my shell?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












I have a server with a ton of zombie processes. Almost a thousand. If possible, I would like to reap these processes because it doesn't seem like the parent (one parent is causing all 1000 zombies) is going to call the wait function. I see bash has a builtin wait function, but when I use it to try to reap one of the zombies, I get the following error.



# wait 17517
bash: wait: pid 17517 is not a child of this shell


I am root, but that does not seem to make a difference. I have a couple questions



  1. Can I reap a zombie process if it is not the child of my shell?

  2. If not, is there anything I can do? I am not certain I should kill the parent

  3. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.









share|improve this question





















  • Any solution I can think of would involve stopping the parent and forcing it to execute some system calls (wait and signal(SIGCHLD,SIG_IGN)). Do you know anything about what the parent is doing when it's not creating children? Is it just listening on a socket?
    – Mark Plotnick
    Aug 28 at 18:16










  • @Mark Plotnick Unfortunately, I can't seem to find much about the parent. It is what you would call, a custom application. I would not be able to get more information on my own.
    – Timothy Pulliam
    Aug 28 at 18:19











  • I'd be more worried about why the zombie processes exist than trying to reap them outside of the parent process. Are they zombies themselves causing any harm?
    – Christian Gibbons
    Aug 28 at 18:24










  • @ChristianGibbons The system seems pretty slow to respond. Probably related. I am just worried that left to themselves, the system will crash. There are no signs of stopping.
    – Timothy Pulliam
    Aug 28 at 18:30






  • 2




    Zombie processes only occupy space in the process table, they wouldn’t explain unresponsiveness.
    – Stephen Kitt
    Aug 28 at 18:36














up vote
1
down vote

favorite
1












I have a server with a ton of zombie processes. Almost a thousand. If possible, I would like to reap these processes because it doesn't seem like the parent (one parent is causing all 1000 zombies) is going to call the wait function. I see bash has a builtin wait function, but when I use it to try to reap one of the zombies, I get the following error.



# wait 17517
bash: wait: pid 17517 is not a child of this shell


I am root, but that does not seem to make a difference. I have a couple questions



  1. Can I reap a zombie process if it is not the child of my shell?

  2. If not, is there anything I can do? I am not certain I should kill the parent

  3. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.









share|improve this question





















  • Any solution I can think of would involve stopping the parent and forcing it to execute some system calls (wait and signal(SIGCHLD,SIG_IGN)). Do you know anything about what the parent is doing when it's not creating children? Is it just listening on a socket?
    – Mark Plotnick
    Aug 28 at 18:16










  • @Mark Plotnick Unfortunately, I can't seem to find much about the parent. It is what you would call, a custom application. I would not be able to get more information on my own.
    – Timothy Pulliam
    Aug 28 at 18:19











  • I'd be more worried about why the zombie processes exist than trying to reap them outside of the parent process. Are they zombies themselves causing any harm?
    – Christian Gibbons
    Aug 28 at 18:24










  • @ChristianGibbons The system seems pretty slow to respond. Probably related. I am just worried that left to themselves, the system will crash. There are no signs of stopping.
    – Timothy Pulliam
    Aug 28 at 18:30






  • 2




    Zombie processes only occupy space in the process table, they wouldn’t explain unresponsiveness.
    – Stephen Kitt
    Aug 28 at 18:36












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have a server with a ton of zombie processes. Almost a thousand. If possible, I would like to reap these processes because it doesn't seem like the parent (one parent is causing all 1000 zombies) is going to call the wait function. I see bash has a builtin wait function, but when I use it to try to reap one of the zombies, I get the following error.



# wait 17517
bash: wait: pid 17517 is not a child of this shell


I am root, but that does not seem to make a difference. I have a couple questions



  1. Can I reap a zombie process if it is not the child of my shell?

  2. If not, is there anything I can do? I am not certain I should kill the parent

  3. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.









share|improve this question













I have a server with a ton of zombie processes. Almost a thousand. If possible, I would like to reap these processes because it doesn't seem like the parent (one parent is causing all 1000 zombies) is going to call the wait function. I see bash has a builtin wait function, but when I use it to try to reap one of the zombies, I get the following error.



# wait 17517
bash: wait: pid 17517 is not a child of this shell


I am root, but that does not seem to make a difference. I have a couple questions



  1. Can I reap a zombie process if it is not the child of my shell?

  2. If not, is there anything I can do? I am not certain I should kill the parent

  3. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.






process zombie-process






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 28 at 18:12









Timothy Pulliam

1,051617




1,051617











  • Any solution I can think of would involve stopping the parent and forcing it to execute some system calls (wait and signal(SIGCHLD,SIG_IGN)). Do you know anything about what the parent is doing when it's not creating children? Is it just listening on a socket?
    – Mark Plotnick
    Aug 28 at 18:16










  • @Mark Plotnick Unfortunately, I can't seem to find much about the parent. It is what you would call, a custom application. I would not be able to get more information on my own.
    – Timothy Pulliam
    Aug 28 at 18:19











  • I'd be more worried about why the zombie processes exist than trying to reap them outside of the parent process. Are they zombies themselves causing any harm?
    – Christian Gibbons
    Aug 28 at 18:24










  • @ChristianGibbons The system seems pretty slow to respond. Probably related. I am just worried that left to themselves, the system will crash. There are no signs of stopping.
    – Timothy Pulliam
    Aug 28 at 18:30






  • 2




    Zombie processes only occupy space in the process table, they wouldn’t explain unresponsiveness.
    – Stephen Kitt
    Aug 28 at 18:36
















  • Any solution I can think of would involve stopping the parent and forcing it to execute some system calls (wait and signal(SIGCHLD,SIG_IGN)). Do you know anything about what the parent is doing when it's not creating children? Is it just listening on a socket?
    – Mark Plotnick
    Aug 28 at 18:16










  • @Mark Plotnick Unfortunately, I can't seem to find much about the parent. It is what you would call, a custom application. I would not be able to get more information on my own.
    – Timothy Pulliam
    Aug 28 at 18:19











  • I'd be more worried about why the zombie processes exist than trying to reap them outside of the parent process. Are they zombies themselves causing any harm?
    – Christian Gibbons
    Aug 28 at 18:24










  • @ChristianGibbons The system seems pretty slow to respond. Probably related. I am just worried that left to themselves, the system will crash. There are no signs of stopping.
    – Timothy Pulliam
    Aug 28 at 18:30






  • 2




    Zombie processes only occupy space in the process table, they wouldn’t explain unresponsiveness.
    – Stephen Kitt
    Aug 28 at 18:36















Any solution I can think of would involve stopping the parent and forcing it to execute some system calls (wait and signal(SIGCHLD,SIG_IGN)). Do you know anything about what the parent is doing when it's not creating children? Is it just listening on a socket?
– Mark Plotnick
Aug 28 at 18:16




Any solution I can think of would involve stopping the parent and forcing it to execute some system calls (wait and signal(SIGCHLD,SIG_IGN)). Do you know anything about what the parent is doing when it's not creating children? Is it just listening on a socket?
– Mark Plotnick
Aug 28 at 18:16












@Mark Plotnick Unfortunately, I can't seem to find much about the parent. It is what you would call, a custom application. I would not be able to get more information on my own.
– Timothy Pulliam
Aug 28 at 18:19





@Mark Plotnick Unfortunately, I can't seem to find much about the parent. It is what you would call, a custom application. I would not be able to get more information on my own.
– Timothy Pulliam
Aug 28 at 18:19













I'd be more worried about why the zombie processes exist than trying to reap them outside of the parent process. Are they zombies themselves causing any harm?
– Christian Gibbons
Aug 28 at 18:24




I'd be more worried about why the zombie processes exist than trying to reap them outside of the parent process. Are they zombies themselves causing any harm?
– Christian Gibbons
Aug 28 at 18:24












@ChristianGibbons The system seems pretty slow to respond. Probably related. I am just worried that left to themselves, the system will crash. There are no signs of stopping.
– Timothy Pulliam
Aug 28 at 18:30




@ChristianGibbons The system seems pretty slow to respond. Probably related. I am just worried that left to themselves, the system will crash. There are no signs of stopping.
– Timothy Pulliam
Aug 28 at 18:30




2




2




Zombie processes only occupy space in the process table, they wouldn’t explain unresponsiveness.
– Stephen Kitt
Aug 28 at 18:36




Zombie processes only occupy space in the process table, they wouldn’t explain unresponsiveness.
– Stephen Kitt
Aug 28 at 18:36










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted











  1. Can I reap a zombie process if it is not the child of my shell?



No, you can't.




  1. If not, is there anything I can do? I am not certain I should kill the parent



You can try to stop the parent, then restart it with exec from a shell that ignores SIGCHLD. A parent that ignores SIGCHLD won't leave zombies.




  1. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.



If the number of zombies increases, eventually you will reach the point where you can't fork new processes.






share|improve this answer




















  • with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
    – A.B
    Aug 29 at 22:04











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465358%2fhow-can-i-reap-a-zombie-process-that-is-not-a-child-of-my-shell%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted











  1. Can I reap a zombie process if it is not the child of my shell?



No, you can't.




  1. If not, is there anything I can do? I am not certain I should kill the parent



You can try to stop the parent, then restart it with exec from a shell that ignores SIGCHLD. A parent that ignores SIGCHLD won't leave zombies.




  1. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.



If the number of zombies increases, eventually you will reach the point where you can't fork new processes.






share|improve this answer




















  • with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
    – A.B
    Aug 29 at 22:04















up vote
2
down vote



accepted











  1. Can I reap a zombie process if it is not the child of my shell?



No, you can't.




  1. If not, is there anything I can do? I am not certain I should kill the parent



You can try to stop the parent, then restart it with exec from a shell that ignores SIGCHLD. A parent that ignores SIGCHLD won't leave zombies.




  1. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.



If the number of zombies increases, eventually you will reach the point where you can't fork new processes.






share|improve this answer




















  • with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
    – A.B
    Aug 29 at 22:04













up vote
2
down vote



accepted







up vote
2
down vote



accepted







  1. Can I reap a zombie process if it is not the child of my shell?



No, you can't.




  1. If not, is there anything I can do? I am not certain I should kill the parent



You can try to stop the parent, then restart it with exec from a shell that ignores SIGCHLD. A parent that ignores SIGCHLD won't leave zombies.




  1. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.



If the number of zombies increases, eventually you will reach the point where you can't fork new processes.






share|improve this answer













  1. Can I reap a zombie process if it is not the child of my shell?



No, you can't.




  1. If not, is there anything I can do? I am not certain I should kill the parent



You can try to stop the parent, then restart it with exec from a shell that ignores SIGCHLD. A parent that ignores SIGCHLD won't leave zombies.




  1. Should I be worried? It seems the parent has a resource leak and is not garbage collecting or whatever.



If the number of zombies increases, eventually you will reach the point where you can't fork new processes.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 28 at 21:57









RalfFriedl

3,9151625




3,9151625











  • with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
    – A.B
    Aug 29 at 22:04

















  • with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
    – A.B
    Aug 29 at 22:04
















with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
– A.B
Aug 29 at 22:04





with a creative use of gdb, one could make the parent actually call signal(SIGCHLD, SIG_IGN) and a few waitpid(-1,NULL,WNOHANG) to plug the leak without restarting it. Of course gdb and production might not go well together.
– A.B
Aug 29 at 22:04


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465358%2fhow-can-i-reap-a-zombie-process-that-is-not-a-child-of-my-shell%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)