Skip to contentSkip to conversation

Problem with unregister_netdevice

DISCUSSION Tomas Vasko 3 participants 3 messages Jan 4, 2013 – Jan 8, 2013

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

Hi all,

after upgrade from 3.5.7 to 3.6.x I am experiencing problem with unregistering of network devices like:

kernel:[ 1523.380066] unregister_netdevice: waiting for XX to become free. Usage count = YY

The XX seems to be an interface used for either ipsec transport or ipsec tunnel and YY seems to be number of recently active ipsec peers. Problem occurs when multiple routing tables are used.

Quoted 1 line

From bisecting on .../git/torvalds/linux-2.6.git it seems the culprit is

this commit: 81166dd6fa8eb780b2132d32fbc77eb6ac04e44e

Steps to reproduce:

see setup-81166dd.sh script bellow, on two computers (say nodeA and nodeB) run it with swapped arguments --
on nodeA run: setup-81166dd.sh eth1 A B
on nodeB run: setup-81166dd.sh eth1 B A

Script assumes you are using 8139cp driver for your device, please change for any other. I've used this one for one interface in kvm while cutting my system down for this reproduction.

Finally on node A run:  ping6 -n fc00:B::1
and on node B run:      ping6 -n fc00:A::1 -f -c 1500 ; modprobe -r 8139cp

This usually triggers the bug immediately, sometimes more pinging or more time (up to 2 minutes) is needed to trigger it.

Problem is present also in 3.8-rc2 although there is takes longer time to trigger. I did not hit it on single core computer.

Please let me know if there is anything I can do to help fixing the problem.

thanks,
tomas

-------------- setup-81166dd.sh --------------
#!/bin/bash

#on node A run: $0 eth2 A B
#on node B run: $0 eth2 B A

[ $# -ne 3 ] && { echo usage: $0 dev A B; exit 1; }

dev=$1
A=$2
B=$3

modprobe 8139cp
sleep 1
ip l s $dev up
ip a a fc00:$A::1/128 dev $dev

ip -6 r a fc00::/16 dev $dev table 2
ip -6 r a fe80::/64 dev $dev table 2

ip -6 rule add to fc00::/16 table 2

setkey -c << __END__
flush;
spdflush;

add fc00:$A::1 fc00:$B::1 ah 0x2$A$B -A hmac-md5 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; add fc00:$B::1 fc00:$A::1 ah 0x2$B$A -A hmac-md5 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

add fc00:$A::1 fc00:$B::1 esp 0x1$A$B -E 3des-cbc 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; add fc00:$B::1 fc00:$A::1 esp 0x1$B$A -E 3des-cbc 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

spdadd fc00:$A::1 fc00:$B::1 any -P out ipsec

              esp/transport//require
              ah/transport//require;

spdadd fc00:$B::1 fc00:$A::1 any -P in ipsec

              esp/transport//require
              ah/transport//require;

__END__

exit 0

maintainer
#1 lore raw

From: Tomas Vasko <[email protected]>
Date: Fri, 4 Jan 2013 15:22:41 +0100

Quoted 2 lines

From bisecting on .../git/torvalds/linux-2.6.git it seems the culprit is this commit: 81166dd6fa8eb780b2132d32fbc77eb6ac04e44e

Please quote the commit message of the commit next time when referencing a commit, it saves us a lot of time.

#2 lore raw

I also met such problem before. The ref_cnt of the device is not going to be 0, so it fall in dead loop in unregister_device. At last I did not fix it, but add a max retry times to avoid it.

Quoted 12 lines · David Miller

From: Tomas Vasko <[email protected]>
Date: Fri, 4 Jan 2013 15:22:41 +0100

Quoted 2 lines

From bisecting on .../git/torvalds/linux-2.6.git it seems the culprit is this commit: 81166dd6fa8eb780b2132d32fbc77eb6ac04e44e

Please quote the commit message of the commit next time when referencing a commit, it saves us a lot of time.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html