All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Dipankar Sarma <dipankar@in.ibm.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: early kernel crash when kmemleak is enabled
Date: Thu, 19 May 2011 15:42:18 +0200	[thread overview]
Message-ID: <20110519134218.GH627@htj.dyndns.org> (raw)
In-Reply-To: <20110515105505.GA21631@joi.lan>

Hello,

On Sun, May 15, 2011 at 12:55:05PM +0200, Marcin Slusarz wrote:
> [    0.100047] BUG: unable to handle kernel NULL pointer dereference at           (null)
> [    0.101416] IP: [<ffffffff810854d1>] __queue_work+0x29/0x41a
...
> [    0.110000] Call Trace:
> [    0.110000]  <IRQ> 
> [    0.110000]  [<ffffffff81085910>] queue_work_on+0x16/0x1d
> [    0.110000]  [<ffffffff81085abc>] queue_work+0x29/0x55
> [    0.110000]  [<ffffffff81085afb>] schedule_work+0x13/0x15
> [    0.110000]  [<ffffffff81242de1>] free_object+0x90/0x95
> [    0.110000]  [<ffffffff81242f6d>] debug_check_no_obj_freed+0x187/0x1d3
> [    0.110000]  [<ffffffff814b6504>] ? _raw_spin_unlock_irqrestore+0x30/0x4d
> [    0.110000]  [<ffffffff8110bd14>] ? free_object_rcu+0x68/0x6d
> [    0.110000]  [<ffffffff8110890c>] kmem_cache_free+0x64/0x12c
> [    0.110000]  [<ffffffff8110bd14>] free_object_rcu+0x68/0x6d
> [    0.110000]  [<ffffffff810b58bc>] __rcu_process_callbacks+0x1b6/0x2d9
> [    0.110000]  [<ffffffff81095c9f>] ? tick_handle_periodic+0x1f/0x6c
> [    0.110000]  [<ffffffff810b5a5a>] rcu_process_callbacks+0x7b/0x83
> [    0.110000]  [<ffffffff810733b2>] __do_softirq+0x117/0x207
> [    0.110000]  [<ffffffff810b05d3>] ? handle_irq_event+0x47/0x5c
> [    0.110000]  [<ffffffff814bd0cc>] call_softirq+0x1c/0x30
> [    0.110000]  [<ffffffff81034bc4>] do_softirq+0x38/0x80
> [    0.110000]  [<ffffffff810730ed>] irq_exit+0x4e/0xa0
> [    0.110000]  [<ffffffff8103429a>] do_IRQ+0x97/0xae
> [    0.110000]  [<ffffffff814b6853>] common_interrupt+0x13/0x13

I can reproduce this reliably with your config too.  From a quick
glance, the cause seems to be debug objects using RCU callback
free_object() to free objects, which ends up being called before
workqueue is initialized.  The offending object type is "rcu_head" and
turning off CONFIG_DEBUG_OBJECTS_RCU_HEAD makes the problem go away.

Any ideas on how to fix this?

Thanks.

-- 
tejun

  reply	other threads:[~2011-05-19 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-15 10:55 early kernel crash when kmemleak is enabled Marcin Slusarz
2011-05-19 13:42 ` Tejun Heo [this message]
2011-05-19 13:48   ` Catalin Marinas
2011-05-19 13:54     ` Tejun Heo
2011-05-19 14:08       ` Catalin Marinas
2011-05-27 20:25         ` Marcin Slusarz
2011-05-27 20:37           ` Thomas Gleixner
2011-05-28 11:23             ` [PATCH] debugobjects: fix boot crash when both kmemleak and debugobjects are enabled (was: Re: early kernel crash when kmemleak is enabled) Marcin Slusarz
2011-06-19 20:43               ` Marcin Slusarz
2011-06-20 12:43               ` [tip:core/urgent] debugobjects: Fix boot crash when kmemleak and debugobjects enabled tip-bot for Marcin Slusarz

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=20110519134218.GH627@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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.