Bug 744208 - possible circular locking dependency (audispd): account_group_exec_runtime/scheduler_tick
Summary: possible circular locking dependency (audispd): account_group_exec_runtime/sc...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 744839 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-07 13:36 UTC by Tom London
Modified: 2011-11-07 23:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-07 23:32:27 UTC
Type: ---


Attachments (Terms of Use)
Output of 'dmesg' (107.14 KB, text/plain)
2011-10-07 13:36 UTC, Tom London
no flags Details

Description Tom London 2011-10-07 13:36:45 UTC
Created attachment 526900 [details]
Output of 'dmesg'

Description of problem:
(dmesg output attached).

[   26.065252] 
[   26.065254] =======================================================
[   26.066241] [ INFO: possible circular locking dependency detected ]
[   26.066241] 3.1.0-0.rc9.git0.0.fc17.x86_64 #1
[   26.066241] -------------------------------------------------------
[   26.066241] audispd/919 is trying to acquire lock:
[   26.066241]  (&(&sig->cputimer.lock)->rlock){-.....}, at: [<ffffffff81047ff5>] account_group_exec_runtime+0x31/0x48
[   26.066241] 
[   26.066241] but task is already holding lock:
[   26.066241]  (&rq->lock){-.-.-.}, at: [<ffffffff81056c34>] scheduler_tick+0x3e/0x242
[   26.066241] 
[   26.066241] which lock already depends on the new lock.
[   26.066241] 
[   26.066241] 
[   26.066241] the existing dependency chain (in reverse order) is:
[   26.066241] 
[   26.066241] -> #2 (&rq->lock){-.-.-.}:
[   26.066241]        [<ffffffff8108f037>] lock_acquire+0xf3/0x13e
[   26.066241]        [<ffffffff81504535>] _raw_spin_lock+0x45/0x79
[   26.066241]        [<ffffffff810481f7>] __task_rq_lock+0x5e/0x8b
[   26.066241]        [<ffffffff81054046>] wake_up_new_task+0x46/0x10d
[   26.066241]        [<ffffffff8105b8d4>] do_fork+0x22a/0x30e
[   26.066241]        [<ffffffff81015dc4>] kernel_thread+0x75/0x77
[   26.066241]        [<ffffffff814e008d>] rest_init+0x31/0xde
[   26.066241]        [<ffffffff81d53bb0>] start_kernel+0x3dd/0x3ea
[   26.066241]        [<ffffffff81d532c4>] x86_64_start_reservations+0xaf/0xb3
[   26.066241]        [<ffffffff81d533ca>] x86_64_start_kernel+0x102/0x111
[   26.066241] 
[   26.066241] -> #1 (&p->pi_lock){-.-.-.}:
[   26.066241]        [<ffffffff8108f037>] lock_acquire+0xf3/0x13e
[   26.066241]        [<ffffffff815046d1>] _raw_spin_lock_irqsave+0x54/0x8e
[   26.066241]        [<ffffffff8107c24c>] thread_group_cputimer+0x32/0xbd
[   26.066241]        [<ffffffff8107c302>] cpu_timer_sample_group+0x2b/0x75
[   26.066241]        [<ffffffff8107d2c4>] set_process_cpu_timer+0x36/0xe0
[   26.066241]        [<ffffffff8107d3ad>] update_rlimit_cpu+0x3f/0x5a
[   26.066241]        [<ffffffff81209c72>] selinux_bprm_committing_creds+0xc6/0xcb
[   26.066241]        [<ffffffff81201379>] security_bprm_committing_creds+0x13/0x15
[   26.066241]        [<ffffffff8114714b>] install_exec_creds+0x13/0x52
[   26.066241]        [<ffffffff8118550e>] load_elf_binary+0xf3b/0x1761
[   26.066241]        [<ffffffff81147cb0>] search_binary_handler+0xbf/0x283
[   26.066241]        [<ffffffff81148cb7>] do_execve_common+0x1e6/0x2dd
[   26.066241]        [<ffffffff81148df1>] do_execve+0x43/0x45
[   26.066241]        [<ffffffff810168c7>] sys_execve+0x43/0x5a
[   26.066241]        [<ffffffff8150c19c>] stub_execve+0x6c/0xc0
[   26.066241] 
[   26.066241] -> #0 (&(&sig->cputimer.lock)->rlock){-.....}:
[   26.066241]        [<ffffffff8108e857>] __lock_acquire+0xa2f/0xd0c
[   26.066241]        [<ffffffff8108f037>] lock_acquire+0xf3/0x13e
[   26.066241]        [<ffffffff81504535>] _raw_spin_lock+0x45/0x79
[   26.066241]        [<ffffffff81047ff5>] account_group_exec_runtime+0x31/0x48
[   26.066241]        [<ffffffff8104cfa8>] update_curr+0x112/0x134
[   26.066241]        [<ffffffff8104d275>] task_tick_fair+0x2f/0x120
[   26.066241]        [<ffffffff81056cbd>] scheduler_tick+0xc7/0x242
[   26.066241]        [<ffffffff8106af44>] update_process_times+0x65/0x75
[   26.066241]        [<ffffffff81089945>] tick_sched_timer+0x75/0x9e
[   26.066241]        [<ffffffff8107dcb0>] __run_hrtimer+0xed/0x1db
[   26.066241]        [<ffffffff8107e4ea>] hrtimer_interrupt+0xe0/0x1aa
[   26.066241]        [<ffffffff8150e94c>] smp_apic_timer_interrupt+0x77/0x8a
[   26.066241]        [<ffffffff8150c833>] apic_timer_interrupt+0x73/0x80
[   26.066241]        [<ffffffff81504e67>] _raw_spin_unlock_irq+0x32/0x45
[   26.066241]        [<ffffffff8107d3c0>] update_rlimit_cpu+0x52/0x5a
[   26.066241]        [<ffffffff81209c72>] selinux_bprm_committing_creds+0xc6/0xcb
[   26.066241]        [<ffffffff81201379>] security_bprm_committing_creds+0x13/0x15
[   26.066241]        [<ffffffff8114714b>] install_exec_creds+0x13/0x52
[   26.066241]        [<ffffffff8118550e>] load_elf_binary+0xf3b/0x1761
[   26.066241]        [<ffffffff81147cb0>] search_binary_handler+0xbf/0x283
[   26.066241]        [<ffffffff81148cb7>] do_execve_common+0x1e6/0x2dd
[   26.066241]        [<ffffffff81148df1>] do_execve+0x43/0x45
[   26.066241]        [<ffffffff810168c7>] sys_execve+0x43/0x5a
[   26.066241]        [<ffffffff8150c19c>] stub_execve+0x6c/0xc0
[   26.066241] 
[   26.066241] other info that might help us debug this:
[   26.066241] 
[   26.066241] Chain exists of:
[   26.066241]   &(&sig->cputimer.lock)->rlock --> &p->pi_lock --> &rq->lock
[   26.066241] 
[   26.066241]  Possible unsafe locking scenario:
[   26.066241] 
[   26.066241]        CPU0                    CPU1
[   26.066241]        ----                    ----
[   26.066241]   lock(&rq->lock);
[   26.066241]                                lock(&p->pi_lock);
[   26.066241]                                lock(&rq->lock);
[   26.066241]   lock(&(&sig->cputimer.lock)->rlock);
[   26.066241] 
[   26.066241]  *** DEADLOCK ***
[   26.066241] 
[   26.066241] 2 locks held by audispd/919:
[   26.066241]  #0:  (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81148976>] prepare_bprm_creds+0x2d/0x69
[   26.066241]  #1:  (&rq->lock){-.-.-.}, at: [<ffffffff81056c34>] scheduler_tick+0x3e/0x242
[   26.066241] 
[   26.066241] stack backtrace:
[   26.066241] Pid: 919, comm: audispd Not tainted 3.1.0-0.rc9.git0.0.fc17.x86_64 #1
[   26.066241] Call Trace:
[   26.066241]  <IRQ>  [<ffffffff814fa7ab>] print_circular_bug+0x1f8/0x209
[   26.066241]  [<ffffffff8108e857>] __lock_acquire+0xa2f/0xd0c
[   26.066241]  [<ffffffff810152b7>] ? native_sched_clock+0x34/0x36
[   26.066241]  [<ffffffff81047ff5>] ? account_group_exec_runtime+0x31/0x48
[   26.066241]  [<ffffffff8108f037>] lock_acquire+0xf3/0x13e
[   26.066241]  [<ffffffff81047ff5>] ? account_group_exec_runtime+0x31/0x48
[   26.066241]  [<ffffffff810898d0>] ? tick_nohz_handler+0xdf/0xdf
[   26.066241]  [<ffffffff81504535>] _raw_spin_lock+0x45/0x79
[   26.066241]  [<ffffffff81047ff5>] ? account_group_exec_runtime+0x31/0x48
[   26.066241]  [<ffffffff810898d0>] ? tick_nohz_handler+0xdf/0xdf
[   26.066241]  [<ffffffff81047ff5>] account_group_exec_runtime+0x31/0x48
[   26.066241]  [<ffffffff8104cfa8>] update_curr+0x112/0x134
[   26.066241]  [<ffffffff8104d275>] task_tick_fair+0x2f/0x120
[   26.066241]  [<ffffffff81056cbd>] scheduler_tick+0xc7/0x242
[   26.066241]  [<ffffffff8106af44>] update_process_times+0x65/0x75
[   26.066241]  [<ffffffff81089945>] tick_sched_timer+0x75/0x9e
[   26.066241]  [<ffffffff8107dcb0>] __run_hrtimer+0xed/0x1db
[   26.066241]  [<ffffffff8107e4ea>] hrtimer_interrupt+0xe0/0x1aa
[   26.066241]  [<ffffffff8150e94c>] smp_apic_timer_interrupt+0x77/0x8a
[   26.066241]  [<ffffffff8150c833>] apic_timer_interrupt+0x73/0x80
[   26.066241]  <EOI>  [<ffffffff8109576e>] ? arch_local_irq_enable+0x8/0xd
[   26.066241]  [<ffffffff8108f4c3>] ? trace_hardirqs_on+0xd/0xf
[   26.066241]  [<ffffffff81504e67>] _raw_spin_unlock_irq+0x32/0x45
[   26.066241]  [<ffffffff8107d3c0>] update_rlimit_cpu+0x52/0x5a
[   26.066241]  [<ffffffff81209c72>] selinux_bprm_committing_creds+0xc6/0xcb
[   26.066241]  [<ffffffff81201379>] security_bprm_committing_creds+0x13/0x15
[   26.066241]  [<ffffffff8114714b>] install_exec_creds+0x13/0x52
[   26.066241]  [<ffffffff8118550e>] load_elf_binary+0xf3b/0x1761
[   26.066241]  [<ffffffff810152b7>] ? native_sched_clock+0x34/0x36
[   26.066241]  [<ffffffff81147cb0>] search_binary_handler+0xbf/0x283
[   26.066241]  [<ffffffff811845d3>] ? load_elf_library+0x23b/0x23b
[   26.066241]  [<ffffffff81148cb7>] do_execve_common+0x1e6/0x2dd
[   26.066241]  [<ffffffff81148df1>] do_execve+0x43/0x45
[   26.066241]  [<ffffffff810168c7>] sys_execve+0x43/0x5a
[   26.066241]  [<ffffffff8150c19c>] stub_execve+0x6c/0xc0



Version-Release number of selected component (if applicable):
kernel-3.1.0-0.rc9.git0.0.fc17.x86_64

How reproducible:
2 boots in a row

Steps to Reproduce:
1. boot
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Dave Jones 2011-10-07 16:09:16 UTC
I reported this upstream yesterday. No comment yet.

Comment 2 Josh Boyer 2011-11-07 23:18:47 UTC
*** Bug 744839 has been marked as a duplicate of this bug. ***

Comment 3 Josh Boyer 2011-11-07 23:32:27 UTC
I believe this was fixed with upstream commit 

bcd5cff7216f9b2de0a148cc355eac199dc6f1cf (cputimer: Cure lock inversion).  Please reopen if you still see this on a 3.1 or 3.2 kernel.


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