This discussion is archived
4 Replies Latest reply: Jan 9, 2013 9:22 PM by BillyVerreynne RSS

Zombie process in HP-UX

KSG Explorer
Currently Being Moderated
Hi,

I can see many Zobmie process in my server, I tried to kill using "kill -9" but it's not working.

73 processes: 334 sleeping, 20 running, 219 zombies
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 1.23 20.7% 0.0% 6.2% 73.1% 0.0% 0.0% 0.0% 0.0%
1 1.26 87.5% 0.0% 2.2% 10.4% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 1.24 54.1% 0.0% 4.2% 41.7% 0.0% 0.0% 0.0% 0.0%

Memory: 7472208K (4396764K) real, 10601924K (6056332K) virtual, 12538532K free Page# 1/17

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 ? 37 root 152 20 14432K 14432K run 58:54 0.96 0.96 vxfsd
1 ? 5103 oracle 183 20 32K 32K zomb 0:00 0.83 0.83 perl
1 ? 12908 oracle 182 20 32K 32K zomb 0:00 0.83 0.83 perl
1 ? 19125 oracle 182 20 32K 32K zomb 0:00 0.83 0.83 perl
1 ? 23338 oracle 183 20 32K 32K zomb 0:00 0.83 0.83 perl
1 ? 4207 oracle 183 20 32K 32K zomb 0:00 0.78 0.78 perl
1 ? 5097 oracle 182 20 32K 32K zomb 0:00 0.78 0.78 perl
1 ? 12933 oracle 182 20 32K 32K zomb 0:00 0.78 0.78 perl
1 ? 19094 oracle 182 20 32K 32K zomb 0:00 0.73 0.73 perl
0 ? 19281 oracle 182 20 32K 32K zomb 0:00 0.73 0.73 perl
0 ? 23333 oracle 182 20 32K 32K zomb 0:00 0.73 0.73 perl
0 ? 23341 oracle 182 20 32K 32K zomb 0:00 0.73 0.73 perl
0 ? 29699 oracle 182 20 32K 32K zomb 0:00 0.68 0.68 perl
1 ? 12077 oracle 182 20 32K 32K zomb 0:00 0.64 0.63 perl

Solution: Find the PPID and kill it.

ps -el | grep 'Z'

find the PPID of the Zombie and kill. Rest of all the zombie got killed.

Thanks
KSG

Solution found.
  • 1. Re: Zombie process in HP-UX
    jgarry Guru
    Currently Being Moderated
    Sometimes you get a zombie process because the parent is killed before the child, and the child has no parent to tell it has finished. At least in older hp-ux&oracle, I don't recall seeing it recently. There also could be some driver problem. Also, sometimes ps is a few seconds out of date, an eternity in process time. I see some briefly defunct processes coming from some hp utility, so grepping the ppid always shows something defunct, which can be confusing if you don't notice the changing pid.
  • 2. Re: Zombie process in HP-UX
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    As Joel said.

    A parent process receives a signal when one of its child processes terminates. When the parent process does not exist, the signal cannot be processed.

    The kernel then keeps the basic process identifier struct of the child in memory (not very large) - after unloading the actual child process from the kernel.

    The child process no longer exists. Except for the tiny process identifier struct in the process list table of the kernel.

    Thus the name zombie process. Process is dead (no longer loaded). Nor can it be killed. The identifier in the process listing can only be cleared with a kernel reboot afaik.

    Why exactly the Unix kernel behaves this way, I cannot recall... but there are some or another technical explanation for it.
  • 3. Re: Zombie process in HP-UX
    KSG Explorer
    Currently Being Moderated
    Thanks Joel and Belly,

    I found the Parent PID of the defunc and killed the PPID. After that all the Zombies are cleared.

    Thanks
    KSG..
  • 4. Re: Zombie process in HP-UX
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    This would seem to mean that the parent was hung/stuck, and unable to process signals from its child processes that terminated.

    Unusual. Likely that the parent process ran into a bug - which should require a post mortem analysis.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points