public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] switch_stack position
Date: Thu, 14 Dec 2000 07:30:56 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205840@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205821@msgid-missing>

On Wed, 13 Dec 2000 23:20:04 -0800, 
David Mosberger <davidm@hpl.hp.com> wrote:
>>>>>> On Thu, 14 Dec 2000 18:08:19 +1100, Keith Owens <kaos@ocs.com.au> said:
>
>  Keith> There is no guarantee that I can stop all the cpus.
>  Keith> Sometimes the problem is so bad that the cpu will not accept
>  Keith> the IPI.  This is exactly the case when a debugger needs to
>  Keith> be able to print the processor on the unresponsive cpu, or at
>  Keith> the very least to say what state the process is in.
>
>If the CPU is still running, there is no guarantee that the existence
>of a switch-stack implies that the process is stopped.  For example,
>it may just be unwinding the stack via unw_init_running() and by the
>time kdb attempts to read the stack, the switch-stack may have
>disappeared again.

Possible but extremely unlikely.  If the cpu is not responding to IPI
then it is unlikely to be unwinding.  kdb IPI on ia32 uses NMI, I plan
to try using NMI for ia64 as well.  A cpu that does not respond to NMI
is in a sick state.

The other problem with a global per cpu array is debugging the
debugger.  There is some support in recent version of SGI kdb for
debugging kdb itself.  That requires stack data for the original fault
plus a separate set of stack data for the kdb error.  At which point I
need to store the current state plus the previous state, the stack is
the best place for this.

>  Keith> kdb can detect unresponsive cpus and will not let you switch
>  Keith> to them but you can still issue 'btp pid' to get some data
>  Keith> for the offending cpu.  And that needs the location of the
>  Keith> last switch_stack for the process.
>
>Have you actually tried doing a "btp" on an IA-64 stack that isn't
>valid?  I think you'll find that unw_unwind() returns -1 long before
>unwinding to user-space.  That's probably as good an indication as any
>that the stack is still active.

But I don't want unwind to return -1 or produce garbage, which is what
it occurs now when the stack state does not match the assumptions.  I
want it to use the last saved switch_stack for that process, it is the
only clean starting point for debugging.  A clean debug report is far
better than producing a random backtrace and sending users off on a
wild goose chase.



  parent reply	other threads:[~2000-12-14  7:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-13  5:03 [Linux-ia64] switch_stack position Keith Owens
2000-12-14  2:56 ` David Mosberger
2000-12-14  3:46 ` Keith Owens
2000-12-14  4:39 ` David Mosberger
2000-12-14  5:13 ` Keith Owens
2000-12-14  6:21 ` David Mosberger
2000-12-14  6:31 ` Keith Owens
2000-12-14  6:36 ` David Mosberger
2000-12-14  6:44 ` Keith Owens
2000-12-14  6:56 ` David Mosberger
2000-12-14  7:08 ` Keith Owens
2000-12-14  7:20 ` David Mosberger
2000-12-14  7:30 ` Keith Owens [this message]
2000-12-14  7:40 ` David Mosberger

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=marc-linux-ia64-105590678205840@msgid-missing \
    --to=kaos@ocs.com.au \
    --cc=linux-ia64@vger.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