Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Why tty ID is set to ?? for an interactive process?
@ 2002-12-10  4:47 Williamcin
  2002-12-11  7:54 ` Nikola Milutinovic
  0 siblings, 1 reply; 4+ messages in thread
From: Williamcin @ 2002-12-10  4:47 UTC (permalink / raw)


I wonder if someone can tell me what's wrong with my Tru64 Unix V5.1a system.

From time to time when we run an inhouse developed software, the Unix process
will end up using  99% of CPU (basically it is looping) with tty set to "??".

Normally, after the user log onto my Unix server, they will run a ksh script.
Inside the script, it will do some key definations and then invoke the binary
executables. The following is the normal output when I do a "ps -ef|grep
mytools" for a user c1511

==============
c1511    329614 329367  0.0 15:00:58 pts/7        0:00.01 run_mytools
c1511    329623 329614  0.0 15:00:58 pts/7        0:00.45 /tools/mytools
==============

That is the perfect situation; however, from time to time, the /tools/mytools
process will go into loop, taking 99% of the CPU with the tty ID set to "??"
and the parent process ID become 1.

This situation can happen on any users, at any particular time and from PC to
PC (running the telnet session). When this happened, the "ps -ef|grep mytools"
for the particular user will be something like

================	
GAMALLOM 414726      1 98.3 12:12:13 ??           6:48.66 /tools/mytools
================

I don't believe it is a bug on "mytools" as this problem happened randomly and
can't be reproduced at will. It can happen on any users with any PC and at any
time.

I am looking for any possible explanation on

a) what's happening to the run_mytools script process?
b) why the tty ID become ?? for an interactive process which should attach to a
tty

and if possible, some hints to pin down the problem and find out a solution for
this.

Many thanks for the help.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why tty ID is set to ?? for an interactive process?
  2002-12-10  4:47 Why tty ID is set to ?? for an interactive process? Williamcin
@ 2002-12-11  7:54 ` Nikola Milutinovic
  2002-12-11 23:01   ` BillLi
  0 siblings, 1 reply; 4+ messages in thread
From: Nikola Milutinovic @ 2002-12-11  7:54 UTC (permalink / raw)


Williamcin wrote:
> I wonder if someone can tell me what's wrong with my Tru64 Unix V5.1a system.
> 
> From time to time when we run an inhouse developed software, the Unix process
> will end up using  99% of CPU (basically it is looping) with tty set to "??".


> This situation can happen on any users, at any particular time and from PC to
> PC (running the telnet session). When this happened, the "ps -ef|grep mytools"
> for the particular user will be something like
> 
> ================	
> GAMALLOM 414726      1 98.3 12:12:13 ??           6:48.66 /tools/mytools
> ================
> 
> a) what's happening to the run_mytools script process?
> b) why the tty ID become ?? for an interactive process which should attach to a
> tty

This would be due to that process refusing to exit and the user (who started it) 
logging out. The fact it is using 99% CPU tells you that it is a runaway 
process, stuck in an infinite loop, ignoring HUP signal. The user logged out and 
the child process lost it's controlling terminal, that's why it's set to "??".

If it is in-house developed, attach a debugger to that process and see where 
it's stuck looping.

Nix.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why tty ID is set to ?? for an interactive process?
  2002-12-11  7:54 ` Nikola Milutinovic
@ 2002-12-11 23:01   ` BillLi
  2002-12-12  6:34     ` Nikola Milutinovic
  0 siblings, 1 reply; 4+ messages in thread
From: BillLi @ 2002-12-11 23:01 UTC (permalink / raw)


Hi Nix,

Thanks for the reply. When you said

> This would be due to that process refusing to exit and the user (who
started it)
> logging out

I am pretty sure that is the case as most of the time this problem happended
in the late afternoon (even though it can happen at any time) when people
finished their works for the day and logout.

The question is why the process refusing to exit? When the user logout, I
would assume the script (parent) process will send the HUP signal to the
child process and this "kill" signal should kill the child process. Looks
like either the child process didn't receive this or the child process
received the signal but something is running in a higher priority.

Would this have anything to do with the kernel parameter settings e.g.
semaphore that required to be tuned? Also, why the problem is only happening
from time to time but can't be reproduced at will?

Many thanks for the help.
Best regards,
William



"Nikola Milutinovic" <Nikola.Milutinovic@ev.co.yu> wrote in message
news:3DF6EF4F.5000605@ev.co.yu...
> Williamcin wrote:
> > I wonder if someone can tell me what's wrong with my Tru64 Unix V5.1a
system.
> >
> > From time to time when we run an inhouse developed software, the Unix
process
> > will end up using  99% of CPU (basically it is looping) with tty set to
"??".
>
>
> > This situation can happen on any users, at any particular time and from
PC to
> > PC (running the telnet session). When this happened, the "ps -ef|grep
mytools"
> > for the particular user will be something like
> >
> > ================
> > GAMALLOM 414726      1 98.3 12:12:13 ??           6:48.66 /tools/mytools
> > ================
> >
> > a) what's happening to the run_mytools script process?
> > b) why the tty ID become ?? for an interactive process which should
attach to a
> > tty
>
> This would be due to that process refusing to exit and the user (who
started it)
> logging out. The fact it is using 99% CPU tells you that it is a runaway
> process, stuck in an infinite loop, ignoring HUP signal. The user logged
out and
> the child process lost it's controlling terminal, that's why it's set to
"??".
>
> If it is in-house developed, attach a debugger to that process and see
where
> it's stuck looping.
>
> Nix.
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why tty ID is set to ?? for an interactive process?
  2002-12-11 23:01   ` BillLi
@ 2002-12-12  6:34     ` Nikola Milutinovic
  0 siblings, 0 replies; 4+ messages in thread
From: Nikola Milutinovic @ 2002-12-12  6:34 UTC (permalink / raw)


BillLi wrote:

> The question is why the process refusing to exit? When the user logout, I
> would assume the script (parent) process will send the HUP signal to the
> child process and this "kill" signal should kill the child process. Looks
> like either the child process didn't receive this or the child process
> received the signal but something is running in a higher priority.

Any process can decide to ignore signalls - all, except SIGKILL, which is never 
received actually, but the kernel just kills the recipient of the signal. This 
override is done via a system call "sigaction()".

> Would this have anything to do with the kernel parameter settings e.g.
> semaphore that required to be tuned? Also, why the problem is only happening
> from time to time but can't be reproduced at will?

Two things. One - try to find out if your application is calling "sigaction()", 
either search the source or use "alpha-trace-1.34" (or whatever it is called) to 
trace system calls. Two - if it is in-house developed, get ahold of a developer, 
connect a debugger to such a process and see where it's looping (even "dbx" can 
do this, let alone "LaDebug").

Nix.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-12  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-10  4:47 Why tty ID is set to ?? for an interactive process? Williamcin
2002-12-11  7:54 ` Nikola Milutinovic
2002-12-11 23:01   ` BillLi
2002-12-12  6:34     ` Nikola Milutinovic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox