public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Jeffrey Merkey <jeffmerkey@gmail.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 15:14:53 -0500	[thread overview]
Message-ID: <20160203201453.GV26637@redhat.com> (raw)
In-Reply-To: <CA+ekxPX9-WrLbjKfN+NFqBBaF9xF=08fE9e+806G-r0ArPHsig@mail.gmail.com>

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

  reply	other threads:[~2016-02-03 20:15 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 [this message]
2016-02-03 20:18             ` Jeffrey Merkey
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=20160203201453.GV26637@redhat.com \
    --to=dzickus@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=cmetcalf@ezchip.com \
    --cc=fweisbec@gmail.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=jeffmerkey@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox