Subject: Re: ftpd never dies (again)
To: None <>
From: Jukka Marin <>
List: tech-userlevel
Date: 04/10/1999 00:36:27
On Sat, Mar 27, 1999 at 09:22:59PM -0500, Allen Briggs wrote:
> > On Sat, Mar 27, 1999 at 05:24:49PM -0500, Allen Briggs wrote:
> > > I'm seeing this too, it seems to happen when remote users get cut off
> > > due to network lossage of one sort or another.  I see it in STOR or RETR
> > > or sometimes LIST.  netstat lists the connections as ESTABLISHED.
> > Hmm.  But if keepalive was working, shouldn't it kill the connection
> > sooner or later (and make ftpd die as well)?
> I just took a look at the code.  There is no keepalive explicitly set
> by ftpd, so if the server is waiting for data, it will never time out.
> The only timeouts appear to be on the initial connect and when waiting
> for a command.
> Setting keepalive on the socket would be the easiest fix for this.
> Anyone object to the following patch?

I tried the patch.  I think it helps a bit, but there seem to be two ftpd's
stuck again:

mercury  23729  0.0  0.0   180  252 ??  IW   10:53AM    0:00.18 ftpd: mercury: STOR SAATANT.WAV\r\n (ftpd)
vuori    24648  0.0  0.0   188  252 ??  IW    6:47PM    0:00.11 ftpd: vuori: STOR emaili.gif\r\n (ftpd)

(It's now the next day AND these connections don't show up in netstat,
so I presume they are actually dead, but ftpd doesn't know it.)

Maybe some timeout to kill ftpd after 4 hours of idling or....