Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Bart Van Assche <bvanassche-HInyCGIudOg <at> public.gmane.org>
Subject: 3.1.4: circular locking
Newsgroups: gmane.linux.scsi.open-fcoe.devel
Date: Friday 9th December 2011 14:33:11 UTC (over 5 years ago)
Hello,

Has anyone observed the call stack below before ?

device eth0 entered promiscuous mode
scsi3 : FCoE Driver
host3: libfc: Link up on port (000000)

=======================================================
[ INFO: possible circular locking dependency detected ]
3.1.4 #2
-------------------------------------------------------
kworker/0:1/11 is trying to acquire lock:
 (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x14/0x20

but task is already holding lock:
 (&fip->ctlr_mutex){+.+...}, at: []
fcoe_ctlr_timer_work+0x3b0/0xa00 [libfcoe]

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&fip->ctlr_mutex){+.+...}:
       [] lock_acquire+0x80/0x110
       [] mutex_lock_nested+0x6c/0x320
       [] fcoe_ctlr_link_up+0x22/0x170 [libfcoe]
       [] fcoe_create+0x3f6/0x528 [fcoe]
       [] fcoe_transport_create+0x11b/0x240 [libfcoe]
       [] param_attr_store+0x3d/0x60
       [] module_attr_store+0x30/0x40
       [] sysfs_write_file+0xa8/0x110
       [] vfs_write+0x9a/0x160
       [] sys_write+0x42/0x70
       [] sysenter_do_call+0x12/0x38

-> #0 (rtnl_mutex){+.+.+.}:
       [] __lock_acquire+0x1388/0x1920
       [] lock_acquire+0x80/0x110
       [] mutex_lock_nested+0x6c/0x320
       [] rtnl_lock+0x14/0x20
       [] fcoe_update_src_mac+0x2a/0xb0 [fcoe]
       [] fcoe_ctlr_timer_work+0x66d/0xa00 [libfcoe]
       [] process_one_work+0x178/0x470
       [] worker_thread+0x131/0x2c0
       [] kthread+0x84/0x90
       [] kernel_thread_helper+0x6/0x10

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&fip->ctlr_mutex);
                               lock(rtnl_mutex);
                               lock(&fip->ctlr_mutex);
  lock(rtnl_mutex);

 *** DEADLOCK ***

3 locks held by kworker/0:1/11:
 #0:  (events){.+.+.+}, at: [] process_one_work+0x104/0x470
 #1:  ((&fip->timer_work)){+.+...}, at: []
process_one_work+0x104/0x470
 #2:  (&fip->ctlr_mutex){+.+...}, at: []
fcoe_ctlr_timer_work+0x3b0/0xa00 [libfcoe]

stack backtrace:
Pid: 11, comm: kworker/0:1 Not tainted 3.1.4 #2
Call Trace:
 [] ? printk+0x1d/0x1f
 [] print_circular_bug+0x1bc/0x290
 [] __lock_acquire+0x1388/0x1920
 [] lock_acquire+0x80/0x110
 [] ? rtnl_lock+0x14/0x20
 [] mutex_lock_nested+0x6c/0x320
 [] ? rtnl_lock+0x14/0x20
 [] ? rtnl_lock+0x14/0x20
 [] ? fcoe_ctlr_timer_work+0x3b0/0xa00 [libfcoe]
 [] rtnl_lock+0x14/0x20
 [] fcoe_update_src_mac+0x2a/0xb0 [fcoe]
 [] fcoe_ctlr_timer_work+0x66d/0xa00 [libfcoe]
 [] ? trace_hardirqs_off+0xb/0x10
 [] ? local_clock+0x6d/0x70
 [] process_one_work+0x178/0x470
 [] ? process_one_work+0x104/0x470
 [] ? fcoe_ctlr_vn_send_claim+0x40/0x40 [libfcoe]
 [] worker_thread+0x131/0x2c0
 [] ? manage_workers+0x200/0x200
 [] kthread+0x84/0x90
 [] ? __init_kthread_worker+0x60/0x60
 [] kernel_thread_helper+0x6/0x10
host3: Assigned Port ID 0092b5

Thanks,

Bart.
 
CD: 3ms