From: Thomas Gleixner <tglx@linutronix.de>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: clockevents_program_event WARN_ON preventing boot.
Date: Fri, 3 May 2013 00:49:20 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1305022337470.2891@ionos> (raw)
In-Reply-To: <CAE9FiQWFK_ropzW_qQLcNxLYyek8-PHGW-8SxfZJSijvdrss1A@mail.gmail.com>
On Thu, 2 May 2013, Yinghai Lu wrote:
> On Thu, May 2, 2013 at 2:19 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > Can you please apply the following debug patch and provide the output?
> >
> > diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
> > index c6d6400..b4d9622 100644
> > --- a/kernel/time/clockevents.c
> > +++ b/kernel/time/clockevents.c
> > @@ -207,6 +207,8 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires,
> >
> > if (unlikely(expires.tv64 < 0)) {
> > WARN_ON_ONCE(1);
> > + printk_once(KERN_INFO "expires %llx, dev->next %llx\n",
> > + expires.tv64, dev->next_event.tv64);
> [ 3.454628] expires 80000000003d08ff, dev->next 7fffffffffffffff
So dev->next_event == KTIME_MAX. That means that the device has been
shut down, at least I can't see any other reason at that point - we
are not in highres/nohz mode yet. And it still got an interrupt served
for whatever reason. What's even more confusing is that in
tick_handle_periodic() we check for:
if (dev->mode != CLOCK_EVT_MODE_ONESHOT)
return;
So if the device is shutdown for real the mode would be
CLOCK_EVT_MODE_SHUTDOWN and we'd never reach that code.
Shut down at that point only happens in context of the broadcast
crap. Your crash:
[ 10.272017] BUG: unable to handle kernel NULL pointer dereference
at 0000000000000048
[ 10.289803] IP: [<ffffffff810e3c46>] tick_do_broadcast+0x86/0xa0
points to the broadcast stuff as well. 0x48 is the offset of the
broadcast function. So your machine died at:
td->evtdev->broadcast(mask);
That means, that the cpu was set in the broadcast mask, but the per
cpu event device was not yet registered !?!
That does not make any sense, as we explicitely prevent the broadcast
activation for cpus which have no per cpu tick device registered yet.
I'm fundamentally confused and Daves observation about slub debug does
not make it less confusing.
It'd be nice if you could add some more instrumentation or bisect the
issue.
Thanks,
tglx
next prev parent reply other threads:[~2013-05-02 22:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 21:20 Dave Jones
2013-04-30 21:37 ` Dave Jones
2013-05-02 10:37 ` Thomas Gleixner
2013-05-02 15:46 ` Dave Jones
2013-05-02 17:56 ` Yinghai Lu
2013-05-02 19:58 ` Thomas Gleixner
2013-05-02 20:54 ` Yinghai Lu
2013-05-02 21:19 ` Thomas Gleixner
2013-05-02 21:36 ` Yinghai Lu
2013-05-02 22:49 ` Thomas Gleixner [this message]
2013-05-03 14:49 ` Dave Jones
2013-05-03 18:32 ` Thomas Gleixner
2013-05-03 20:10 ` Dave Jones
2013-05-04 5:03 ` Yinghai Lu
2013-05-05 6:21 ` [tip:timers/urgent] tick: Use zalloc_cpumask_var for allocating offstack cpumasks tip-bot for Thomas Gleixner
2013-05-05 9:17 ` tip-bot for Thomas Gleixner
2013-05-05 12:49 ` tip-bot for Thomas Gleixner
2013-05-05 14:15 ` tip-bot for Thomas Gleixner
2013-05-10 13:24 ` clockevents_program_event WARN_ON preventing boot Josh Boyer
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.1305022337470.2891@ionos \
--to=tglx@linutronix.de \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yinghai@kernel.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
Powered by JetHome