View Only
  • 1.  how kill defunct process

    Posted Tue May 09, 2023 01:19 PM

     Hi ,

    if the node agent of PowerHA creates loop with many process , defunct, the grow thousands in the time

      root 45684330 40179238   0                  0:00 <defunct>

     how would be possible to fix the problem . ?

     i know usually it is not possible to kill defunct process.

      thanx regards

    Massimiliano Toscano

  • 2.  RE: how kill defunct process

    Posted Tue May 09, 2023 06:24 PM

    As my experience taught me, defunct process can't be killed.

    But, I have always observed is all defunct process are associated to PID 1 as parent process

    When they have PPID, I suppose killing father process could be eliminate all its defunct process or all of them be associated to PID 1.

    Whatever, they are a result of bug in software. Maybe you should apply some patches or update applications or product programs




    Luis Rojas

  • 3.  RE: how kill defunct process

    Posted Tue May 09, 2023 08:30 PM
    Edited by Tom McGivern Tue May 09, 2023 08:38 PM

    It's my understanding that defunct (zombie) processes are ones that have terminated (natural or otherwise), but the parent has not yet acknowledged their death.
    once the parent acknowledges the death of the child, the zombie/defunct process goes away.

    Tom McGivern

  • 4.  RE: how kill defunct process

    Posted Tue May 09, 2023 08:38 PM

    A better explanation:

    Tom McGivern

  • 5.  RE: how kill defunct process

    Posted Wed May 10, 2023 05:18 AM


    I have the same problem with qualys. Defunct (zombie) processes remain from it. I solve it like this:
    ps -ef | grep qualys | awk '{ print $2 }' | xargs kill -9



    Bratislav Petkovic

  • 6.  RE: how kill defunct process

    Posted Thu May 11, 2023 10:02 AM

    Defunct/zombie processes are processes that have in fact terminated. They are gone. The are not using CPU and have only a few pages of memory being held. These pages of memory hold the last stack from when it was started. They will be held until the parent reads the exist status OR the parent is ignoring SIGCHLD. When the parent reads the child processes exist status, then it will go away. 'ps' may show it is getting CPU, but it is not. This is simply the CPU usage it got terminating. The total CPU time for the process will not increase. Kdb and dbx will not be able to get you a stack. You can run a kernel trance and you will not see it dispatch or run. Svmon will show it has released almost all of the memory. 

    The ppid of the process shows you who should be reading the exist status. It is not unusual for a shell script to build up some defunct processes and they usually go away after a short time. 

    One execption to this is when init has not reached it's 'steady state' and it not cleaning up defunct processes. I have seen this most often after AIX is installed and the install assistant is enabled and the inittab entry indicated init should wait. Defunct processes will build up until the install assistant terminates. 

    Grover Davidson

  • 7.  RE: how kill defunct process

    Posted Thu May 11, 2023 04:52 AM


    You can't kill that which is already dead.

    You'll have to investigate the parent process, because the defuncts will stay until the parent reads their return code.
    Open a case for whatever software owns the parent process.

    You may have some luck by sending a SIGCHLD to the parent process (assuming it isn't completely broken)

    There is a special case for init (PID 1):  If you find defuncts with a PPID of 1, it usually means that init didn't finish it's initial processing (some inittab entry with "wait" didn't finish).

    José Pina Coelho
    IT Specialist at Kyndryl