Skip to contentSkip to conversation

another networking lockdep trace.

DISCUSSION Applied Dave Jones 3 participants 3 messages Aug 8, 2006 – Aug 9, 2006

Subsystems (3)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw
Quoted 1 line

From a recent rc3-git kernel.

Dave

Signature · 1 line
http://www.codemonkey.org.uk

Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=201560

Summary: INFO: inconsistent lock state - during boot .2528
Product: Fedora Core
Version: devel
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: normal
Component: kernel
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
CC: [email protected]

Description of problem:
Get this on boot of new kernel:

Aug  7 06:47:44 localhost kernel: [ INFO: inconsistent lock state ]
Aug  7 06:47:44 localhost pcscd: winscard.c:219:SCardConnect() Reader E-Gate 0 0
Not Found
Aug  7 06:47:44 localhost kernel: ---------------------------------
Aug  7 06:47:44 localhost kernel: inconsistent {in-softirq-W} -> {softirq-on-W}
usage.
Aug  7 06:47:44 localhost kernel: ip/2617 [HC0[0]:SC0[0]:HE1:SE1] takes:
Aug  7 06:47:44 localhost kernel:  (&ifa->lock){-+..}, at: [<f90a3836>]
inet6_addr_add+0xf8/0x13e [ipv6]
Aug  7 06:47:44 localhost kernel: {in-softirq-W} state was registered at:
Aug  7 06:47:44 localhost kernel:   [<c043bfb9>] lock_acquire+0x4b/0x6a
Aug  7 06:47:44 localhost kernel:   [<c060f428>] _spin_lock_bh+0x1e/0x2d
Aug  7 06:47:44 localhost kernel:   [<f90a4757>] addrconf_dad_timer+0x3a/0xe2 [ipv6]
Aug  7 06:47:44 localhost pcscd: winscard.c:219:SCardConnect() Reader E-Gate 0 0
Not Found
Aug  7 06:47:44 localhost kernel:   [<c042dbc0>] run_timer_softirq+0x108/0x167
Aug  7 06:47:44 localhost kernel:   [<c04293ab>] __do_softirq+0x78/0xf2
Aug  7 06:47:44 localhost kernel:   [<c0406673>] do_softirq+0x5a/0xbe
Aug  7 06:47:44 localhost kernel: irq event stamp: 3551
Aug  7 06:47:44 localhost kernel: hardirqs last  enabled at (3551): [<c04291bf>]
local_bh_enable_ip+0xc6/0xcf
Aug  7 06:47:45 localhost kernel: hardirqs last disabled at (3549): [<c0429152>]
local_bh_enable_ip+0x59/0xcf
Aug  7 06:47:45 localhost kernel: softirqs last  enabled at (3550): [<f90a09ce>]
ipv6_add_addr+0x210/0x254 [ipv6]
Aug  7 06:47:45 localhost kernel: softirqs last disabled at (3538): [<c060f4f7>]
_read_lock_bh+0xb/0x2d
Aug  7 06:47:45 localhost kernel:
Aug  7 06:47:45 localhost kernel: other info that might help us debug this:
Aug  7 06:47:45 localhost kernel: 1 lock held by ip/2617:
Aug  7 06:47:45 localhost kernel:  #0:  (rtnl_mutex){--..}, at: [<c060e378>]
mutex_lock+0x21/0x24
Aug  7 06:47:45 localhost kernel:
Aug  7 06:47:45 localhost kernel: stack backtrace:
Aug  7 06:47:45 localhost kernel:  [<c04051ee>] show_trace_log_lvl+0x58/0x159
Aug  7 06:47:45 localhost kernel:  [<c04057ea>] show_trace+0xd/0x10
Aug  7 06:47:45 localhost kernel:  [<c0405903>] dump_stack+0x19/0x1b
Aug  7 06:47:45 localhost kernel:  [<c043a402>] print_usage_bug+0x1ca/0x1d7
Aug  7 06:47:45 localhost kernel:  [<c043a8eb>] mark_lock+0x239/0x353
Aug  7 06:47:45 localhost kernel:  [<c043b50a>] __lock_acquire+0x459/0x997
Aug  7 06:47:45 localhost kernel:  [<c043bfb9>] lock_acquire+0x4b/0x6a
Aug  7 06:47:45 localhost kernel:  [<c060f3fb>] _spin_lock+0x19/0x28
Aug  7 06:47:45 localhost kernel:  [<f90a3836>] inet6_addr_add+0xf8/0x13e [ipv6]
Aug  7 06:47:45 localhost kernel:  [<f90a3a39>] inet6_rtm_newaddr+0x1bd/0x1d2 [ipv6]
Aug  7 06:47:45 localhost kernel:  [<c05bf5f3>] rtnetlink_rcv_msg+0x1b3/0x1d6
Aug  7 06:47:45 localhost kernel:  [<c05cae7b>] netlink_run_queue+0x69/0xfe
Aug  7 06:47:45 localhost kernel:  [<c05bf3f6>] rtnetlink_rcv+0x29/0x42
Aug  7 06:47:45 localhost kernel:  [<c05cb308>] netlink_data_ready+0x12/0x50
Aug  7 06:47:45 localhost kernel:  [<c05ca370>] netlink_sendskb+0x1f/0x37
Aug  7 06:47:45 localhost kernel:  [<c05cac49>] netlink_unicast+0x1a1/0x1bb
Aug  7 06:47:45 localhost kernel:  [<c05cb2e9>] netlink_sendmsg+0x275/0x282
Aug  7 06:47:45 localhost kernel:  [<c05ae91a>] sock_sendmsg+0xe8/0x103
Aug  7 06:47:45 localhost kernel:  [<c05af129>] sys_sendmsg+0x14d/0x1a8
Aug  7 06:47:45 localhost kernel:  [<c05b02fb>] sys_socketcall+0x16b/0x186
Aug  7 06:47:45 localhost kernel:  [<c0403faf>] syscall_call+0x7/0xb
Aug  7 06:47:45 localhost kernel: DWARF2 unwinder stuck at syscall_call+0x7/0xb
Aug  7 06:47:45 localhost kernel: Leftover inexact backtrace:
Aug  7 06:47:45 localhost avahi-daemon[2392]: New relevant interface eth0.IPv6
for mDNS.
Aug  7 06:47:45 localhost kernel:  [<c04057ea>] show_trace+0xd/0x10
Aug  7 06:47:45 localhost avahi-daemon[2392]: Joining mDNS multicast group on
interface eth0.IPv6 with address fe80::20a:e4ff:fe3f:8bc4.
Aug  7 06:47:45 localhost kernel:  [<c0405903>] dump_stack+0x19/0x1b
Aug  7 06:47:45 localhost avahi-daemon[2392]: Registering new address record for
fe80::20a:e4ff:fe3f:8bc4 on eth0.
Aug  7 06:47:45 localhost kernel:  [<c043a402>] print_usage_bug+0x1ca/0x1d7
Aug  7 06:47:45 localhost kernel:  [<c043a8eb>] mark_lock+0x239/0x353
Aug  7 06:47:45 localhost kernel:  [<c043b50a>] __lock_acquire+0x459/0x997
Aug  7 06:47:45 localhost kernel:  [<c043bfb9>] lock_acquire+0x4b/0x6a
Aug  7 06:47:45 localhost kernel:  [<c060f3fb>] _spin_lock+0x19/0x28
Aug  7 06:47:45 localhost kernel:  [<f90a3836>] inet6_addr_add+0xf8/0x13e [ipv6]
Aug  7 06:47:45 localhost kernel:  [<f90a3a39>] inet6_rtm_newaddr+0x1bd/0x1d2 [ipv6]
Aug  7 06:47:45 localhost kernel:  [<c05bf5f3>] rtnetlink_rcv_msg+0x1b3/0x1d6
Aug  7 06:47:45 localhost kernel:  [<c05cae7b>] netlink_run_queue+0x69/0xfe
Aug  7 06:47:45 localhost kernel:  [<c05bf3f6>] rtnetlink_rcv+0x29/0x42
Aug  7 06:47:45 localhost kernel:  [<c05cb308>] netlink_data_ready+0x12/0x50
Aug  7 06:47:45 localhost kernel:  [<c05ca370>] netlink_sendskb+0x1f/0x37
Aug  7 06:47:45 localhost kernel:  [<c05cac49>] netlink_unicast+0x1a1/0x1bb
Aug  7 06:47:45 localhost kernel:  [<c05cb2e9>] netlink_sendmsg+0x275/0x282
Aug  7 06:47:45 localhost kernel:  [<c05ae91a>] sock_sendmsg+0xe8/0x103
Aug  7 06:47:45 localhost kernel:  [<c05af129>] sys_sendmsg+0x14d/0x1a8
Aug  7 06:47:45 localhost kernel:  [<c05b02fb>] sys_socketcall+0x16b/0x186
Aug  7 06:47:45 localhost kernel:  [<c0403faf>] syscall_call+0x7/0xb
Aug  7 06:47:47 localhost kernel: [drm] Initialized drm 1.0.1 20051102
Aug  7 06:47:47 localhost kernel: ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16
(level, low) -> IRQ 177
Aug  7 06:47:47 localhost kernel: [drm] Initialized i915 1.5.0 20060119 on minor 0
Aug  7 06:48:08 localhost audispd: s == 0

