Operating System - HP-UX
1847482 Members
4239 Online
110265 Solutions
New Discussion

Re: Process having parent PID 0

 
Krister Valtonen
Occasional Contributor

Process having parent PID 0

I am debugging a multithreaded application that is doing a lot of file handling (stat, reading, writing, decompressing etc.) that only reaches about 10% efficiency. It seems to run smoothly for a few seconds then enters a period of half a minute or more when it seems to be doing nothing. tusc reports

080814 11:07:19 {10083} clock_gettime(CLOCK_REALTIME, 0x77f3c3fc) ....................... = 0
080814 11:07:19 {10083} clock_gettime(CLOCK_REALTIME, 0x77f3c490) ....................... = 0
080814 11:07:20 {10083} ksleep(PTH_CONDVAR_OBJECT, 0x5e0128, 0x5e0130, 0x77f3c3fc) ...... = -ETIMEDOUT

for all the threads during the periods when nothing happens. We are suspecting problems in NFS or the underlying hierarchical storage management system that is used.

Another observation is that the application (myapp) appears as two instances in ps output:

# ps -ef | grep -i "myapp"
ownr 12078 0 0 09:15:20 ? 0:00 myapp
ownr 11527 1 0 08:53:26 ? 0:04 myapp
root 12080 8023 0 09:17:04 pts/tb 0:00 grep -i myapp

One of the processes is owned by PID 1, the other by PID 0. What does this mean? Does this indicate anything about my problem?
1 REPLY 1
Jeeshan
Honored Contributor

Re: Process having parent PID 0

Hi Krister

Some time those process goes to RWAIT (Resourse wait state) or MWAIT state. Then those process has PID 0.

and the PID 1 is init process. that is happened when the poor or bad program.
a warrior never quits