public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: David Miller <davem@davemloft.net>
Cc: duaneg@dghda.com, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning
Date: Wed, 31 Oct 2007 08:41:06 +0100	[thread overview]
Message-ID: <20071031074106.GE12189@wotan.suse.de> (raw)
In-Reply-To: <20071030.235600.254712083.davem@davemloft.net>

On Tue, Oct 30, 2007 at 11:56:00PM -0700, David Miller wrote:
> From: Nick Piggin <npiggin@suse.de>
> Date: Wed, 31 Oct 2007 07:42:21 +0100
> 
> > Sysrq+T fails to show the stack trace of a running task. Presumably this
> > is to avoid a garbled stack, however it can often be useful, and besides
> > there is no guarantee that the task won't start running in the middle of
> > show_stack(). If there are any correctness issues, then the archietcture
> > would have to take further steps to ensure the task is not running.
> > 
> > Signed-off-by: Nick Piggin <npiggin@suse.de>
> 
> This is useful.
> 
> Even more useful would be a show_regs() on the cpu where running tasks
> are running.  If not a full show_regs() at least a program counter.

Yes, that's something I've needed as well. And I doubt that we're
very unusual among kernel developers in this regard ;)
 

> That's usually what you're trying to debug and we provide nearly no
> way to handle: some task is stuck in a loop in kernel mode and you
> need to know exactly where that is.
> 
> This is pretty easy to do on sparc64.  In fact I can capture remote
> cpu registers even when that CPU's interrupts are disabled.  I suppose
> other arches could do a NMI'ish register capture like this as well.
> 
> I have a few bug reports that I can't make more progress on because I
> currently can't ask users to do something to fetch the registers on
> the seemingly hung processor.  This is why I'm harping on this so
> much :-)
> 
> Anyways, my core suggestion is to add a hook here so platforms can
> do the remote register fetch if they want.

You could possibly even do a generic "best effort" kind of thing with
regular IPIs, that will timeout and continue if some CPUs don't handle
them, and should be pretty easy to get working with existing smp_call_
function stuff. Not exactly clean, but it would be better than nothing.


  reply	other threads:[~2007-10-31  7:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  0:45 2.6.23 regression: accessing invalid mmap'ed memory from gdb causes unkillable spinning Duane Griffin
2007-10-31  4:19 ` Nick Piggin
2007-10-31 10:27   ` Duane Griffin
2007-10-31 15:11   ` Linus Torvalds
2007-10-31 15:19     ` Nick Piggin
2007-10-31 15:59       ` Linus Torvalds
2007-10-31 17:19         ` Duane Griffin
2007-10-31 22:55         ` Nick Piggin
2007-10-31 23:08           ` Linus Torvalds
2007-11-01  2:37             ` Nick Piggin
2007-11-01 15:14               ` Linus Torvalds
2007-11-01 15:47                 ` Nick Piggin
2007-11-01 16:08                   ` Linus Torvalds
2007-11-01 23:56                     ` Nick Piggin
2007-11-02  1:17                       ` Linus Torvalds
2007-11-02  6:30                         ` Nick Piggin
2007-10-31  6:42 ` Nick Piggin
2007-10-31  6:56   ` David Miller
2007-10-31  7:41     ` Nick Piggin [this message]
2007-10-31  7:44       ` David Miller
2007-11-02  5:02         ` David Miller
2007-11-02 10:45           ` Nick Piggin
2007-11-02 15:36             ` Ingo Molnar

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=20071031074106.GE12189@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=davem@davemloft.net \
    --cc=duaneg@dghda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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