Koozali.org: home of the SME Server

Unable to kill a zombie process

Daniel Kraaij

Unable to kill a zombie process
« on: June 13, 2001, 07:30:18 PM »
i've noticed a zombie process , and i tried to kill it .. but the process remains..

Below is a paste from top and notice process 1383

does anyone have any ideas on how to kill this process?

thanks in advance

Daniel Kraaij


78 processes: 76 sleeping, 1 running, 1 zombie, 0 stopped
CPU states:  0.6% user,  1.4% system,  0.0% nice,  1.4% idle
Mem:   257600K av,  254496K used,    3104K free,   64176K shrd,    6012K buff
Swap:  265032K av,   12784K used,  252248K free                  129012K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
27122 root      19   0  1056 1056   836 R     3.8  0.4   0:00 top
16998 root      13   0   112   52    20 S     1.9  0.0  38:42 pptp
    1 root       0   0   120   76    56 S     0.0  0.0   0:06 init
    2 root       0   0     0    0     0 SW    0.0  0.0   0:07 kflushd
    3 root       0   0     0    0     0 SW    0.0  0.0   0:14 kupdate
    4 root       0   0     0    0     0 SW    0.0  0.0   0:00 kpiod
    5 root       0   0     0    0     0 SW    0.0  0.0   0:11 kswapd
    6 root     -20 -20     0    0     0 SW<   0.0  0.0   0:00 mdrecoveryd
  275 root       0   0   292  236   168 S     0.0  0.0   0:23 syslogd
  285 root       0   0   504  180   152 S     0.0  0.0   0:00 klogd
  663 root       0   0   160  120    72 S     0.0  0.0   0:00 crond
  709 root       0   0   704  584   296 S     0.0  0.2   0:13 xinetd
  905 lp         0   0   128    0     0 SW    0.0  0.0   0:00 lpd
  930 root       0   0   164   52    32 S     0.0  0.0   0:00 dhcpd
  980 root       0   0  1388 1364   740 S     0.0  0.5   0:00 slapd
  999 root       0   0    56    0     0 SW    0.0  0.0   0:00 supervise
 1000 qmaill     0   0    72   20    12 S     0.0  0.0   0:00 cyclog
 1002 qmails     0   0   172  156    88 S     0.0  0.0   0:01 qmail-send
 1022 mail       0   0   136   84    56 S     0.0  0.0   0:00 smtpfwdd
 1035 qmaill     0   0    72   24    12 S     0.0  0.0   0:00 accustamp
 1036 root       0   0   112   72    52 S     0.0  0.0   0:00 qmail-lspawn
 1037 qmailr     0   0   128   96    60 S     0.0  0.0   0:00 qmail-rspawn
 1038 qmailq     0   0   120  104    76 S     0.0  0.0   0:00 qmail-clean
 1069 root       0   0   556  436   352 S     0.0  0.1   0:09 sshd
 1224 root       0   0  1512 1496  1408 S     0.0  0.5   0:00 httpd-admin
 1243 root       0   0   160    0     0 SW    0.0  0.0   0:00 safe_mysqld
 1287 root       0   0   164    0     0 SW    0.0  0.0   0:00 squid
 1290 squid      0   0  4284 3256   316 S     0.0  1.2   0:04 squid
 1294 mysql      0   0  1768 1484   952 S     0.0  0.5   0:00 mysqld
 1302 squid      0   0    56    0     0 SW    0.0  0.0   0:00 unlinkd
 1317 mysql      0   0  1768 1484   952 S     0.0  0.5   0:00 mysqld
 1320 mysql      0   0  1768 1484   952 S     0.0  0.5   0:00 mysqld
 1344 root       0   0   120   52    32 S     0.0  0.0   0:00 atalkd
 1345 root       0   0  1480 1112   952 S     0.0  0.4   0:00 smbd
 1355 root       0   0  1072  808   508 S     0.0  0.3   0:03 nmbd
 1358 root       0   0   496    0     0 SW    0.0  0.0   0:00 nmbd
 1378 dns        0   0  3072 2436   524 S     0.0  0.9   0:24 named
 1379 root       0   0   272  244   192 S     0.0  0.0   0:00 pptpd
 1380 root       0   0  2852    0     0 SW    0.0  0.0   0:01 console
 1381 root       0   0    64    0     0 SW    0.0  0.0   0:00 mingetty
 1382 root       0   0    64    0     0 SW    0.0  0.0   0:00 mingetty
 1383 root       0   0     0    0     0 Z     0.0  0.0   0:00 rpmq
 1384 root       0   0    56    0     0 SW    0.0  0.0   0:00 logger
 1385 root       0   0   136    0     0 SW    0.0  0.0   0:00 whiptail
 1420 root       0   0    64    0     0 SW    0.0  0.0   0:00 papd
 1430 root       0   0   312  220   180 S     0.0  0.0   0:00 afpd
 1684 root       0   0  3092 2820   764 S     0.0  1.0   8:14 smbd
