[DONE]Killing zombie process

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[DONE]Killing zombie process

Postby mackowiakp » Jul 1st, '16, 10:38

I use thirty party application on M5 working 24/7/365. The problem is that this app once per 2-3 months disappear but leave zombie process. I can not kill such process and it is impossible to restart app because it says that app is already running. I have no access to code of this app.
As far as I know, the only way to kill zombie process is killing parent process. But the parent process is init. It is not necessary to run app from init. I can start it from cron using entry:

Code: Select all
@reboot sleep 120;may_app&


I can not test it on-line (because it occurs once per 2-3 months) so my question is:
If I will use the upper syntax (with "&" at the end), the parent process will be cron? If so I can turn off crond service for a moment, kill zombie and start crond again. Will it work properly? Any other proposal?
Last edited by mackowiakp on Aug 1st, '16, 09:06, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Killing zombie process

Postby doktor5000 » Jul 1st, '16, 17:07

mackowiakp wrote:As far as I know, the only way to kill zombie process is killing parent process.

No, you cannot kill a zombie. Only way to achieve something similar is to send SIGCHLD to the parent so it reaps its child processes, at least if a handler for that is implemented ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Killing zombie process

Postby mackowiakp » Jul 1st, '16, 19:48

So, the only solution is computer reboot?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Killing zombie process

Postby doktor5000 » Jul 2nd, '16, 17:49

No, why do you assume that?

Did you try to send SIGCHLD to the parents PID? Could you provide some actual output like
proctree -pas PID (against the app's PID) or some ps aux output of the app and the parent process ?

Or some more details about the app, if it uses any kernel module, or sockets or whatever.
As when it would be a child of the init process (systemd) then it would be periodically reaped, and it it doesn't get reaped then there might probably be a kernel bug involved.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Killing zombie process

Postby mackowiakp » Jul 2nd, '16, 19:40

I will ask producer of the app about some details. But it is app dedicated for service of measurement module, connected to server over USB with RS232 emulation. So - as far as I know - the only libusb is used. It works via /dev/ttyUSB0 simply.
Never the less, I will ask Agilent (branch of HP), issuer of hardware and software. Then I will be back.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Killing zombie process

Postby doktor5000 » Jul 3rd, '16, 18:22

You can also check with lsof or for that PID under /proc/PID/... what sockets it uses or any filehandles it has open, and also if it uses some kind of lock or pid file somewhere under /var or /run which you may need to remove if it gets a zombie if it cannot be prevented. There's no need to kill the zombie process for that (as it's already dead).
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Killing zombie process

Postby mackowiakp » Jul 3rd, '16, 19:11

THX for advice. As I wrote, it occurs very rare. So we have to wait for such situation and than will check the system as You advice.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Killing zombie process

Postby mackowiakp » Aug 1st, '16, 09:06

I got new version of software from Agilent. As release notes stands, zombie process problem is resolved. Nether the less, it is not M5 related problem. So topic closed.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest