netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Telnet closing delay
@ 2007-05-01 20:48 Beschorner Daniel
  2007-05-02  9:19 ` Evgeniy Polyakov
  0 siblings, 1 reply; 5+ messages in thread
From: Beschorner Daniel @ 2007-05-01 20:48 UTC (permalink / raw)
  To: netdev

Since 2.6.21 I often got a 2 seconds delay when closing a telnet session
to such a machine (even to localhost).
I was at least not aware of this with older versions, but maybe I'm
wrong?!?

Client with delay:

0.000062 select(4, [0 3], [], [3], NULL) = 1 (in [3])
1.803057 recvfrom(3, "", 8192, 0, NULL, NULL) = 0

without delay:

0.000061 select(4, [0 3], [], [3], NULL) = 1 (in [3])
0.001491 recvfrom(3, "", 8192, 0, NULL, NULL) = 0

Server with delay:

0.000095 select(4, [0 3], [], [0], NULL) = 1 (in [3])
0.001779 read(3, 0x8059de0, 8192)  = -1 EIO (Input/output error)
0.000103 select(4, [0 3], [], [0], NULL) = 1 (in [3])
0.000171 read(3, 0x8059de0, 8192)  = -1 EIO (Input/output error)
 ---- and 10000 lines more of this select/read----
0.000103 select(4, [0 3], [], [0], NULL) = 1 (in [3])
0.000343 --- SIGCHLD (Child exited) @ 0 (0) ---

without delay:

0.000100 select(4, [0 3], [], [0], NULL) = 1 (in [3])
0.001757 --- SIGCHLD (Child exited) @ 0 (0) ---

Daniel

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

* Re: Telnet closing delay
  2007-05-01 20:48 Telnet closing delay Beschorner Daniel
@ 2007-05-02  9:19 ` Evgeniy Polyakov
  2008-04-03  9:32   ` Beschorner Daniel
  0 siblings, 1 reply; 5+ messages in thread
From: Evgeniy Polyakov @ 2007-05-02  9:19 UTC (permalink / raw)
  To: Beschorner Daniel; +Cc: netdev

On Tue, May 01, 2007 at 10:48:11PM +0200, Beschorner Daniel (Daniel.Beschorner@facton.com) wrote:
> Since 2.6.21 I often got a 2 seconds delay when closing a telnet session
> to such a machine (even to localhost).
> I was at least not aware of this with older versions, but maybe I'm
> wrong?!?
> Server with delay:
> 
> 0.000095 select(4, [0 3], [], [0], NULL) = 1 (in [3])
> 0.001779 read(3, 0x8059de0, 8192)  = -1 EIO (Input/output error)

Hmm, does not it supposed to stop doing such things on the closed
socket and not enter 10000 select/read loop?
Server behaves incorrectly in this scenario, why and how it can be fixed
is another questions better asked the author.

-- 
	Evgeniy Polyakov

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

* Re: Telnet closing delay
  2007-05-02  9:19 ` Evgeniy Polyakov
@ 2008-04-03  9:32   ` Beschorner Daniel
  2008-04-03 10:42     ` Evgeniy Polyakov
  0 siblings, 1 reply; 5+ messages in thread
From: Beschorner Daniel @ 2008-04-03  9:32 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: netdev

> On Tue, May 01, 2007 at 10:48:11PM +0200, Beschorner Daniel
(Daniel.Beschorner@facton.com) wrote:
>> Since 2.6.21 I often got a 2 seconds delay when closing a telnet
session
>> to such a machine (even to localhost).
>> I was at least not aware of this with older versions, but maybe I'm
>> wrong?!?
>> Server with delay:
>> 
>> 0.000095 select(4, [0 3], [], [0], NULL) = 1 (in [3])
>> 0.001779 read(3, 0x8059de0, 8192)  = -1 EIO (Input/output error)

> Hmm, does not it supposed to stop doing such things on the closed
> socket and not enter 10000 select/read loop?
> Server behaves incorrectly in this scenario, why and how it can be
fixed
> is another questions better asked the author.

It must have been indeed triggered by a kernel change or bug, with
current 2.6.24.4 all works fine again.

Daniel

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

* Re: Telnet closing delay
  2008-04-03  9:32   ` Beschorner Daniel
@ 2008-04-03 10:42     ` Evgeniy Polyakov
  2008-04-03 12:04       ` Beschorner Daniel
  0 siblings, 1 reply; 5+ messages in thread
From: Evgeniy Polyakov @ 2008-04-03 10:42 UTC (permalink / raw)
  To: Beschorner Daniel; +Cc: netdev

Hi.

On Thu, Apr 03, 2008 at 11:32:14AM +0200, Beschorner Daniel (Daniel.Beschorner@facton.com) wrote:
> >> 0.000095 select(4, [0 3], [], [0], NULL) = 1 (in [3])
> >> 0.001779 read(3, 0x8059de0, 8192)  = -1 EIO (Input/output error)
> 
> > Hmm, does not it supposed to stop doing such things on the closed
> > socket and not enter 10000 select/read loop?
> > Server behaves incorrectly in this scenario, why and how it can be
> fixed
> > is another questions better asked the author.
> 
> It must have been indeed triggered by a kernel change or bug, with
> current 2.6.24.4 all works fine again.

I really do not remember what was one year ago, but having a long loop
checking closed socket status is wrong. In recent kernels returned error
could be changed to something like -EINVAL, which is correctly handled
by application, it is impossible to say without caling mind readers, but
they are on vacations right now...

It can be some obscure kernel bug which was fixed or hidden, but with
above description it is hardly possible to tell what is going on.

-- 
	Evgeniy Polyakov

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

* Re: Telnet closing delay
  2008-04-03 10:42     ` Evgeniy Polyakov
@ 2008-04-03 12:04       ` Beschorner Daniel
  0 siblings, 0 replies; 5+ messages in thread
From: Beschorner Daniel @ 2008-04-03 12:04 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: netdev

> checking closed socket status is wrong. In recent kernels returned
error
> could be changed to something like -EINVAL, which is correctly handled

No worries, I just wanted to mention for the annals...
It's a rather old, but standard distro's, telnet server.

Daniel

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

end of thread, other threads:[~2008-04-03 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-01 20:48 Telnet closing delay Beschorner Daniel
2007-05-02  9:19 ` Evgeniy Polyakov
2008-04-03  9:32   ` Beschorner Daniel
2008-04-03 10:42     ` Evgeniy Polyakov
2008-04-03 12:04       ` Beschorner Daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).