11739 root       0   0  2172   56    40 S     0.0  0.0   0:00 httpd
11742 www        0   0  6276 4836  2228 S     0.0  1.8   0:02 httpd
11743 www        0   0  6568 5252  2916 S     0.0  2.0   0:02 httpd
11744 www        0   0  6712 5468  3164 S     0.0  2.1   0:01 httpd
11745 www        0   0  6352 5032  2716 S     0.0  1.9   0:01 httpd
11746 www        0   0  6932 5668  2824 S     0.0  2.2   0:02 httpd
11747 www        0   0  6952 5700  3336 S     0.0  2.2   0:01 httpd

Charlie Brady

Re: Unable to kill a zombie process
« Reply #1 on: June 13, 2001, 10:26:18 PM »
Daniel Kraaij wrote:
>
> i've noticed a zombie process , and i tried to kill it .. but
> the process remains..
>
> Below is a paste from top and notice process 1383
>
> does anyone have any ideas on how to kill this process?
...
>  1383 root       0   0     0    0     0 Z     0.0  0.0   0:00
> rpmq

You can't kill a zombie, it is already dead. But it won't hurt you.

What you are seeing is a harmless bug. The rpm command is used to determine the e-smith version number, for display on the console. Since the console application has not yet queried the system to ask it whether the rpm command completed successfully, it is still occupying a slot in the process table. It isn't using any other resources. The bug will be fixed in a future version.

Regards

Charlie

Daniel Kraaij

Re: Unable to kill a zombie process
« Reply #2 on: June 14, 2001, 01:48:29 AM »
Charlie,

Thanks for your reply.
so the process will eventually be removed , or is this done when the server is rebooted.. (i wasn't planning on doing that for a long while :-))

Regards,

Daniel

Bart

Re: Unable to kill a zombie process
« Reply #3 on: August 17, 2001, 03:05:35 AM »
Came across this message while looking for something quite different..but he.. good sysadmins dislike zombies:)

The bug was posted earlier to bugs@e-smith.com
AFAIK, it has not been fixed to time;

The solution is already there. The change in code below was posted by me earlier to bugs@e-smith.com, reviewed by Gordon Rowell, and proved to solve this :)
(Happy happy joy joy)

So, change /sbin/e-smith/console

> after this code..
>
>     else
>     {
>         exec @rpmCommand;
>         die "exec of @rpmCommand failed";
>     }
>
> I added the line...
>
>     close RES || die "Closing rpm query failed! $! $?";
>
> Result: no zombie processes anymore

It may help you too.
Regards,
   -Bart-

Daniel Kraaij

Re: Unable to kill a zombie process
« Reply #4 on: August 17, 2001, 12:40:58 PM »
thanks for your reply,

but actually due to hardware trouble i had to reboot the system , and since then haven't had any zombies :-)

and to be sure that i don't get zombies in the future i'll add te code ...

Best regards,

Daniel Kraaij