Actions
Bug #145
closed"INFO: possible circular locking dependency detected" on module unloading
Start date:
Due date:
% Done:
0%
Estimated time:
Description
When doing a rmmod off the batman-adv kernel module, the info about a possible circlular locking dependancy shows up (see below). Despite from that, the system is continuing to run normal, so no kernel freeze. Reproducable: always
kvm image: Linux mesh-node1 2.6.37 #3 SMP PREEMPT Mon Feb 7 07:53:08 GMT 2011 i686 GNU/Linux
(kernel has been compiled with extra kernel hacking debug stuff)
batman-adv: svn rev. 1945; also present in v2011.0.0
[ 104.055934] batman_adv: B.A.T.M.A.N. advanced devel (compatibility version 12) loaded [ 104.406641] batman_adv: bat0: Adding interface: eth1 [ 104.414163] batman_adv: bat0: The MTU of interface eth1 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1527 would solve the problem. [ 104.430237] batman_adv: bat0: Not using interface eth1 (retrying later): interface not active [ 104.443770] batman_adv: bat0: Adding interface: eth2 [ 104.467688] batman_adv: bat0: The MTU of interface eth2 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1527 would solve the problem. [ 104.480623] batman_adv: bat0: Not using interface eth2 (retrying later): interface not active [ 104.608414] eth1: link up, 100Mbps, full-duplex, lpa 0x05E1 [ 104.621756] batman_adv: bat0: Interface activated: eth1 [ 104.677809] eth2: link up, 100Mbps, full-duplex, lpa 0x05E1 [ 104.683625] batman_adv: bat0: Interface activated: eth2 [ 119.319279] [ 119.319281] ======================================================= [ 119.320075] [ INFO: possible circular locking dependency detected ] [ 119.320075] 2.6.37 #3 [ 119.320075] ------------------------------------------------------- [ 119.320075] rmmod/2977 is trying to acquire lock: [ 119.320075] (s_active#58){++++.+}, at: [<c1146aef>] sysfs_remove_dir+0x5e/0x6c [ 119.320075] [ 119.320075] but task is already holding lock: [ 119.320075] (rtnl_mutex){+.+.+.}, at: [<c1429703>] rtnl_lock+0xf/0x11 [ 119.320075] [ 119.320075] which lock already depends on the new lock. [ 119.320075] [ 119.320075] [ 119.320075] the existing dependency chain (in reverse order) is: [ 119.320075] [ 119.320075] -> #1 (rtnl_mutex){+.+.+.}: [ 119.320075] [<c1087d68>] lock_acquire+0xce/0xeb [ 119.320075] [<c154a9b3>] +mutex_lock_common+0x3e/0x3a6 [ 119.320075] [<c154adaa>] mutex_lock_nested+0x2b/0x33 [ 119.320075] [<c1429703>] rtnl_lock+0xf/0x11 [ 119.320075] [<c14200f5>] register_netdev+0xc/0x3f [ 119.320075] [<f1d0dfff>] softif_create+0x38/0x137 [batman_adv] [ 119.320075] [<f1d099eb>] hardif_enable_interface+0x4f/0x22a [batman_adv] [ 119.320075] [<f1d07cc2>] store_mesh_iface+0xed/0x113 [batman_adv] [ 119.320075] [<c11defd1>] kobj_attr_store+0x1a/0x22 [ 119.320075] [<c11457df>] sysfs_write_file+0xb9/0xe4 [ 119.320075] [<c10fcd50>] vfs_write+0x84/0xde [ 119.320075] [<c10fce43>] sys_write+0x3b/0x60 [ 119.320075] [<c154c45d>] syscall_call+0x7/0xb [ 119.320075] [ 119.320075] -> #0 (s_active#58){++++.+}: [ 119.320075] [<c1087a00>] +lock_acquire+0x966/0xc00 [ 119.320075] [<c1087d68>] lock_acquire+0xce/0xeb [ 119.320075] [<c11469f3>] sysfs_addrm_finish+0x92/0xf9 [ 119.320075] [<c1146aef>] sysfs_remove_dir+0x5e/0x6c [ 119.320075] [<c11df397>] kobject_del+0xf/0x2c [ 119.320075] [<c11df3e6>] kobject_release+0x32/0x50 [ 119.320075] [<c11e0191>] kref_put+0x39/0x44 [ 119.320075] [<c11df330>] kobject_put+0x37/0x3c [ 119.320075] [<f1d07689>] sysfs_del_hardif+0xd/0x16 [batman_adv] [ 119.320075] [<f1d0969a>] hardif_remove_interface+0x23/0x3e [batman_adv] [ 119.320075] [<f1d09989>] hardif_remove_interfaces+0x6d/0x80 [batman_adv] [ 119.320075] [<f1d11825>] batman_exit+0x17/0x3c [batman_adv] [ 119.320075] [<c109226e>] sys_delete_module+0x184/0x1dc [ 119.320075] [<c154c45d>] syscall_call+0x7/0xb [ 119.320075] [ 119.320075] other info that might help us debug this: [ 119.320075] [ 119.320075] 1 lock held by rmmod/2977: [ 119.320075] #0: (rtnl_mutex){+.+.+.}, at: [<c1429703>] rtnl_lock+0xf/0x11 [ 119.320075] [ 119.320075] stack backtrace: [ 119.320075] Pid: 2977, comm: rmmod Not tainted 2.6.37 #3 [ 119.320075] Call Trace: [ 119.320075] [<c15496c7>] ? printk+0xf/0x11 [ 119.320075] [<c1086d5d>] print_circular_bug+0x90/0x9c [ 119.320075] [<c1087a00>] +lock_acquire+0x966/0xc00 [ 119.320075] [<c1087d68>] lock_acquire+0xce/0xeb [ 119.320075] [<c1146aef>] ? sysfs_remove_dir+0x5e/0x6c [ 119.320075] [<c11469f3>] sysfs_addrm_finish+0x92/0xf9 [ 119.320075] [<c1146aef>] ? sysfs_remove_dir+0x5e/0x6c [ 119.320075] [<c1146aef>] sysfs_remove_dir+0x5e/0x6c [ 119.320075] [<c11df397>] kobject_del+0xf/0x2c [ 119.320075] [<c11df3e6>] kobject_release+0x32/0x50 [ 119.320075] [<c11df3b4>] ? kobject_release+0x0/0x50 [ 119.320075] [<c11e0191>] kref_put+0x39/0x44 [ 119.320075] [<c11df330>] kobject_put+0x37/0x3c [ 119.320075] [<f1d07689>] sysfs_del_hardif+0xd/0x16 [batman_adv] [ 119.320075] [<f1d0969a>] hardif_remove_interface+0x23/0x3e [batman_adv] [ 119.320075] [<f1d09989>] hardif_remove_interfaces+0x6d/0x80 [batman_adv] [ 119.320075] [<f1d11825>] batman_exit+0x17/0x3c [batman_adv] [ 119.320075] [<c109226e>] sys_delete_module+0x184/0x1dc [ 119.320075] [<c1085771>] ? put_lock_stats+0xd/0x22 [ 119.320075] [<c108583b>] ? lock_release_holdtime+0xb5/0xba [ 119.320075] [<c10e96ff>] ? sys_munmap+0x39/0x3f [ 119.320075] [<c154c490>] ? restore_all_notrace+0x0/0x18 [ 119.320075] [<c154c45d>] syscall_call+0x7/0xb [ 119.595625] batman_adv: bat0: Interface deactivated: eth1 [ 119.599457] batman_adv: bat0: Removing interface: eth1 [ 119.605511] batman_adv: bat0: Interface deactivated: eth2 [ 119.613108] batman_adv: bat0: Removing interface: eth2 [ 119.625336] netconsole: network logging stopped, interface bat0 unregistered
Updated by Linus Lüssing over 13 years ago
Might be related, sparse 0.4.3:
make CC=~/dev/sparse/cgcc <─(Tue,Mar01)─┘ make -C /lib/modules/2.6.32-5-amd64/build REVISION=v0.2-319-gf39fe6f M=/home/linus/Freifunk/batman/batman-adv-t_x PWD=/home/linus/Freifunk/batman/batman-adv-t_x -j 2 modules maker1: Entering directory @/usr/src/linux-headers-2.6.32-5-amd64' /usr/src/linux-headers-2.6.32-5-common/arch/x86/Makefile:81: stack protector enabled but no compiler support CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/aggregation.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/bat_debugfs.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/bat_sysfs.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/bitarray.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/gateway_client.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/gateway_common.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/hard-interface.o /home/linus/Freifunk/batman/batman-adv-t_x/hard-interface.c:420:26: warning: context imbalance in 'hardif_add_interface' - different lock contexts for basic block /home/linus/Freifunk/batman/batman-adv-t_x/hard-interface.c:499:9: warning: context imbalance in 'hardif_remove_interfaces' - wrong count at exit /home/linus/Freifunk/batman/batman-adv-t_x/hard-interface.c:550:24: warning: context imbalance in 'hard_if_event' - different lock contexts for basic block CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/hash.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/icmp_socket.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/main.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/originator.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/ring_buffer.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/routing.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/send.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/soft-interface.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/translation-table.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/unicast.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/vis.o CC [M] /home/linus/Freifunk/batman/batman-adv-t_x/bat_printk.o LD [M] /home/linus/Freifunk/batman/batman-adv-t_x/batman-adv.o Building modules, stage 2. MODPOST 1 modules CC /home/linus/Freifunk/batman/batman-adv-t_x/batman-adv.mod.o LD [M] /home/linus/Freifunk/batman/batman-adv-t_x/batman-adv.ko maker1: Leaving directory @/usr/src/linux-headers-2.6.32-5-amd64' make CC=~/dev/sparse/cgcc 11.84s user 1.83s system 88% cpu 15.439 total
Updated by Linus Lüssing over 13 years ago
- Status changed from New to Closed
- Assignee deleted (
Anonymous)
Fixed in b278a6c
Actions