Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: smka2012@email.de
Cc: netdev@vger.kernel.org
Subject: Re: Question regarding kernel panic in net/ipv4/tcp_output.c
Date: Tue, 04 Sep 2012 14:23:08 +0200	[thread overview]
Message-ID: <1346761388.13121.21.camel@edumazet-glaptop> (raw)
In-Reply-To: <trinity-daf22487-c4bf-4a4e-ae69-ed50d70f6169-1346759712289@3capp-webde-bs16>

On Tue, 2012-09-04 at 13:55 +0200, smka2012@email.de wrote:
> Hi,
>  
> I recently had a severe issue with multiple servers that stopped
> working at the same time. By using the stacktrace, I could locate the
> following line in the tcp_retransmit_skb function of the tcp_output.c
> kernel source that led to a kernel panic on all servers. I am using
> Debian 6.0 with the kernel version 2.6.32-45.
>  
> (gdb) list *(tcp_retransmit_skb+0x66)
> 0x1a93 is in tcp_retransmit_skb (net/ipv4/tcp_output.c:1905).
> 1900  if (atomic_read(&sk->sk_wmem_alloc) >
> 1901      min(sk->sk_wmem_queued + (sk->sk_wmem_queued >> 2),
> sk->sk_sndbuf))
> 1902   return -EAGAIN;
> 1903
> 1904  if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) {
> 
> --->
> 1905   if (before(TCP_SKB_CB(skb)->end_seq, tp->snd_una))
> 1906    BUG();
> <---
>  
> 1907   if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq))
> 1908    return -ENOMEM;
> 1909  }
>  
> Now I am interested in getting to know what can lead to a situation
> that the condition in line 1905 evaluates true and why the kernel goes
> into the BUG() function in that case and does not only return an
> error. All servers reached this line of code. They all were connected
> to a switch that broke the same time. However, I cannot say if the
> switch broke before the servers and eventually affected the servers or
> if the switch was also itself affected by some external event. 
>  
> Thank you very much for your help.
>  
> Kind Regards,
> Sascha
> --

You can see this BUG() as an early notification of a hard to
debug/diagnose bug.

We shouldnt take this path at all.

If we do, we have an earlier bug that we should fix anyway, because
machine is going to crash.

It would be nice you sent the stack trace you had.

  reply	other threads:[~2012-09-04 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 11:55 Question regarding kernel panic in net/ipv4/tcp_output.c smka2012
2012-09-04 12:23 ` Eric Dumazet [this message]
2012-09-05  9:01   ` Aw: " "Sascha Mühlbach"

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346761388.13121.21.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=smka2012@email.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox