[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070524074534.GA21138@elte.hu>
Date: Thu, 24 May 2007 09:45:34 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Chuck Ebbert <cebbert@...hat.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Anant Nitya <kernel@...chanda.info>,
linux-kernel@...r.kernel.org, David Miller <davem@...emloft.net>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [BUG] local_softirq_pending storm
* Chuck Ebbert <cebbert@...hat.com> wrote:
> > if (need_resched() && system_state == SYSTEM_RUNNING) {
> > - raw_local_irq_disable();
> > - _local_bh_enable();
> > - raw_local_irq_enable();
> > + local_bh_enable();
> > __cond_resched();
> > local_bh_disable();
> > return 1;
>
> We may have a problem with that:
>
> BUG: warning at kernel/softirq.c:138/local_bh_enable() (Not tainted)
> [<c042b2ef>] local_bh_enable+0x45/0x92
> [<c06036b7>] cond_resched_softirq+0x2c/0x42
> [<c059d5d0>] release_sock+0x54/0xa3
> [<c05c9428>] tcp_sendmsg+0x91b/0xa0c
> [<c05e1bb9>] inet_sendmsg+0x3b/0x45
> [<c059af34>] sock_aio_write+0xf9/0x105
> [<c0476035>] do_sync_write+0xc7/0x10a
> [<c0437265>] autoremove_wake_function+0x0/0x35
> [<c047688e>] vfs_write+0xbc/0x154
> [<c0476e8c>] sys_write+0x41/0x67
> [<c0404f70>] syscall_call+0x7/0xb
hm, this place really shouldnt call cond_resched_softirq() with hardirqs
disabled.
perhaps a buggy ->sk_backlog_rcv() handler disabled interrupts without
restoring them?
could you enable CONFIG_PROVE_LOCKING and apply the patch below - which
location is printed as having last disabled hardirqs?
Ingo
--------------------->
Subject: [patch] softirqs: print out irq-trace events
From: Ingo Molnar <mingo@...e.hu>
some code is fiddling with softirqs but hardirqs are disabled, so try to
figure out who disabled hardirqs.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/softirq.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: linux/kernel/softirq.c
===================================================================
--- linux.orig/kernel/softirq.c
+++ linux/kernel/softirq.c
@@ -135,7 +135,15 @@ void local_bh_enable(void)
WARN_ON_ONCE(in_irq());
#endif
- WARN_ON_ONCE(irqs_disabled());
+ if (irqs_disabled()) {
+ static int once = 1;
+
+ if (once) {
+ once = 0;
+ print_irqtrace_events(current);
+ WARN_ON(1);
+ }
+ }
#ifdef CONFIG_TRACE_IRQFLAGS
local_irq_save(flags);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists