public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Ingo Molnar <mingo@redhat.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Steven Rostedt <rostedt@goodmis.org>,
	Dave Jones <davej@redhat.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Nicolas Pitre <nico@linaro.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: lockdep splat in CPU hotplug
Date: Fri, 24 Oct 2014 16:33:45 +0200	[thread overview]
Message-ID: <20141024143345.GL12706@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1410221125280.22681@pobox.suse.cz>

On Wed, Oct 22, 2014 at 11:53:49AM +0200, Jiri Kosina wrote:
> > The reason for CCing Ingo and Peter is that I can't make any sense of one 
> > of the stacktraces lockdep is providing.
> > 
> > Please have a look at the very first stacktrace in the dump, where lockdep 
> > is trying to explain where cpu_hotplug.lock#2 has been acquired. It seems 
> > to imply that cpuidle_pause() is taking cpu_hotplug.lock, but that's not 
> > the case at all.
> > 
> > What am I missing?

> Still, the lockdep stacktrace is bogus and didn't really help 
> understanding this. Any idea why it's wrong?

> > -> #1 (cpu_hotplug.lock#2){+.+.+.}:
> >         [<ffffffff81099fac>] lock_acquire+0xac/0x130
> >         [<ffffffff815b9f2c>] mutex_lock_nested+0x5c/0x3b0
> >         [<ffffffff81491892>] cpuidle_pause+0x12/0x30
> >         [<ffffffff81402314>] dpm_suspend_noirq+0x44/0x340
> >         [<ffffffff81402958>] dpm_suspend_end+0x38/0x80
> >         [<ffffffff810a07bd>] hibernation_snapshot+0xcd/0x370
> >         [<ffffffff810a1248>] hibernate+0x168/0x210
> >         [<ffffffff8109e9b4>] state_store+0xe4/0xf0
> >         [<ffffffff813003ef>] kobj_attr_store+0xf/0x20
> >         [<ffffffff8121e9a3>] sysfs_kf_write+0x43/0x60
> >         [<ffffffff8121e287>] kernfs_fop_write+0xe7/0x170
> >         [<ffffffff811a7342>] vfs_write+0xb2/0x1f0
> >         [<ffffffff811a7da4>] SyS_write+0x44/0xb0
> >         [<ffffffff815be856>] system_call_fastpath+0x16/0x1b

Right, so I've seen it more often, and I'm not sure I can explain
either.

Lockdep uses save_stack_trace() with trace->skip=3, typically if you
get ->skip wrong you'd not even see the lock_acquire, so that can't be
it.

The only thing I can come up with is that for some reason the
intermediate entries are !reliable, save_stack_trace() skips those for
CONFIG_FRAME_POINTER=y, see
arch/x86/kernel/stacktrace.c:__save_stack_address().

      parent reply	other threads:[~2014-10-24 14:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21 11:09 lockdep splat in CPU hotplug Jiri Kosina
2014-10-21 14:58 ` Steven Rostedt
2014-10-21 15:04   ` Jiri Kosina
2014-10-22 18:37     ` Steven Rostedt
2014-10-22 18:40       ` Jiri Kosina
2014-10-22 18:46         ` Borislav Petkov
2014-10-21 15:10 ` Dave Jones
2014-10-21 15:21   ` Jiri Kosina
2014-10-21 16:00     ` Paul E. McKenney
2014-10-21 16:04       ` Jiri Kosina
2014-10-21 16:23         ` Paul E. McKenney
2014-10-22  9:53 ` Jiri Kosina
2014-10-22 11:39   ` Jiri Kosina
2014-10-22 14:28   ` Daniel Lezcano
2014-10-22 14:36     ` Jiri Kosina
2014-10-22 14:45       ` Daniel Lezcano
2014-10-22 14:38   ` Paul E. McKenney
2014-10-22 16:54     ` Paul E. McKenney
2014-10-22 18:57       ` Paul E. McKenney
2014-10-22 20:57         ` Jiri Kosina
2014-10-22 21:09           ` Paul E. McKenney
2014-10-23  8:11             ` Borislav Petkov
2014-10-23 14:56               ` Paul E. McKenney
2014-10-22 16:59   ` Steven Rostedt
2014-10-22 17:26     ` Jiri Kosina
2014-10-24 14:33   ` Peter Zijlstra [this message]

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=20141024143345.GL12706@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=davej@redhat.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nico@linaro.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.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