All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: Stephen Hemminger <shemminger@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: sleeping functions called in invalid context during resume
Date: Wed, 15 Nov 2006 10:33:54 +0100	[thread overview]
Message-ID: <20061115093354.GA30813@elte.hu> (raw)
In-Reply-To: <20061115012025.13c72fc1.akpm@osdl.org>


* Andrew Morton <akpm@osdl.org> wrote:

> >  [<ffffffff80215059>] vfs_write+0xce/0x174
> >  [<ffffffff802159a5>] sys_write+0x45/0x6e
> >  [<ffffffff802593de>] system_call+0x7e/0x83
> > DWARF2 unwinder stuck at system_call+0x7e/0x83
> > 
> > Leftover inexact backtrace:
> 
> Could mean that someone somewhere forgot to release a spinlock.
> 
> Ingo had a patch which would find the culprit (preempt-tracing.patch).
> 
> Does it still live?

if it's really a spinlock/rwlock release that was missed, then i've got 
good news: we already have that debugging infrastructure, it's called 
lockdep :-)

The patch below makes use of that capability of lockdep for all 
stackdumps that are printed to the console. Stephen, please apply this 
patch, enable CONFIG_PROVE_LOCKING and try to trigger another message. 

	Ingo

---------------->
Subject: lockdep: show held locks when showing a stackdump
From: Ingo Molnar <mingo@elte.hu>

show held locks when printing a backtrace.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

---
 arch/i386/kernel/traps.c   |    1 +
 arch/x86_64/kernel/traps.c |    1 +
 2 files changed, 2 insertions(+)

Index: linux/arch/i386/kernel/traps.c
===================================================================
--- linux.orig/arch/i386/kernel/traps.c
+++ linux/arch/i386/kernel/traps.c
@@ -318,6 +318,7 @@ static void show_stack_log_lvl(struct ta
 	}
 	printk("\n%sCall Trace:\n", log_lvl);
 	show_trace_log_lvl(task, regs, esp, log_lvl);
+	debug_show_held_locks(task);
 }
 
 void show_stack(struct task_struct *task, unsigned long *esp)
Index: linux/arch/x86_64/kernel/traps.c
===================================================================
--- linux.orig/arch/x86_64/kernel/traps.c
+++ linux/arch/x86_64/kernel/traps.c
@@ -405,6 +405,7 @@ show_trace(struct task_struct *tsk, stru
 	printk("\nCall Trace:\n");
 	dump_trace(tsk, regs, stack, &print_trace_ops, NULL);
 	printk("\n");
+	debug_show_held_locks(tsk);
 }
 
 static void

  reply	other threads:[~2006-11-15  9:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15  6:30 sleeping functions called in invalid context during resume Stephen Hemminger
2006-11-15  9:20 ` Andrew Morton
2006-11-15  9:33   ` Ingo Molnar [this message]
2006-11-15 18:01     ` Stephen Hemminger
2006-11-15 18:04       ` Ingo Molnar
2006-11-17  5:21         ` Stephen Hemminger
2006-11-17  6:18           ` Andrew Morton
2006-11-17  6:49             ` Andi Kleen
2006-11-17  6:52           ` Ingo Molnar
2006-11-17 15:46             ` Rafael J. Wysocki
2006-11-17 16:30               ` Stephen Hemminger
2006-11-18 11:43                 ` Paolo Ornati
2006-11-18 12:55                   ` Karsten Wiese
2006-11-18 15:28                     ` Paolo Ornati

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=20061115093354.GA30813@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@osdl.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 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.