From: Matthew Wilcox <matthew@wil.cx>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Doubled stack dumps during locking testsuite
Date: Fri, 15 Dec 2006 23:26:33 -0700 [thread overview]
Message-ID: <20061216062633.GY21070@parisc-linux.org> (raw)
Hi Ingo,
I built a parisc kernel with CONFIG_DEBUG_LOCKING_API_SELFTESTS enabled
recently, and got some interesting results:
double unlock: ok | ok |failed|WARNING at /home/willy/merge-2.6/kernel/mutex-debug.c:83 debug_mutex_unlock()
Backtrace:
[<0000000040144b38>] printk+0x40/0x50
[<000000004028d5f4>] init_class_Z+0xa4/0xc0
[<0000000040144b38>] printk+0x40/0x50
[<0000000040171fbc>] register_cpu_notifier+0x5c/0x78
[<0000000040340212>] lpfc_sli_issue_mbox_wait+0x138/0x1c8
[<0000000040204d01>] sg_grt_trans+0x150/0x168
[<0000000040285700>] kobject_uevent+0x8/0x20
[<0000000040304d65>] scsi_error_handler+0x9f4/0xa48
[<0000000040207450>] dump_write+0x40/0x58
[<000000004044c67c>] packet_getsockopt+0x144/0x150
[<000000004044b05c>] packet_ioctl+0x1a4/0x1b0
[<00000000404466d4>] unix_ioctl+0x154/0x168
[<000000004042d5dc>] ipv4_sysctl_forward_strategy+0x12c/0x138
[<000000004042d558>] ipv4_sysctl_forward_strategy+0xa8/0x138
[<000000004042c1d4>] ip_mc_msfget+0x16c/0x1d0
[<00000000404230a8>] ipv4_doint_and_flush_strategy+0x110/0x138
WARNING at /home/willy/merge-2.6/kernel/mutex-debug.c:86 debug_mutex_unlock()
Backtrace:
[<0000000040144b38>] printk+0x40/0x50
[<000000004028d5f4>] init_class_Z+0xa4/0xc0
[<0000000040144b38>] printk+0x40/0x50
[<0000000040171fbc>] register_cpu_notifier+0x5c/0x78
[<0000000040340212>] lpfc_sli_issue_mbox_wait+0x138/0x1c8
[<0000000040204d01>] sg_grt_trans+0x150/0x168
[<0000000040285700>] kobject_uevent+0x8/0x20
[<0000000040304d65>] scsi_error_handler+0x9f4/0xa48
[<0000000040207450>] dump_write+0x40/0x58
[<000000004044c67c>] packet_getsockopt+0x144/0x150
[<000000004044b05c>] packet_ioctl+0x1a4/0x1b0
[<00000000404466d4>] unix_ioctl+0x154/0x168
[<000000004042d5dc>] ipv4_sysctl_forward_strategy+0x12c/0x138
[<000000004042d558>] ipv4_sysctl_forward_strategy+0xa8/0x138
[<000000004042c1d4>] ip_mc_msfget+0x16c/0x1d0
[<00000000404230a8>] ipv4_doint_and_flush_strategy+0x110/0x138
failed|failed|failed|
Now, lines 83 to 86 of mutex-debug.c are:
DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info());
DEBUG_LOCKS_WARN_ON(lock->magic != lock);
DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info());
Do we really need to test the same thing twice and produce the same
stack dump?
Moreover, do we want to get stack dumps while running the locking
testsuite in the first place? From various comments, it looks
like it's supposed to be turned off, but it looks like the sense of
debug_locks_silent is inverted in the definition of DEBUG_LOCKS_WARN_ON:
if (unlikely(c)) { \
if (debug_locks_silent || debug_locks_off()) \
WARN_ON(1); \
Surely that should be:
if (!debug_locks_silent && debug_locks_off())
WARN_ON(1);
next reply other threads:[~2006-12-16 6:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-16 6:26 Matthew Wilcox [this message]
2006-12-16 8:04 ` [patch] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent Ingo Molnar
2006-12-19 8:43 ` Jarek Poplawski
2006-12-19 8:51 ` Matthew Wilcox
2006-12-19 9:05 ` Jarek Poplawski
2006-12-19 9:31 ` Ingo Molnar
2006-12-19 9:40 ` Matthew Wilcox
2006-12-19 9:44 ` 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=20061216062633.GY21070@parisc-linux.org \
--to=matthew@wil.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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