From owner-freebsd-bugs Sun Jan 12 15:00:03 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA29665 for bugs-outgoing; Sun, 12 Jan 1997 15:00:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA29644; Sun, 12 Jan 1997 15:00:01 -0800 (PST) Date: Sun, 12 Jan 1997 15:00:01 -0800 (PST) Message-Id: <199701122300.PAA29644@freefall.freebsd.org> To: freebsd-bugs Cc: From: John-Mark Gurney Subject: bin/2466 Re: bin/2466: telnet sleeps too much :-) Reply-To: John-Mark Gurney Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2466; it has been noted by GNATS. From: John-Mark Gurney To: J Wunsch Cc: freebsd-bugs@freefall.freebsd.org, freebsd-gnats-submit@freebsd.org Subject: bin/2466 Re: bin/2466: telnet sleeps too much :-) Date: Sun, 12 Jan 1997 14:54:53 -0800 (PST) On Sun, 12 Jan 1997, J Wunsch wrote: oh... this is unrelated... but gnats-submit doesn't pass along the reply-to: that you (Joerg) normally have.. just noticed this.. it will probably be missing my 'Reply-to: John-Mark Gurney ' also... > The following reply was made to PR bin/2466; it has been noted by GNATS. > > From: j@uriah.heep.sax.de (J Wunsch) > To: andrew@ugh.net.au > Cc: freebsd-gnats-submit@FreeBSD.ORG > Subject: Re: bin/2466: telnet sleeps too much :-) > Date: Sun, 12 Jan 1997 19:10:12 +0100 > > As andrew@ugh.net.au wrote: > > > If you leave telnet idle and then type something it will say "sleep(5) > > from telnet, after select". It will continue to work but it messes up > > the screen. > > > >How-To-Repeat: > > telnet somewhere and leave it idle for a while, come back to it and type. > > No, this is not generally repeatable. I can do it over here... just like he says... I sent a message to hackers reciently about this... but didn't get a response... here is the message: ----------- well.. I have a diskless machine (386/25sx 6meg ram, swap also nfs) that regularly gets this message... I notice there was a comment about this... that he (or whoever added it) doesn't like it... I just recompiled telnet to give me the errno when this happens... when it does it gives 14 == EFAULT... it only seems to happen after I've let it be for a while... any body have any suggestions? should I just remove the sleep and be gone with it? thanks for your suggesstions... ttyl.. ------------- > I suspect something special with your network setup. Perhaps you add > a debug printf to see what the actual error code is. as the message states... I have... EFAULT... very wierd is all I can say... > The code in question (modulo some tn3720 hack) is: > > if ((c = select(16, &ibits, &obits, &xbits, > (poll == 0)? (struct timeval *)0 : &TimeValue)) < 0) { > if (c == -1) { > /* > * we can get EINTR if we are in line mode, > * and the user does an escape (TSTP), or > * some other signal generator. > */ > if (errno == EINTR) { > return 0; > } > /* I don't like this, does it ever happen? */ > printf("sleep(5) from telnet, after select\r\n"); > sleep(5); > } > return 0; > } > > ...so the sleep only happens after select() returned -1 (nothing > found) but without EINTR. This is a ``Cannot happen'' situation. > Perhaps you can investigate a little why it happens in your > environment. (Mind you, many people leave telnet sessions idle for > days.) yeh... I know... right now I'm trying to get a tcpdump of a failed select to see if that would possibly help... ok... I got it... the dumped file is 73k... I just managed to reproduce it... it seems to happen when the process (telnet) gets swapped out... the machine is a 386/25sx w/ 6megs ram netbooted with swap over nfs... so if I do some stuff on another console the chances of telnet swapping out are very high... I hope this helps... ttyl... John-Mark gurney_j@efn.org http://resnet.uoregon.edu/~gurney_j/ Modem/FAX: (541) 683-6954 (FreeBSD Box) Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)