From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] timer: implement lockdep deadlock detection
Date: Tue, 27 Jan 2009 00:03:56 +0100 [thread overview]
Message-ID: <1233011036.4869.0.camel@johannes.local> (raw)
In-Reply-To: <1233010786.4344.1.camel@johannes.local>
[-- Attachment #1: Type: text/plain, Size: 3267 bytes --]
On Mon, 2009-01-26 at 23:59 +0100, Johannes Berg wrote:
> This modifies the timer code in a way to allow lockdep to detect
> deadlocks resulting from a lock being taken in the timer function
> as well as around the del_timer_sync() call.
>
> Validated with this module, otherwise bootup was clean.
Not having a proper stack trace in there is a little confusing:
[ 81.547455]
[ 81.547457] =======================================================
[ 81.547657] [ INFO: possible circular locking dependency detected ]
[ 81.547759] 2.6.29-rc2-wl-11979-gc32422d-dirty #24
[ 81.547857] -------------------------------------------------------
[ 81.547956] rmmod/3857 is trying to acquire lock:
[ 81.548055] (&t){-+..}, at: [<ffffffff80252960>] del_timer_sync+0x0/0xa0
[ 81.548303]
[ 81.548303] but task is already holding lock:
[ 81.548491] (&l){.+..}, at: [<ffffffffa11f9010>] e+0x10/0x30 [test]
[ 81.548736]
[ 81.548736] which lock already depends on the new lock.
[ 81.548737]
[ 81.549023]
[ 81.549023] the existing dependency chain (in reverse order) is:
[ 81.549212]
[ 81.549213] -> #1 (&l){.+..}:
[ 81.549544] [<ffffffffffffffff>] 0xffffffffffffffff
[ 81.549697]
[ 81.549697] -> #0 (&t){-+..}:
[ 81.550028] [<ffffffff802737b7>] check_prev_add+0x57/0x770
[ 81.550178] [<ffffffff802744d6>] validate_chain+0x606/0x6c0
[ 81.550322] [<ffffffff802749cf>] __lock_acquire+0x43f/0xa10
[ 81.550471] [<ffffffff80275031>] lock_acquire+0x91/0xc0
[ 81.550619] [<ffffffff8025299d>] del_timer_sync+0x3d/0xa0
[ 81.550767] [<ffffffffa11f901c>] e+0x1c/0x30 [test]
[ 81.550911] [<ffffffff80281d9b>] sys_delete_module+0x27b/0x2e0
[ 81.551062] [<ffffffff8020bd1b>] system_call_fastpath+0x16/0x1b
[ 81.551213] [<ffffffffffffffff>] 0xffffffffffffffff
[ 81.551361]
[ 81.551361] other info that might help us debug this:
[ 81.551362]
[ 81.551646] 1 lock held by rmmod/3857:
[ 81.551743] #0: (&l){.+..}, at: [<ffffffffa11f9010>] e+0x10/0x30 [test]
[ 81.552035]
[ 81.552035] stack backtrace:
[ 81.552222] Pid: 3857, comm: rmmod Not tainted 2.6.29-rc2-wl-11979-gc32422d-dirty #24
[ 81.552371] Call Trace:
[ 81.552469] [<ffffffff80273260>] print_circular_bug_tail+0xe0/0xf0
[ 81.552571] [<ffffffff802737b7>] check_prev_add+0x57/0x770
[ 81.552672] [<ffffffff802744d6>] validate_chain+0x606/0x6c0
[ 81.552773] [<ffffffff802749cf>] __lock_acquire+0x43f/0xa10
[ 81.552876] [<ffffffff8026fb04>] ? get_lock_stats+0x34/0x70
[ 81.552979] [<ffffffff8026fb04>] ? get_lock_stats+0x34/0x70
[ 81.553080] [<ffffffff80275031>] lock_acquire+0x91/0xc0
[ 81.553181] [<ffffffff80252960>] ? del_timer_sync+0x0/0xa0
[ 81.553284] [<ffffffff8025299d>] del_timer_sync+0x3d/0xa0
[ 81.553383] [<ffffffff80252960>] ? del_timer_sync+0x0/0xa0
[ 81.553487] [<ffffffffa11f901c>] e+0x1c/0x30 [test]
[ 81.553588] [<ffffffff80281d9b>] sys_delete_module+0x27b/0x2e0
[ 81.553690] [<ffffffff8020c76d>] ? retint_swapgs+0xe/0x13
[ 81.553792] [<ffffffff80272c52>] ? trace_hardirqs_on_caller+0x182/0x1e0
[ 81.553895] [<ffffffff8020bd1b>] system_call_fastpath+0x16/0x1b
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2009-01-26 23:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 22:59 Johannes Berg
2009-01-26 23:03 ` Johannes Berg [this message]
2009-01-26 23:07 ` Ingo Molnar
2009-01-27 8:45 ` Johannes Berg
2009-01-27 8:46 ` [PATCH v2] " Johannes Berg
2009-01-27 13:27 ` Ingo Molnar
2009-01-27 13:41 ` Ingo Molnar
2009-01-27 18:06 ` Johannes Berg
2009-01-27 18:30 ` Peter Zijlstra
2009-01-27 18:33 ` Johannes Berg
2009-01-27 18:57 ` [PATCH v3] " Johannes Berg
2009-01-28 8:20 ` Peter Zijlstra
2009-01-28 9:54 ` Johannes Berg
2009-01-28 10:13 ` Peter Zijlstra
2009-01-28 10:54 ` Johannes Berg
2009-01-28 18:06 ` Johannes Berg
2009-01-29 12:38 ` Ingo Molnar
2009-01-29 15:03 ` [PATCH v4] " Johannes Berg
2009-01-29 13:38 ` [PATCH v3] " Peter Zijlstra
2009-01-29 13:44 ` Arnd Bergmann
2009-01-29 14:25 ` Johannes Berg
2009-01-27 18:12 ` [PATCH v2] " Johannes Berg
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=1233011036.4869.0.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--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 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®