netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Simon Kirby <sim@hostway.ca>, David Miller <davem@davemloft.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Dave Jones <davej@redhat.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Ingo Molnar <mingo@elte.hu>,
	Network Development <netdev@vger.kernel.org>
Subject: Re: Linux 3.1-rc9
Date: Wed, 2 Nov 2011 18:54:52 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.02.1111021849170.2829@ionos> (raw)
In-Reply-To: <1320254854.2292.14.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2793 bytes --]

On Wed, 2 Nov 2011, Eric Dumazet wrote:

> Le mercredi 02 novembre 2011 à 17:40 +0100, Thomas Gleixner a écrit :
> > On Mon, 31 Oct 2011, Simon Kirby wrote:
> > > On Tue, Oct 25, 2011 at 01:20:49PM -0700, Simon Kirby wrote:
> > > 
> > > > On Mon, Oct 24, 2011 at 12:02:03PM -0700, Simon Kirby wrote:
> > > > 
> > > > > Ok, hit the hang about 4 more times, but only this morning on a box with
> > > > > a serial cable attached. Yay!
> > > > 
> > > > Here's lockdep output from another box. This one looks a bit different.
> > > 
> > > One more, again a bit different. The last few lockups have looked like
> > > this. Not sure why, but we're hitting this at a few a day now. Thomas,
> > > this is without your patch, but as you said, that's right before a free
> > > and should print a separate lockdep warning.
> > > 
> > > No "huh" lines until after the trace on this one. I'll move to 3.1 with
> > 
> > That means that the lockdep warning hit in the same net_rx cycle
> > before the leak was detected by the softirq code.
> > 
> > > cherry-picked b0691c8e now.
> > 
> > Can you please add the debug patch below and try the following:
> > 
> > Enable CONFIG_FUNCTION_TRACER & CONFIG_FUNCTION_GRAPH_TRACER
> > 
> > # cd $DEBUGFSMOUNTPOINT/tracing
> > # echo sk_clone >set_ftrace_filter
> > # echo function >current_tracer
> > # echo 1 >options/func_stack_trace
> > 
> > Now wait until it reproduces (which stops the trace) and read out
> > 
> > # cat trace >/tmp/trace.txt
> > 
> > Please provide the trace file along with the lockdep splat. That
> > should tell us which callchain is responsible for the spinlock
> > leakage.
> > 
> > Thanks,
> > 
> > 	tglx
> > 
> > --------------->
> >  kernel/softirq.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > Index: linux-2.6/kernel/softirq.c
> > ===================================================================
> > --- linux-2.6.orig/kernel/softirq.c
> > +++ linux-2.6/kernel/softirq.c
> > @@ -238,6 +238,7 @@ restart:
> >  			h->action(h);
> >  			trace_softirq_exit(vec_nr);
> >  			if (unlikely(prev_count != preempt_count())) {
> > +				tracing_off();
> >  				printk(KERN_ERR "huh, entered softirq %u %s %p"
> >  				       "with preempt_count %08x,"
> >  				       " exited with %08x?\n", vec_nr,
> 
> 
> I believe it might come from commit 0e734419
> (ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)
> 
> In case inet_csk_route_child_sock() returns NULL, we dont release socket
> lock.

The same applies for if (__inet_inherit_port(sk, newsk) < 0) a few
lines further down, but that part was leaking the lock before that
commit already.

Just for the record, the locking in that code is mind boggling. It
took me some detective work to find even the place where the success
code path unlocks the lock :(

Thanks,

	tglx

  parent reply	other threads:[~2011-11-02 17:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1318847658.6594.40.camel@twins>
     [not found] ` <CA+55aFxaGKEyhXdHXNxvPrPQ-SGSpbXdfoeXrxfjPx3VXsgvtg@mail.gmail.com>
     [not found]   ` <1318874090.4172.84.camel@twins>
     [not found]     ` <CA+55aFwCBy=4YK6amE=H-BYu9-boj4Po2Zkgf4V261mCx0DC4A@mail.gmail.com>
     [not found]       ` <1318879396.4172.92.camel@twins>
     [not found]         ` <alpine.LFD.2.02.1110172237030.3240@ionos>
     [not found]           ` <alpine.LFD.2.02.1110181037120.3240@ionos>
     [not found]             ` <1318928713.21167.4.camel@twins>
     [not found]               ` <20111018182046.GF1309@hostway.ca>
     [not found]                 ` <alpine.LFD.2.02.1110182146440.3240@ionos>
     [not found]                   ` <20111024190203.GA24410@hostway.ca>
2011-10-25  7:13                     ` Linux 3.1-rc9 Linus Torvalds
2011-10-25  9:01                       ` David Miller
2011-10-25 12:30                         ` Thomas Gleixner
2011-10-25 23:18                           ` David Miller
2011-10-25 20:20                     ` Simon Kirby
2011-10-31 17:32                       ` Simon Kirby
2011-11-02 16:40                         ` Thomas Gleixner
2011-11-02 17:27                           ` Eric Dumazet
2011-11-02 17:46                             ` Linus Torvalds
2011-11-02 17:53                               ` Eric Dumazet
2011-11-02 18:00                                 ` Linus Torvalds
2011-11-02 18:05                                   ` Eric Dumazet
2011-11-02 18:10                                     ` Linus Torvalds
2011-11-02 17:49                             ` Eric Dumazet
2011-11-02 17:58                               ` Eric Dumazet
2011-11-02 19:16                                 ` Simon Kirby
2011-11-02 22:42                                   ` Eric Dumazet
2011-11-03  0:24                                     ` Thomas Gleixner
2011-11-03  0:52                                     ` Simon Kirby
2011-11-03 22:07                                       ` David Miller
2011-11-03  6:06                                     ` Jörg-Volker Peetz
2011-11-02 17:54                             ` Thomas Gleixner [this message]
2011-11-02 18:04                               ` Eric Dumazet
2011-11-02 18:28                           ` Simon Kirby
2011-11-02 18:30                             ` Thomas Gleixner
2011-11-02 22:10                         ` Steven Rostedt
2011-11-02 23:00                           ` Steven Rostedt
2011-11-03  0:09                             ` Simon Kirby
2011-11-03  0:15                               ` Steven Rostedt
2011-11-03  0:17                                 ` Simon Kirby
     [not found] <CA+55aFxPNszU5UHFrDDYnshLEMupaviFwhgEsgmPkqpmuWNZ8A@mail.gmail.com>
     [not found] ` <20111007070842.GA27555@hostway.ca>
     [not found]   ` <20111007174848.GA11011@hostway.ca>
     [not found]     ` <1318010515.398.8.camel@twins>
     [not found]       ` <20111008005035.GC22843@hostway.ca>
     [not found]         ` <1318060551.8395.0.camel@twins>
     [not found]           ` <20111012213555.GC24461@hostway.ca>
2011-10-18  5:40             ` Simon Kirby

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=alpine.LFD.2.02.1111021849170.2829@ionos \
    --to=tglx@linutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=davej@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=sim@hostway.ca \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).