mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Rui Nuno Capela <rncbc@rncbc.org>,
	Daniel Walker <dwalker@mvista.com>,
	linux-kernel@vger.kernel.org,
	Karsten Wiese <fzu@wemgehoertderstaat.de>
Subject: Re: realtime-preempt patch-2.6.18-rt7 oops
Date: Mon, 06 Nov 2006 11:02:51 +0100	[thread overview]
Message-ID: <1162807371.13579.4.camel@Homer.simpson.net> (raw)
In-Reply-To: <20061106093815.GB14388@elte.hu>

On Mon, 2006-11-06 at 10:38 +0100, Ingo Molnar wrote:
> * Mike Galbraith <efault@gmx.de> wrote:
> 
> > I just reproduced it running glibc make check.  I had just enabled 
> > kprobes and recompiled with the stock SuSE-10.1 compiler while waiting 
> > for you to send me your .config (nevermind that request) so I could 
> > try to reproduce it here.
> 
> hm, so kprobe_flush_task() is likely PREEMPT_RT-unsafe.
> 
> could you try the patch below, does it help? (a quick review seems to 
> suggest that all codepaths protected by kretprobe_lock are atomic)

Ah, so I did do the right thing.  Besides the oops, I was getting a
pretty frequent non-deadly...

BUG: scheduling while atomic: ld-linux.so.2/0x00000001/11803, CPU#1
 [<b10041fb>] show_trace_log_lvl+0x179/0x18f
 [<b1004803>] show_trace+0x12/0x14
 [<b1004924>] dump_stack+0x19/0x1b
 [<b13aaf02>] __schedule+0x63b/0xea5
 [<b13ab8a6>] schedule+0x30/0xf9
 [<b13ac53a>] rt_spin_lock_slowlock+0x90/0x17a
 [<b13acc67>] rt_spin_lock+0x22/0x24
 [<b13af28b>] kprobe_flush_task+0x11/0x48
 [<b13ab43e>] __schedule+0xb77/0xea5
 [<b13ab8a6>] schedule+0x30/0xf9
 [<b13ac53a>] rt_spin_lock_slowlock+0x90/0x17a
 [<b13acccb>] __rt_spin_lock+0x22/0x28
 [<b13acd64>] rt_write_lock+0x8/0xa
 [<b1024cc5>] do_exit+0x2ae/0x96e
 [<b102541a>] complete_and_exit+0x0/0x16
 [<c90ad000>] 0xc90ad000

...so turned it back into a non-sleeping lock.

You forgot kprobes.h

> 
> 	Ingo
> 
> Index: linux/kernel/kprobes.c
> ===================================================================
> --- linux.orig/kernel/kprobes.c
> +++ linux/kernel/kprobes.c
> @@ -50,7 +50,7 @@ static struct hlist_head kretprobe_inst_
>  static atomic_t kprobe_count;
>  
>  DEFINE_MUTEX(kprobe_mutex);		/* Protects kprobe_table */
> -DEFINE_SPINLOCK(kretprobe_lock);	/* Protects kretprobe_inst_table */
> +DEFINE_RAW_SPINLOCK(kretprobe_lock);	/* Protects kretprobe_inst_table */
>  static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL;
>  
>  static struct notifier_block kprobe_page_fault_nb = {
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


  reply	other threads:[~2006-11-06 10:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02 10:43 Rui Nuno Capela
2006-11-03 11:30 ` Karsten Wiese
2006-11-03 22:55   ` Rui Nuno Capela
2006-11-04  2:08     ` Rui Nuno Capela
2006-11-04 10:54       ` Rui Nuno Capela
2006-11-04 15:08         ` Karsten Wiese
2006-11-05 15:55         ` Rui Nuno Capela
2006-11-05 16:47           ` Rui Nuno Capela
2006-11-05 16:02             ` Daniel Walker
2006-11-05 18:38               ` Rui Nuno Capela
2006-11-05 18:18                 ` Daniel Walker
2006-11-06  7:24                 ` Mike Galbraith
2006-11-06  9:38                   ` Ingo Molnar
2006-11-06 10:02                     ` Mike Galbraith [this message]
2006-11-06 10:11                       ` Ingo Molnar
2006-11-06 10:26                         ` Mike Galbraith
2006-11-10  9:31                           ` Rui Nuno Capela
2006-11-10  9:33                             ` 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=1162807371.13579.4.camel@Homer.simpson.net \
    --to=efault@gmx.de \
    --cc=dwalker@mvista.com \
    --cc=fzu@wemgehoertderstaat.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rncbc@rncbc.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

all inboxes | Powered by JetHome®