Rm -rf unable to kill pid on AIX

I have a script that creates tar file and in the next command it gzip the tar file.

While the script was running midway i happen to force delete the tar file that was still being constructed.

This left the my scripts process pid to remain on the server.

Now that I'm trying to force kill the process, but the pid fails to get killed.

ps -ef  | grep 21758806
  user1 21758806        1   0   Mar 18      -  0:01 gzip /backup/Bckup_180320.tar

kill -9 21758806        

ps -ef  | grep 21758806 | grep -v grep
  user1 21758806        1   0   Mar 18      -  0:01 gzip /backup/Bckup_180320.tar

Can you please suggest ? I'm logged in and the process is running with the same non-root user.

It is a zombie process now. It is not going to use any resources like memory or cpu but it will be there until you reboot the host.

1 Like

Any other solution apart from a reboot as this is production server?

If you search the forums, this question has been asked many times over the past 10 years.

The answer is always the same:

  1. The way to clear issue this is to reboot.
  2. There is no reason to worry about these zombie processes as they do not consume resources (memory, CPU).

Please use the search function here. It works great.

1 Like

I think that people's associations associations for the the word 'zombie' get in the way of dealing with it. They are not supposed to be scary or a scourge on the face of the earth. Just an "oops" kind of user action. We all have had "oops" moments.

Over time dozens of users have asked me to kill zombies. Because they could not kill them. They never like the answer. As in this case.

Zombies are okay. A few at a time. Way too many of them uses up available process slots. Which will ultimately force a production reboot.

1 Like

Is

df /backup/Bckup_180320.tar &

giving a result?
If it hangs hard, then there is some serious trouble. Then do further diagnostics, e.g. check mounts with

mount | grep /backup

Not responding to kill -1 does not prove that it is a zombie.
It is a zombie when its state (S column) is Z in

ps -lfp 21758806

Also, most Unixes replace the process args name (CMD column) with the word "defunct".
When it is in D state it is in "device-waiting", not kill-able - but not a zombie.

1 Like

This:
Process priority and control on AIX

Does not seem to list a "D" state for AIX. Maybe some of the extended states are comparable. I'd like to know. "D" does exist for Linux for example.

1 Like

thank you