![]() |
| | #1 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| Unreapable zombie Suppose you have process A, which forks child B. Suppose process B exits, becoming a zombie. Then, process A exits without reaping child B. Child B is now re-parented to init, but since it is already a zombie, init never receives a SIGCHLD and thus does not reap the zombie. Result? A zombie that you can't get rid of. I hate it.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #2 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| Hmm. Well it appears that overnight, init finally decided to reap my zombie. It sure took it a damn long while though. Sounds like a good method for DoS'ing a system -- fork() off a child which sleep()'s for a little while then exits, but before it exits, quit yourself. Eventually the process table would get filled up with zombies, disabling the whole damn system. Ugh.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #3 | |
| int x = *((int *) NULL); Join Date: Jul 2003 Location: Banks of the River Styx
Posts: 902
| This is not supposed to happen. Quote:
__________________ long time; /* know C? */ Unprecedented performance: Nothing ever ran this slow before. Any sufficiently advanced bug is indistinguishable from a feature. Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31. The best way to accelerate an IBM is at 9.8 m/s/s. recursion (re - cur' - zhun) n. 1. (see recursion) | |
| Cactus_Hugger is offline | |
| | #4 | |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| Quote:
I'm familiar with fork bombing, but zombie bombing is worse, because you can't kill the zombies. If init doesn't reap them for hours, you're screwed for hours.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot | |
| brewbuck is offline | |
| | #5 |
| critical genius Join Date: Jul 2008 Location: SE Queens
Posts: 5,203
| Hmmm. I've noticed this happen before and I always dump the software which caused it. Interesting. |
| MK27 is offline | |
| | #6 |
| int x = *((int *) NULL); Join Date: Jul 2003 Location: Banks of the River Styx
Posts: 902
| Code: ./zombie;ps -ef | grep zombie Code: #include <stdio.h>
#include <unistd.h>
int main()
{
int ret;
ret = fork();
if(ret < 0)
{
perror("zombie");
return 1;
}
else if(ret == 0)
{
// Child
return 0;
}
else
{
printf("Child forked. (PID = %d)\nType a number followed by enter to quit.\n", ret);
scanf("%d", &ret);
return 0;
}
return 0;
}
__________________ long time; /* know C? */ Unprecedented performance: Nothing ever ran this slow before. Any sufficiently advanced bug is indistinguishable from a feature. Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31. The best way to accelerate an IBM is at 9.8 m/s/s. recursion (re - cur' - zhun) n. 1. (see recursion) |
| Cactus_Hugger is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| init adopts zombie process? | password636 | Linux Programming | 4 | 07-01-2009 10:05 AM |
| Fork Zombie Processes | valaris | Linux Programming | 4 | 09-05-2008 08:16 AM |
| zombie to exist after the termination of main program.. | anilchowdhury | Linux Programming | 0 | 02-22-2008 12:35 PM |
| Fork => zombie => error | Morbo | Linux Programming | 1 | 12-08-2005 11:53 AM |
| zombie analysis | zedoo | Linux Programming | 2 | 10-07-2005 09:15 AM |