Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 1997 14:54:53 -0800 (PST)
From:      John-Mark Gurney <jmg@nike.efn.org>
To:        J Wunsch <j@uriah.heep.sax.de>
Cc:        freebsd-bugs@freefall.freebsd.org, freebsd-gnats-submit@freebsd.org
Subject:   bin/2466 Re: bin/2466: telnet sleeps too much :-)
Message-ID:  <Pine.NEB.3.95.970112144317.16860i-100000@hydrogen.nike.efn.org>
In-Reply-To: <199701121840.KAA10082@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<gurney_j@efn.org>' 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:
-----<begin 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..
-------<end message>------

>  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)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.970112144317.16860i-100000>