All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffrey Merkey <jeffmerkey@gmail.com>
To: Don Zickus <dzickus@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	atomlin@redhat.com, cmetcalf@ezchip.com, fweisbec@gmail.com,
	hidehiro.kawai.ez@hitachi.com, mhocko@suse.cz, tj@kernel.org,
	uobergfe@redhat.com
Subject: Re: [PATCH v5 3/3] Add BUG_XX() debugging hard/soft lockup detection
Date: Wed, 3 Feb 2016 13:18:00 -0700	[thread overview]
Message-ID: <CA+ekxPV8JiRwFBH1=wiLGY-FrY_MBEeCQe4iUn0NpLEoSFO_LA@mail.gmail.com> (raw)
In-Reply-To: <20160203201453.GV26637@redhat.com>

On 2/3/16, Don Zickus <dzickus@redhat.com> wrote:
> On Wed, Feb 03, 2016 at 10:23:42AM -0700, Jeffrey Merkey wrote:
>> > Hmm, I am confused here.  So you are saying because we are in the nmi
>> > handler you can not break into the system?  The nmi handler prints some
>> > stuff to the screen, pokes the other cpus to print stuff to the screen
>> > and
>> > then returns to a normal operation.  Unless you are saying the act of
>> > sending NMI IPIs never completes (because a cpu is blocking IPI
>> > interrupts),
>> > so the cpu hangs in nmi context and the debugger never has a chance to
>> > 'break' in and see what is going on?
>> >
>> > Cheers,
>> > Don
>> >
>>
>> Yes.  the nmi handlers never complete for the bug I worked on with
>> tglx, probably because an nmi handler is calling timekeeper.c
>> somewhere.  Some of these lockup bugs may be calling code from the nmi
>> handlers that cause the lockup condition in the first place in some
>> cases, so it will never reach a call to panic.  Looking over this code
>> it's damn hard to find a good way to do this that works across all the
>> arches without adding another macro to bug.h (BREAK_ON maybe), so I
>> just used one that's already there.  I'll go back and rethink this
>> some more.  It could just be as simple as calling panic from the first
>> detection -- that works.
>
> So, if you disable 'sysctl_hardlockup_all_cpu_backtrace' and enable
> 'hardlockup_panic', you should be able to achieve what you want, no?
>
> But you mentioned you wanted to recover?  Hence avoiding the panic?
>
> Cheers,
> Don
>

Yes.  Avoiding the panic is what I wanted to do.  These flags work at
catching the bug as you suggest, however, it does not allow you to
step out of the hard lockup detector into the offending code, which is
what a breakpoint does for you here.  We almost need an explicit call
to enter a debugger here.  I need to go off and rethink this some
more.

:-)

Jeff

  reply	other threads:[~2016-02-03 20:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02  2:33 [PATCH v5 1/3] Add BUG_XX() debugging options Jeffrey Merkey
2016-02-02  2:33 ` [PATCH v5 2/3] Add BUG_XX() debugging options Kconfig.debug Jeffrey Merkey
2016-02-02  2:33 ` [PATCH v5 3/3] Add BUG_XX() debugging hard/soft lockup detection Jeffrey Merkey
2016-02-02 17:30   ` Don Zickus
2016-02-02 22:40     ` Jeffrey Merkey
2016-02-03  4:17       ` Jeffrey Merkey
2016-02-03  4:39         ` Jeffrey Merkey
2016-02-03 15:45       ` Don Zickus
2016-02-03 17:23         ` Jeffrey Merkey
2016-02-03 20:14           ` Don Zickus
2016-02-03 20:18             ` Jeffrey Merkey [this message]
2016-02-04  2:48               ` Jeffrey Merkey
2016-02-03 15:47       ` Don Zickus
2016-02-03 17:26         ` Jeffrey Merkey

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='CA+ekxPV8JiRwFBH1=wiLGY-FrY_MBEeCQe4iUn0NpLEoSFO_LA@mail.gmail.com' \
    --to=jeffmerkey@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=cmetcalf@ezchip.com \
    --cc=dzickus@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=tj@kernel.org \
    --cc=uobergfe@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.