mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@lisas.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andreas Mohr <andi@lisas.de>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	John Stultz <johnstul@us.ibm.com>
Subject: Re: clocksource mutex deadlock, cat current_clocksource (2.6.33-rc6/7)
Date: Mon, 8 Feb 2010 10:37:19 +0100	[thread overview]
Message-ID: <20100208093719.GA15428@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1002081010330.2811@localhost.localdomain>

On Mon, Feb 08, 2010 at 10:13:00AM +0100, Thomas Gleixner wrote:
> On Mon, 8 Feb 2010, Andreas Mohr wrote:
> > 
> > And then a cat current_clocksource managed to hang again.
> 
> Well, that's not surprising at all. If one task is stuck on clocksource_mutex,
> then the next one will be stuck as well.

I believe here you are pointing at the initial bootup acpi_pm lockup which NMI
watchdog detected. And not some thought that I somehow simply executed
cat current_clocksource twice, given my wording which might erroneously
hint at that.


So you'd think that we have a clocksource_mutex problem even before
the initial bootup switch to acpi_pm?

However I don't see how this could be the case, given that in some instances
boot does continue after acpi_pm selection, albeit after a delay.

> > (NOTE that the - now complete! - SysRq-T list does NOT show any backtraces
> > of kwatchdog any more, only many other processes)
> > Could it be that the (rather disruptive) NMI watchdog confuses the current state at
> > change_clocksource and causes that stuff to get left with
> > clocksource_mutex remaining taken?
> 
> Nope, the NMI watchdog is not involved. It merily tells us that the
> task is stuck.

OK.
And after that message debug_locks is zeroed and kwatchdog is gone
from the process list (probably during debug_locks change).



I still can't make much reason of this behaviour.
If we have a problem during acpi_pm selection on boot, then by all
accounts it should get stuck completely (plus yielding watchdog's lockup
message), not continue booting after some weird delay.
OK, this particular delay phenomenon could still be explained
by a pretty severe contention,
but then after successfully having gotten the mutex it certainly
shouldn't happen that then even after bootup the mutex remains blocked
(as witnessed by the cat current_clocksource issue).
After all all mutex use is fully symmetric, no surprises IMHO - unless
NMI / SMI or so are involved.



I'll explain what I think might be happening:
bootup switches to acpi_pm, timekeeping gets borked, NMI watchdog complains
due to timekeeping issues, brutally yanks the waiting acpi_pm switchover
(thereby NOT releasing clocksource_mutex),
and the result is that I have cat current_clocksource stuck in my userspace.

Andreas Mohr

  reply	other threads:[~2010-02-08  9:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-06 14:21 clocksource mutex deadlock, cat current_clocksource (2.6.33-rc6) Andreas Mohr
2010-02-06 14:46 ` Thomas Gleixner
2010-02-07 19:19   ` Andreas Mohr
2010-02-08  5:38     ` clocksource mutex deadlock, cat current_clocksource (2.6.33-rc6/7) Andreas Mohr
2010-02-08  9:13       ` Thomas Gleixner
2010-02-08  9:37         ` Andreas Mohr [this message]
2010-02-08 10:06           ` Thomas Gleixner
2010-02-08 19:47             ` Andreas Mohr
2010-02-08 20:28               ` Thomas Gleixner
2010-02-08 20:40                 ` Thomas Gleixner
2010-02-08 20:51                   ` Andreas Mohr
2010-02-08 21:02                     ` Andreas Mohr
2010-02-08 21:16                       ` Thomas Gleixner
2010-02-09 10:02                       ` Thomas Gleixner
2010-02-09 22:13                         ` Andreas Mohr
2010-02-14 18:27                         ` Andreas Mohr
2010-02-15  6:21                           ` Andreas Mohr
2010-02-08 20:43                 ` Andreas Mohr
2010-02-08 20:39               ` Andreas Mohr

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=20100208093719.GA15428@rhlx01.hs-esslingen.de \
    --to=andi@lisas.de \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.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

all inboxes | Powered by JetHome®