Bug 1469758 - WARNING: possible circular locking dependency detected flush_work
WARNING: possible circular locking dependency detected flush_work
Status: NEW
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-11 15:24 EDT by John Bieren
Modified: 2017-07-11 15:25 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Bieren 2017-07-11 15:24:52 EDT
Description of problem:
Warning during boot for possible circular locking dependency


Version-Release number of selected component (if applicable):
kernel-4.13.0-0.rc0.git4.1.fc27.x86_64


Steps to Reproduce:
1. Boot kernel
2.
3.

Actual results:
[   32.763981] powernow_k8: Found 2 Dual-Core AMD Opteron(tm) Processor 2214 HE (4 cpu cores) (version 2.20.00) 
         Starting File System Check on /dev/…c55-faa3-4962-922f-66399b732fde...  
[   32.874017]  
[   32.875033] ====================================================== 
[   32.875033] WARNING: possible circular locking dependency detected 
[   32.875033] 4.13.0-0.rc0.git4.1.fc27.x86_64 #1 Not tainted 
[   32.875033] ------------------------------------------------------ 
[   32.875033] kworker/2:1/35 is trying to acquire lock: 
[   32.875033]  ((&wfc.work)){+.+.+.}, at: [<ffffffffb90cf6a5>] flush_work+0x35/0x320 
[   32.875033]  
[   32.875033] but task is already holding lock: 
[   32.875033]  (&policy_dbs->update_mutex){+.+...}, at: [<ffffffffb97bd97f>] dbs_work_handler+0x2f/0x70 
[   32.875033]  
[   32.875033] which lock already depends on the new lock. 
[   32.875033]  
[   32.875033]  
[   32.875033] the existing dependency chain (in reverse order) is: 
[   32.875033]  
[   32.875033] -> #4 (&policy_dbs->update_mutex){+.+...}: 
[   32.875033]        lock_acquire+0xa3/0x1f0 
[   32.875033]        __mutex_lock+0x86/0x9f0 
[   32.875033]        mutex_lock_nested+0x1b/0x20 
[   32.875033]        cpufreq_dbs_governor_limits+0x23/0x70 
[   32.875033]        cpufreq_start_governor.part.10+0x4f/0x90 
[   32.875033]        cpufreq_set_policy+0x184/0x2f0 
[   32.875033]        cpufreq_init_policy+0x7e/0xf0 
[   32.875033]        cpufreq_online+0x622/0x7a0 
[   32.875033]        cpufreq_add_dev+0x51/0x80 
[   32.875033]        subsys_interface_register+0xe1/0x160 
[   32.875033]        cpufreq_register_driver+0x15d/0x230 
[   32.875033]        powernowk8_init+0x126/0x1c5 [powernow_k8] 
[   32.875033]        do_one_initcall+0x50/0x192 
[   32.875033]        do_init_module+0x5f/0x1eb 
[   32.875033]        load_module+0x24b0/0x2b50 
[   32.875033]        SYSC_init_module+0x183/0x1c0 
[   32.875033]        SyS_init_module+0xe/0x10 
[   32.875033]        do_syscall_64+0x6c/0x1c0 
[   32.875033]        return_from_SYSCALL_64+0x0/0x7a 
[   32.875033]  
[   32.875033] -> #3 (&policy->rwsem){+.+.+.}: 
[   32.875033]        lock_acquire+0xa3/0x1f0 
[   32.875033]        down_write+0x51/0xc0 
[   32.875033]        cpufreq_policy_free+0xc7/0x150 
[   32.875033]        cpufreq_online+0xef/0x7a0 
[   32.875033]        cpufreq_add_dev+0x51/0x80 
[   32.875033]        subsys_interface_register+0xe1/0x160 
[   32.875033]        cpufreq_register_driver+0x15d/0x230 
[   32.875033]        ipmi_fasync+0x3f/0x60 [ipmi_devintf] 
[   32.875033]        do_one_initcall+0x50/0x192 
[   32.875033]        do_init_module+0x5f/0x1eb 
[   32.875033]        load_module+0x24b0/0x2b50 
[   32.875033]        SYSC_init_module+0x183/0x1c0 
[   32.875033]        SyS_init_module+0xe/0x10 
[   32.875033]        do_syscall_64+0x6c/0x1c0 
[   32.875033]        return_from_SYSCALL_64+0x0/0x7a 
[   32.875033]  
[   32.875033] -> #2 (subsys mutex#5){+.+.+.}: 
[   32.875033]        lock_acquire+0xa3/0x1f0 
[   32.875033]        __mutex_lock+0x86/0x9f0 
[   32.875033]        mutex_lock_nested+0x1b/0x20 
[   32.875033]        subsys_interface_register+0x7d/0x160 
[   32.875033]        cpufreq_register_driver+0x15d/0x230 
[   32.875033]        ipmi_fasync+0x3f/0x60 [ipmi_devintf] 
[   32.875033]        do_one_initcall+0x50/0x192 
[   32.875033]        do_init_module+0x5f/0x1eb 
[   32.875033]        load_module+0x24b0/0x2b50 
[   32.875033]        SYSC_init_module+0x183/0x1c0 
[   32.875033]        SyS_init_module+0xe/0x10 
[   32.875033]        do_syscall_64+0x6c/0x1c0 
[   32.875033]        return_from_SYSCALL_64+0x0/0x7a 
[   32.875033]  
[   32.875033] -> #1 (cpu_hotplug_lock.rw_sem){++++++}: 
[   32.875033]        lock_acquire+0xa3/0x1f0 
[   32.875033]        cpus_read_lock+0x42/0x90 
[   32.875033]        apply_workqueue_attrs+0x17/0x50 
[   32.875033]        __alloc_workqueue_key+0x1b3/0x500 
[   32.875033]        scsi_host_alloc+0x376/0x480 
[   32.875033]        mptsas_probe+0xce/0x550 [mptsas] 
[   32.875033]        local_pci_probe+0x42/0xa0 
[   32.875033]        work_for_cpu_fn+0x14/0x20 
[   32.875033]        process_one_work+0x253/0x6a0 
[   32.875033]        worker_thread+0x1d6/0x3b0 
[   32.875033]        kthread+0x133/0x150 
[   32.875033]        ret_from_fork+0x2a/0x40 
[   32.875033]  
[   32.875033] -> #0 ((&wfc.work)){+.+.+.}: 
[   32.875033]        __lock_acquire+0x1367/0x13b0 
[   32.875033]        lock_acquire+0xa3/0x1f0 
[   32.875033]        flush_work+0x58/0x320 
[   32.875033]        work_on_cpu+0xa1/0xd0 
[   32.875033]        powernowk8_target+0x36/0x50 [powernow_k8] 
[   32.875033]        __cpufreq_driver_target+0x1ad/0x560 
[   32.875033]        od_dbs_update+0xc6/0x1b0 
[   32.875033]        dbs_work_handler+0x39/0x70 
[   32.875033]        process_one_work+0x253/0x6a0 
[   32.875033]        worker_thread+0x4d/0x3b0 
[   32.875033]        kthread+0x133/0x150 
[   32.875033]        ret_from_fork+0x2a/0x40 
[   32.875033]  
[   32.875033] other info that might help us debug this: 
[   32.875033]  
[   32.875033] Chain exists of: 
[   32.875033]   (&wfc.work) --> &policy->rwsem --> &policy_dbs->update_mutex 
[   32.875033]  
[   32.875033]  Possible unsafe locking scenario: 
[   32.875033]  
[   32.875033]        CPU0                    CPU1 
[   32.875033]        ----                    ---- 
[   32.875033]   lock(&policy_dbs->update_mutex); 
[   32.875033]                                lock(&policy->rwsem); 
[   32.875033]                                lock(&policy_dbs->update_mutex); 
[   32.875033]   lock((&wfc.work)); 
[   32.875033]  
[   32.875033]  *** DEADLOCK *** 
[   32.875033]  
[   32.875033] 3 locks held by kworker/2:1/35: 
[   32.875033]  #0:  ("events"){.+.+.+}, at: [<ffffffffb90d2280>] process_one_work+0x1d0/0x6a0 
[   32.875033]  #1:  ((&policy_dbs->work)){+.+...}, at: [<ffffffffb90d2280>] process_one_work+0x1d0/0x6a0 
[   32.875033]  #2:  (&policy_dbs->update_mutex){+.+...}, at: [<ffffffffb97bd97f>] dbs_work_handler+0x2f/0x70 
[   32.875033]  
[   32.875033] stack backtrace: 
[   32.875033] CPU: 2 PID: 35 Comm: kworker/2:1 Not tainted 4.13.0-0.rc0.git4.1.fc27.x86_64 #1 
[   32.875033] Hardware name: Dell Inc. PowerEdge M605/0NC596, BIOS 4.0.2 09/29/2008 
[   32.875033] Workqueue: events dbs_work_handler 
[   32.875033] Call Trace: 
[   32.875033]  dump_stack+0x8e/0xd6 
[   32.875033]  print_circular_bug+0x1b6/0x210 
[   32.875033]  __lock_acquire+0x1367/0x13b0 
[   32.875033]  ? sched_clock+0x9/0x10 
[   32.875033]  lock_acquire+0xa3/0x1f0 
[   32.875033]  ? lock_acquire+0xa3/0x1f0 
[   32.875033]  ? flush_work+0x35/0x320 
[   32.875033]  ? sched_clock+0x9/0x10 
[   32.875033]  flush_work+0x58/0x320 
[   32.875033]  ? flush_work+0x35/0x320 
[   32.875033]  ? mark_held_locks+0x5f/0x90 
[   32.875033]  ? queue_work_on+0x47/0xa0 
[   32.875033]  ? trace_hardirqs_on_caller+0xf4/0x190 
[   32.875033]  ? trace_hardirqs_on+0xd/0x10 
[   32.875033]  work_on_cpu+0xa1/0xd0 
[   32.875033]  ? work_is_static_object+0x20/0x20 
[   32.875033]  ? powernowk8_cpu_exit+0xb0/0xb0 [powernow_k8] 
[   32.875033]  powernowk8_target+0x36/0x50 [powernow_k8] 
[   32.875033]  __cpufreq_driver_target+0x1ad/0x560 
[   32.875033]  od_dbs_update+0xc6/0x1b0 
[   32.875033]  dbs_work_handler+0x39/0x70 
[   32.875033]  process_one_work+0x253/0x6a0 
[   32.875033]  worker_thread+0x4d/0x3b0 
[   32.875033]  kthread+0x133/0x150 
[   32.875033]  ? process_one_work+0x6a0/0x6a0 
[   32.875033]  ? kthread_create_on_node+0x70/0x70 
[   32.875033]  ret_from_fork+0x2a/0x40 


Expected results:
No warning

Additional info:

Note You need to log in before you can comment on or make changes to this bug.