[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abandoned CVS server processes

From: Dan Peterson
Subject: Re: Abandoned CVS server processes
Date: Tue, 5 Mar 2002 23:12:25 -0800 (Pacific Standard Time)

On Mon, 4 Mar 2002, Larry Jones wrote:

> Dan Peterson writes:
> >
> > While investigating an issue with CVS server processes (pserver
> > v1.11), I noticed a number of processes that didn't appear to be
> > talking to a client anymore and had been hanging around for many hours
> > or even days.
> What state does netstat say the connections are in?


> > Some of the processes had a parent process ID of 1 which tells me the
> > process maintaining the network connection had exited and the process
> > had been adopted by "init".
> That indicates a bug in CVS.  It would be helpful if you could attach to
> such a process with a debugger and get a traceback.

I have not seen this particular case come up again, but I have seen 2
other cases.  (It's possible this case is the same as number 2 below after
a longer period of time... after the process maintaining the network
connection has exited.)

  1. Only a single process exists and it's parent is "inet".  Perhaps this
is normal, if the client doesn't disconnect after each request?  WinCVS is
just a front end for a DOS command interface isn't it?  So wouldn't that
mean the connection should only remain open for a long checkout or commit
(or update or tag, etc)?

These processes appear to be in some kind of wait state and don't seem to
be using any CPU time.  Using truss I've found them in read(), poll() and
write() calls.  They have been hanging around for several hours.

This appears like it might be the case you described where the client went
away and TCP is waiting around?

  2. Two processes; the first has a parent of "inet" and it's child seems
to be spinning and using lots of CPU (after about 34 hours one process has
used about 24 hours of CPU).  The sockets associated with the first
process are in an IDLE state.

I attached to each of the processes in this state with gdb and determined
they were spinning in a tight loop inside rcs.c:translate_symtag().
Inside the main while loop (line 3155) the first if statement (line
3157) fails and the while loop after the if (line 3175) is not entered.

The values for a few vars at this point are:

  (gdb) print cp
  $1 = 0xc6673 ""
  (gdb) print *cp
  $2 = 0 '\000'
  (gdb) print tag[0]
  $3 = 0 '\000'
  (gdb) print len
  $4 = 0
  (gdb) print rcs->symbols_data
  $5 = 0xc6620
  (gdb) print cp[-1]
  $6 = 49 '1'

PS. CVS version is 1.11.

PPS. I compared rcs.c-1.11 with rcs.c-1.11.1p1 and the translate_symtag()
function is the same.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]