From: Nick Piggin <npiggin@suse.de>
To: Duane Griffin <duaneg@dghda.com>, Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel Mailing List <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 07:42:21 +0100 [thread overview]
Message-ID: <20071031064221.GC12189@wotan.suse.de> (raw)
In-Reply-To: <e9e943910710301745u429b14fj6c5a66fcbf6b0efa@mail.gmail.com>
On Wed, Oct 31, 2007 at 12:45:35AM +0000, Duane Griffin wrote:
> Accessing a memory mapped region past the last page containing a valid
> file mapping produces a SIGBUS fault (as it should). Running a program
> that does this under gdb, then accessing the invalid memory from gdb,
> causes it to start consuming 100% CPU and become unkillable. Once in
> that state, SysRq-T doesn't show a stack trace for gdb, although it is
> shown as running and stack traces are dumped for other tasks.
BTW. this has come up for me before, and I have found it useful on
a number of occasions to print the stack of running tasks when they
are looping in the kernel...
Any reason we can't do this?
--
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>
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c 2007-10-31 06:53:22.000000000 +1100
+++ linux-2.6/kernel/sched.c 2007-10-31 06:56:02.000000000 +1100
@@ -4900,8 +4900,7 @@
printk(KERN_CONT "%5lu %5d %6d\n", free,
task_pid_nr(p), task_pid_nr(p->parent));
- if (state != TASK_RUNNING)
- show_stack(p, NULL);
+ show_stack(p, NULL);
}
void show_state_filter(unsigned long state_filter)
next prev parent reply other threads:[~2007-10-31 6:42 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 [this message]
2007-10-31 6:56 ` David Miller
2007-10-31 7:41 ` Nick Piggin
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=20071031064221.GC12189@wotan.suse.de \
--to=npiggin@suse.de \
--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