Operating System - HP-UX
1833053 Members
2534 Online
110049 Solutions
New Discussion

Process won't die on shutdown

 
SOLVED
Go to solution
Michael D'Aulerio
Regular Advisor

Process won't die on shutdown

One of our users ran into a strange problem. There was a process running away on one of the workstations and he was unable to kill it via a TERM or KILL signal so he was shut the system down . I think the process wouldn't die because it was stuck accessing a device.
As the system was shutting down he got the warning "CAUTION: some process(es) wouldn't die" and "12345 not killed". 12345 was the PID of the runaway process.

So far there's nothing out of the ordinary. Here's the strange part. He claims that after he cycled power and brought the system back up, the same process, with the same PID number was again running away. I think that either 1) he misread the PID numbers or 2) the matching PID number was a coincidence. I know that's a long shot but if the process starts early enough in the boot cycle, it could get the same PID upon bootup.

Is there something I'm missing here. Is there any way that HP-UX doesn't clear its process table on shutdown/reboot and would retain an entry from a previous run? I thought the system started with a clean process table on every boot.

Mike D'.

Email: michael.n.daulerio@lmco.com
8 REPLIES 8
John Poff
Honored Contributor
Solution

Re: Process won't die on shutdown

Hi,

Most likely it is a coincidence. If your user did a 'shutdown -r' and the box rebooted, the process died.

JP
Michael D'Aulerio
Regular Advisor

Re: Process won't die on shutdown

Thanks. I know HP-UX has zombie processes but I didn't think any would come back to life after a reboot.
Email: michael.n.daulerio@lmco.com
Patrick Wallek
Honored Contributor

Re: Process won't die on shutdown

There ARE a FEW processes that get the same PID on each reboot. The 'init' process is ALWAYS PID 1, 'swapper' is always 0, on a couple of my machines 'vhand' is 2.

If the process in question was trying to access a device that is unavailable (ie. dead, hardware failed, etc.) then it is true that it would not be able to be killed, but there is NO WAY the process would still be there after a reboot.

If the process you are talking about is started when the system boots, the it is very possible that it would get the same PID after each boot. And if there is a harware problem then it is possible that it could appear as if that process were still there, when in reality it is a brand new incarnation of that process, just with the same PID and the same problem.

HP-UX ALWAYS starts with a clean process table when the system boots. There is absolutely no way that I know of that it can have any processes left over after a boot.

It sounds as if you need to look deeper into the problem and see what types of hardware issues you may have that are causing this.
Jeff Schussele
Honored Contributor

Re: Process won't die on shutdown

Hi Mike,

Well, it will/may come back to life if:

a) It starts out of /etc/inittab
b) It starts from an rcX script
c) It's an on-demand process from /etc/inetd.conf & it's being called.
d) It's started from a user's .profile or .login script

I'd start looking at these to find out just where it comes to life from.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Colin Topliss
Esteemed Contributor

Re: Process won't die on shutdown

When a process is created, it gets assigned a PID number. That number is stored internally (not sure of the structure name under HP-UX, but generally known as mpid under SVr4). Once a PID has been assigned, that process owns it until is is complete. It cannot be changed on the fly.

It is possible (though unlikely) that the PID could have been read from mpid - but for that to happen the process you are talking about would have had to have been the last process started before the reboot and the first to be re-started after the reboot (after init and a couple of others). Thats a *very* long shot.

Personally I think he mis-read it. ;-)

Col
Gerhard Roets
Esteemed Contributor

Re: Process won't die on shutdown

Well Mike

The process definitely died ... UNIX zombies is not Night of the Zombies Zombies :P

JUst to clarify it though. When the machine boots the process numbering starts from scratch. So if nothing was installed(that loads before it) between this boot and the next and the process autostarts on boot, and that process was never killed of before. The odds is rather good it can have the same PID ... because it loads in the same sequence.

HTH

Regards
Gerhard
Michael D'Aulerio
Regular Advisor

Re: Process won't die on shutdown

Thanks to everyone for all the info. The process causing the problem starts up at login and not at bootup. I think he has some bad hardware and I'm looking into it. Unfortunately the user is at a remote site and I have to do everything via email and over the phone.
Gerhard,
That crack about zombies was my lame attempt at a joke.
Email: michael.n.daulerio@lmco.com
Michael D'Aulerio
Regular Advisor

Re: Process won't die on shutdown

We're checking the cables on all the externals on the system. Definitely a H/W problem. Thanks again.
Email: michael.n.daulerio@lmco.com