Version-Release number of selected component (if applicable):
kernel-2.6.17-1.2528.fc6

How reproducible:

Steps to Reproduce:
1. boot
2.
3.

Actual results:

Expected results:

Additional info:

Signature · 3 lines
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#1 lore raw
Quoted 10 lines · Dave Jones
Aug  7 06:47:44 localhost kernel: inconsistent {in-softirq-W} -> {softirq-on-W}
usage.
Aug  7 06:47:44 localhost kernel: ip/2617 [HC0[0]:SC0[0]:HE1:SE1] takes:
Aug  7 06:47:44 localhost kernel:  (&ifa->lock){-+..}, at: [<f90a3836>]
inet6_addr_add+0xf8/0x13e [ipv6]
Aug  7 06:47:44 localhost kernel: {in-softirq-W} state was registered at:
Aug  7 06:47:44 localhost kernel:   [<c043bfb9>] lock_acquire+0x4b/0x6a
Aug  7 06:47:44 localhost kernel:   [<c060f428>] _spin_lock_bh+0x1e/0x2d
Aug  7 06:47:44 localhost kernel:   [<f90a4757>] addrconf_dad_timer+0x3a/0xe2 [ipv6]

Nice. This is a bug introduced less than 2 weeks ago. We're finally getting some dividends from the lock validator :) Thanks guys!

