Skip to contentSkip to conversation

2.6.17-rc5-mm1 lockdep output

PATCH In review Jesse Brandeburg 3 participants 4 messages Jun 1, 2006 – Jun 2, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

well, when running e1000 through some code paths on FC4 + 2.6.17-rc5-mm1 + ingo's latest rollup patch, with this lockdep debug option enabled I got this:

e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex

======================================
[ BUG: bad unlock ordering detected! ]
--------------------------------------
mDNSResponder/2361 is trying to release lock (&in_dev->mc_list_lock) at:
[<ffffffff81233f5a>] ip_mc_add_src+0x85/0x1f8
but the next lock to release is:
(&im->lock){-+..}, at: [<ffffffff81233f52>] ip_mc_add_src+0x7d/0x1f8

other info that might help us debug this:
2 locks held by mDNSResponder/2361:
#0: (rtnl_mutex){--..}, at: [<ffffffff81253741>] mutex_lock+0x27/0x2c #1: (&in_dev->mc_list_lock){-.-?}, at: [<ffffffff81233f14>]

ip_mc_add_src+0x3f/0x1f8

stack backtrace:

Call Trace:
 [<ffffffff8100a8c0>] show_trace+0xa4/0x204
       [<ffffffff8100ac32>] dump_stack+0x15/0x17
[<ffffffff8104495b>] lockdep_release+0x197/0x329
       [<ffffffff81254e45>] _read_unlock+0x1c/0x28
       [<ffffffff81233f5a>] ip_mc_add_src+0x85/0x1f8
       [<ffffffff812342f5>] ip_mc_inc_group+0x1b5/0x220
       [<ffffffff8123493e>] ip_mc_join_group+0xcf/0xf3
       [<ffffffff81214ca7>] do_ip_setsockopt+0x697/0x99d
       [<ffffffff81215059>] ip_setsockopt+0x24/0x8b
       [<ffffffff8122c5bc>] udp_setsockopt+0xe/0x1c
       [<ffffffff811ec236>] sock_common_setsockopt+0xf/0x11
       [<ffffffff811ea425>] sys_setsockopt+0x8f/0xb4
       [<ffffffff810093c2>] tracesys+0xd1/0xdb

e1000: eth1: e1000_watchdog_task: NIC Link is Down
e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex

.config attached.

As an aside, when I first tried to enable this I turned on the selftest but turned off all the lockdep options besides spinlock and the selftest fails.

#1 lore raw
Quoted 14 lines · Jesse Brandeburg

well, when running e1000 through some code paths on FC4 + 2.6.17-rc5-mm1 + ingo's latest rollup patch, with this lockdep debug option enabled I got this:

e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex

======================================
[ BUG: bad unlock ordering detected! ]
--------------------------------------
mDNSResponder/2361 is trying to release lock (&in_dev->mc_list_lock) at:
[<ffffffff81233f5a>] ip_mc_add_src+0x85/0x1f8
but the next lock to release is:
(&im->lock){-+..}, at: [<ffffffff81233f52>] ip_mc_add_src+0x7d/0x1f8

Quoted 5 lines

other info that might help us debug this:
2 locks held by mDNSResponder/2361:
#0: (rtnl_mutex){--..}, at: [<ffffffff81253741>] mutex_lock+0x27/0x2c #1: (&in_dev->mc_list_lock){-.-?}, at: [<ffffffff81233f14>]
ip_mc_add_src+0x3f/0x1f8

ok another out of order one in igmp ...

---
 net/ipv4/igmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/igmp.c +1 -1
Index: linux-2.6.17-rc5-mm1.5/net/ipv4/igmp.c
===================================================================
@@ -1646,7 +1646,7 @@ static int ip_mc_add_src(struct in_devic
 		return -ESRCH;
 	}
 	spin_lock_bh(&pmc->lock);
-	read_unlock(&in_dev->mc_list_lock);
+	read_unlock_non_nested(&in_dev->mc_list_lock);
 
 #ifdef CONFIG_IP_MULTICAST
 	sf_markstate(pmc);
#2 lore raw

PATCH 1/1 lock validator: special locking: net/ipv4/igmp.c #2

In reply to Jesse Brandeburg
Quoted 11 lines · Jesse Brandeburg

well, when running e1000 through some code paths on FC4 + 2.6.17-rc5-mm1 + ingo's latest rollup patch, with this lockdep debug option enabled I got this:

e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex

======================================
[ BUG: bad unlock ordering detected! ]
--------------------------------------
mDNSResponder/2361 is trying to release lock (&in_dev->mc_list_lock) at:
[<ffffffff81233f5a>] ip_mc_add_src+0x85/0x1f8

ok, could you try the patch below? (i also updated the rollup with this fix)

Ingo

---------------------
Subject: lock validator: special locking: net/ipv4/igmp.c #2
From: Ingo Molnar <[email protected]>

another case of non-nested unlocking igmp.c.

---
 net/ipv4/igmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/igmp.c +1 -1
Index: linux/net/ipv4/igmp.c
===================================================================
@@ -1646,7 +1646,7 @@ static int ip_mc_add_src(struct in_devic
 		return -ESRCH;
 	}
 	spin_lock_bh(&pmc->lock);
-	read_unlock(&in_dev->mc_list_lock);
+	read_unlock_non_nested(&in_dev->mc_list_lock);
 
 #ifdef CONFIG_IP_MULTICAST
 	sf_markstate(pmc);
#3 lore raw

Re: [patch, -rc5-mm1] lock validator: special locking: net/ipv4/igmp.c #2

Quoted 37 lines · Ingo Molnar
Quoted 11 lines · Jesse Brandeburg

well, when running e1000 through some code paths on FC4 + 2.6.17-rc5-mm1 + ingo's latest rollup patch, with this lockdep debug option enabled I got this:

e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex

======================================
[ BUG: bad unlock ordering detected! ]
--------------------------------------
mDNSResponder/2361 is trying to release lock (&in_dev->mc_list_lock) at:
[<ffffffff81233f5a>] ip_mc_add_src+0x85/0x1f8

ok, could you try the patch below? (i also updated the rollup with this fix)

Ingo

---------------------
Subject: lock validator: special locking: net/ipv4/igmp.c #2
From: Ingo Molnar <[email protected]>

another case of non-nested unlocking igmp.c.

---
 net/ipv4/igmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/net/ipv4/igmp.c
===================================================================

net/ipv4/igmp.c static int ip_mc_add_src(struct in_devic · line 1652

Quoted 8 lines
net/ipv4/igmp.c +1 -1
@@ -1646,7 +1646,7 @@ static int ip_mc_add_src(struct in_devic
                return -ESRCH;
        }
        spin_lock_bh(&pmc->lock);
-       read_unlock(&in_dev->mc_list_lock);
+       read_unlock_non_nested(&in_dev->mc_list_lock);
 
 #ifdef CONFIG_IP_MULTICAST
        sf_markstate(pmc);

yep, this fixes it.