linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problems with tcp_retransmit_skb - Please omit the previous incomplete mail
@ 2002-09-26 18:46 Venkatesh Rao
  2002-09-27  3:53 ` kuznet
  0 siblings, 1 reply; 5+ messages in thread
From: Venkatesh Rao @ 2002-09-26 18:46 UTC (permalink / raw)
  To: linux-kernel

Hi,
I have a strange problem with tcp_retransmit_skb. I
will describe my setup before i describe my problem.

Please CC me.

Setup:
ucLinux 2.4.10 based kernel running on a embedded
processor (coldfire) with 40 MIPS processing
capablity.

Problem:
This embedded system sends relatively huge amount of
data (~1.5MB/s) over ethernet to a remote system which
process the data. On a normal case it all works great.
But when there is a lot of traffic on the network
(simulated by running flood ping between two desktop
linux systems connected to the same hub as this
embedded system), embedded systems Linux TCP/IP stack
go haywire. 

More details:
Since there is a high traffic on the network, the
embedded system cannot transmit packet and this
triggers tcp retransmit in the stack. 

But the first check on the tcp_transmit_skb fails

if (atomic_read(&sk->wmem_alloc) > min_t(int,
sk->wmem_queued+(sk->wmem_queued>>2),sk->sndbuf))
   return -EAGAIN

When conditions fails, the value of wmem_alloc is ~ 
around 56K-154K, sndbuf = 64K and wmem_queued is
around 44K.

Each time it tries to retransmit this if condition
always fail and the whole transmission times out. 

Once this retransmission phase kicks in, even if the
ping flooding is stopped , tcp stack never recovers.

This happens only on the send path of tcp never on the
receive path.

Any hints in  helping me debug this issue will be
appreciated.

Thanks
Venkatesh




__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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

* Re: Problems with tcp_retransmit_skb - Please omit the previous incomplete mail
  2002-09-26 18:46 Problems with tcp_retransmit_skb - Please omit the previous incomplete mail Venkatesh Rao
@ 2002-09-27  3:53 ` kuznet
  2002-09-27 14:43   ` Venkatesh Rao
  0 siblings, 1 reply; 5+ messages in thread
From: kuznet @ 2002-09-27  3:53 UTC (permalink / raw)
  To: Venkatesh Rao; +Cc: linux-kernel

Hello!

> When conditions fails, the value of wmem_alloc is ~ 
> around 56K-154K,

... which means that you already have 64-154K transmitted
and all this buffers still not left the host. So, further
retransmission is pointless.


> Each time it tries to retransmit this if condition
> always fail
...
> Any hints in  helping me debug this issue will be
> appreciated.

Most likely, this means that driver leaks memory.

Alexey

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

* Re: Problems with tcp_retransmit_skb - Please omit the previous incomplete mail
  2002-09-27  3:53 ` kuznet
@ 2002-09-27 14:43   ` Venkatesh Rao
  2002-09-27 14:51     ` kuznet
  0 siblings, 1 reply; 5+ messages in thread
From: Venkatesh Rao @ 2002-09-27 14:43 UTC (permalink / raw)
  To: kuznet; +Cc: linux-kernel

Hi,
Even i thought of this scenario, but what puzzles me,
other sockets running in the system are able to
receive data (ie) send TCP ACKs through the same
driver.

This is the only socket which *sends* relatively huge
amount of data, other sockets running when this
happens are able to receive data (ie) send TCP ACK's.


Retransmit fails only when there is high activity on
the network cable (caused by flood pinging). When
there is no flood pinging(or high network activity),
apps work for days together.

Can this still be a network driver problem?

Thanks & Cheers,
Venkatesh



--- kuznet@ms2.inr.ac.ru wrote:
> Hello!
> 
> > When conditions fails, the value of wmem_alloc is
> ~ 
> > around 56K-154K,
> 
> ... which means that you already have 64-154K
> transmitted
> and all this buffers still not left the host. So,
> further
> retransmission is pointless.
> 
> 
> > Each time it tries to retransmit this if condition
> > always fail
> ...
> > Any hints in  helping me debug this issue will be
> > appreciated.
> 
> Most likely, this means that driver leaks memory.
> 
> Alexey


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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

* Re: Problems with tcp_retransmit_skb - Please omit the previous incomplete mail
  2002-09-27 14:43   ` Venkatesh Rao
@ 2002-09-27 14:51     ` kuznet
  2002-09-29  0:54       ` Venkatesh Rao
  0 siblings, 1 reply; 5+ messages in thread
From: kuznet @ 2002-09-27 14:51 UTC (permalink / raw)
  To: Venkatesh Rao; +Cc: linux-kernel

Hello!

> This is the only socket which *sends* relatively huge

... loses enough of date to overflow, all the rest leak a bit and
silently, until all the memory exhausts and machine dies. :-)


> Can this still be a network driver problem?

No doubts, it is.

Alexey

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

* Re: Problems with tcp_retransmit_skb - Please omit the previous incomplete mail
  2002-09-27 14:51     ` kuznet
@ 2002-09-29  0:54       ` Venkatesh Rao
  0 siblings, 0 replies; 5+ messages in thread
From: Venkatesh Rao @ 2002-09-29  0:54 UTC (permalink / raw)
  To: kuznet; +Cc: linux-kernel

Alexey:
Indeed it was a network driver problem. The circular
buffer queue full condition check was not coded
properly. I will send a patch to Greg Ungerer
correcting this issue.

Thanks a lot for the pointer.
Cheers,
Venkatesh
--- kuznet@ms2.inr.ac.ru wrote:
> Hello!
> 
> > This is the only socket which *sends* relatively
> huge
> 
> ... loses enough of date to overflow, all the rest
> leak a bit and
> silently, until all the memory exhausts and machine
> dies. :-)
> 
> 
> > Can this still be a network driver problem?
> 
> No doubts, it is.
> 
> Alexey


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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

end of thread, other threads:[~2002-09-29  0:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-26 18:46 Problems with tcp_retransmit_skb - Please omit the previous incomplete mail Venkatesh Rao
2002-09-27  3:53 ` kuznet
2002-09-27 14:43   ` Venkatesh Rao
2002-09-27 14:51     ` kuznet
2002-09-29  0:54       ` Venkatesh Rao

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