[IPV6]: The ifa lock is a BH lock

The ifa lock is expected to be taken in BH context (by addrconf timers) so we must disable BH when accessing it from user context.

Cheers,

Signature · 5 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
net/ipv6/addrconf.c +2 -2
index 8ea1e36..0c5042e 100644
@@ -1909,11 +1909,11 @@ static int inet6_addr_add(int ifindex, s
 	ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags);
 
 	if (!IS_ERR(ifp)) {
-		spin_lock(&ifp->lock);
+		spin_lock_bh(&ifp->lock);
 		ifp->valid_lft = valid_lft;
 		ifp->prefered_lft = prefered_lft;
 		ifp->tstamp = jiffies;
-		spin_unlock(&ifp->lock);
+		spin_unlock_bh(&ifp->lock);
 
 		addrconf_dad_start(ifp, 0);
 		in6_ifa_put(ifp);
maintainer Applied
#2 lore raw

From: Herbert Xu <[email protected]>
Date: Wed, 09 Aug 2006 21:52:23 +1000

Quoted 2 lines

Nice. This is a bug introduced less than 2 weeks ago. We're finally getting some dividends from the lock validator :) Thanks guys!

Horray! :-)

Quoted 6 lines

[IPV6]: The ifa lock is a BH lock

The ifa lock is expected to be taken in BH context (by addrconf timers) so we must disable BH when accessing it from user context.

Applied, thanks Herbert.