public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Dave Jones <davej@redhat.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Yinghai Lu <yinghai@kernel.org>, Avi Kivity <avi@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	cpufreq@vger.kernel.org, mark.langsdorf@amd.com
Subject: Re: S06cpuspeed/2637 is trying to acquire lock (&(&dbs_info->work)->work (was: Re: [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of =)
Date: Sat, 20 Jun 2009 14:48:17 +0200	[thread overview]
Message-ID: <20090620124817.GA22831@elte.hu> (raw)
In-Reply-To: <20090611105211.GA6760@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Dave Jones <davej@redhat.com> wrote:
> 
> > On Wed, Jun 10, 2009 at 01:10:35PM +0200, Ingo Molnar wrote:
> >  > 
> >  > With a v2.6.30 based kernel i'm still getting a cpufreq lockdep 
> >  > warning:
> >  > 
> >  >  =======================================================
> >  >  [ INFO: possible circular locking dependency detected ]
> >  >  2.6.30-tip #10420
> >  >  -------------------------------------------------------
> >  >  S06cpuspeed/2637 is trying to acquire lock:
> >  >   (&(&dbs_info->work)->work){+.+...}, at: [<ffffffff8106553d>] __cancel_work_timer+0xd6/0x22a
> >  > 
> >  >  but task is already holding lock:
> >  >   (dbs_mutex){+.+.+.}, at: [<ffffffff8193d630>] cpufreq_governor_dbs+0x28f/0x335
> >  > 
> >  > This bug got introduced somewhere late in the .30-rc cycle, this box 
> >  > was fine before.
> > 
> > See the thread " [PATCH] remove rwsem lock from CPUFREQ_GOV_STOP 
> > call (second call site)" Though there's a report that the last 
> > patch posted still doesn't fix the problem, so we still don't have 
> > a quick fix suitable for -stable.
> 
> even with latest -git (which includes cpufreq fixes) i get:
> 
> [   54.819413] CPUFREQ: ondemand sampling_rate_max sysfs file is deprecated - used by: cat
> [   55.216665] 
> [   55.216668] =======================================================
> [   55.216963] [ INFO: possible circular locking dependency detected ]
> [   55.217134] 2.6.30-tip #5836
> [   55.217276] -------------------------------------------------------
> [   55.217428] S99local/4262 is trying to acquire lock:
> [   55.217577]  (&(&dbs_info->work)->work){+.+...}, at: [<4104261f>] __cancel_work_timer+0xb8/0x1e9
> [   55.218065] 
> [   55.218068] but task is already holding lock:
> [   55.218351]  (dbs_mutex){+.+.+.}, at: [<4157bd6b>] cpufreq_governor_dbs+0x25d/0x2e4
> [   55.218358] 
> 
> full bootlog below. Can test fixes.

Note, this bug warning still triggers rather frequently with latest 
-git (fb20871) during bootup on two test-systems - relevant portion 
of the bootlog attached below. As usual i can test any fix for this.

        Ingo

[  266.276061] 
[  266.276064] =======================================================
[  266.276243] [ INFO: possible circular locking dependency detected ]
[  266.276337] 2.6.30-tip #6165
[  266.276423] -------------------------------------------------------
[  266.276516] S99local/4038 is trying to acquire lock:
[  266.276608]  (&(&dbs_info->work)->work){+.+...}, at: [<c104b718>] __cancel_work_timer+0xa9/0x186
[  266.276883] 
[  266.276884] but task is already holding lock:
[  266.277055]  (dbs_mutex){+.+.+.}, at: [<c14f6241>] cpufreq_governor_dbs+0x24d/0x2d7
[  266.277322] 
[  266.277323] which lock already depends on the new lock.
[  266.277325] 
[  266.277577] 
[  266.277578] the existing dependency chain (in reverse order) is:
[  266.277752] 
[  266.277753] -> #2 (dbs_mutex){+.+.+.}:
[  266.278055]        [<c105fe5a>] validate_chain+0x810/0xa81
[  266.278193]        [<c106077f>] __lock_acquire+0x6b4/0x71f
[  266.278331]        [<c1061a58>] lock_acquire+0xb1/0xd5
[  266.278466]        [<c15ddbd2>] mutex_lock_nested+0x3e/0x363
[  266.278605]        [<c14f604d>] cpufreq_governor_dbs+0x59/0x2d7
[  266.278742]        [<c14f3d1b>] __cpufreq_governor+0x6a/0x74
[  266.278881]        [<c14f3e7f>] __cpufreq_set_policy+0x15a/0x1c8
[  266.279020]        [<c14f515f>] cpufreq_add_dev+0x36b/0x448
[  266.279158]        [<c12d6308>] sysdev_driver_register+0x9b/0xea
[  266.279299]        [<c14f3c25>] cpufreq_register_driver+0xa2/0x12e
[  266.279438]        [<c1b07f8e>] acpi_cpufreq_init+0x108/0x11d
[  266.279575]        [<c1001151>] _stext+0x69/0x176
[  266.279711]        [<c1b00741>] kernel_init+0x86/0xd7
[  266.279848]        [<c1004387>] kernel_thread_helper+0x7/0x10
[  266.279986]        [<ffffffff>] 0xffffffff
[  266.280023] 
[  266.280023] -> #1 (&per_cpu(cpu_policy_rwsem, cpu)){+++++.}:
[  266.280023]        [<c105fe5a>] validate_chain+0x810/0xa81
[  266.280023]        [<c106077f>] __lock_acquire+0x6b4/0x71f
[  266.280023]        [<c1061a58>] lock_acquire+0xb1/0xd5
[  266.280023]        [<c15dea5f>] down_write+0x24/0x63
[  266.280023]        [<c14f4933>] lock_policy_rwsem_write+0x38/0x64
[  266.280023]        [<c14f5d93>] do_dbs_timer+0x3b/0x29c
[  266.280023]        [<c104c124>] worker_thread+0x1ce/0x2c9
[  266.280023]        [<c104f4d8>] kthread+0x6b/0x73
[  266.280023]        [<c1004387>] kernel_thread_helper+0x7/0x10
[  266.280023]        [<ffffffff>] 0xffffffff
[  266.280023] 
[  266.280023] -> #0 (&(&dbs_info->work)->work){+.+...}:
[  266.280023]        [<c105fbea>] validate_chain+0x5a0/0xa81
[  266.280023]        [<c106077f>] __lock_acquire+0x6b4/0x71f
[  266.280023]        [<c1061a58>] lock_acquire+0xb1/0xd5
[  266.280023]        [<c104b72f>] __cancel_work_timer+0xc0/0x186
[  266.280023]        [<c104b805>] cancel_delayed_work_sync+0x10/0x12
[  266.280023]        [<c14f6252>] cpufreq_governor_dbs+0x25e/0x2d7
[  266.280023]        [<c14f3d1b>] __cpufreq_governor+0x6a/0x74
[  266.280023]        [<c14f3e69>] __cpufreq_set_policy+0x144/0x1c8
[  266.280023]        [<c14f446f>] store_scaling_governor+0x15e/0x18d
[  266.280023]        [<c14f4cbc>] store+0x47/0x60
[  266.280023]        [<c11114f1>] sysfs_write_file+0xba/0xe5
[  266.280023]        [<c10c9898>] vfs_write+0xc5/0x162
[  266.280023]        [<c10c9e65>] sys_write+0x41/0x7c
[  266.280023]        [<c10039a7>] sysenter_do_call+0x12/0x3c
[  266.280023]        [<ffffffff>] 0xffffffff
[  266.280023] 
[  266.280023] other info that might help us debug this:
[  266.280023] 
[  266.280023] 3 locks held by S99local/4038:
[  266.280023]  #0:  (&buffer->mutex){+.+.+.}, at: [<c1111460>] sysfs_write_file+0x29/0xe5
[  266.280023]  #1:  (&per_cpu(cpu_policy_rwsem, cpu)){+++++.}, at: [<c14f4933>] lock_policy_rwsem_write+0x38/0x64
[  266.280023]  #2:  (dbs_mutex){+.+.+.}, at: [<c14f6241>] cpufreq_governor_dbs+0x24d/0x2d7
[  266.280023] 
[  266.280023] stack backtrace:
[  266.280023] Pid: 4038, comm: S99local Tainted: G        W  2.6.30-tip #6165
[  266.280023] Call Trace:
[  266.280023]  [<c105f562>] print_circular_bug_tail+0xa3/0xae
[  266.280023]  [<c105fbea>] validate_chain+0x5a0/0xa81
[  266.280023]  [<c106077f>] __lock_acquire+0x6b4/0x71f
[  266.280023]  [<c105dcd0>] ? mark_held_locks+0x42/0x5a
[  266.280023]  [<c1061a58>] lock_acquire+0xb1/0xd5
[  266.280023]  [<c104b718>] ? __cancel_work_timer+0xa9/0x186
[  266.280023]  [<c104b72f>] __cancel_work_timer+0xc0/0x186
[  266.280023]  [<c104b718>] ? __cancel_work_timer+0xa9/0x186
[  266.280023]  [<c15ddee6>] ? mutex_lock_nested+0x352/0x363
[  266.280023]  [<c14f6241>] ? cpufreq_governor_dbs+0x24d/0x2d7
[  266.280023]  [<c104b805>] cancel_delayed_work_sync+0x10/0x12
[  266.280023]  [<c14f6252>] cpufreq_governor_dbs+0x25e/0x2d7
[  266.280023]  [<c14f3d1b>] __cpufreq_governor+0x6a/0x74
[  266.280023]  [<c14f3e69>] __cpufreq_set_policy+0x144/0x1c8
[  266.280023]  [<c14f4311>] ? store_scaling_governor+0x0/0x18d
[  266.280023]  [<c14f446f>] store_scaling_governor+0x15e/0x18d
[  266.280023]  [<c14f4a9b>] ? handle_update+0x0/0x2d
[  266.280023]  [<c14f4311>] ? store_scaling_governor+0x0/0x18d
[  266.280023]  [<c14f4cbc>] store+0x47/0x60
[  266.280023]  [<c11114f1>] sysfs_write_file+0xba/0xe5
[  266.280023]  [<c1111437>] ? sysfs_write_file+0x0/0xe5
[  266.280023]  [<c10c9898>] vfs_write+0xc5/0x162
[  266.280023]  [<c10c9e65>] sys_write+0x41/0x7c
[  266.280023]  [<c10039a7>] sysenter_do_call+0x12/0x3c
[  272.000046] End ring buffer hammer


  reply	other threads:[~2009-06-20 12:49 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 21:00 [PATCH] kvm: fix kvm reboot crash when MAXSMP is used Yinghai Lu
2009-06-04 21:01 ` [PATCH] cpumask: alloc blank cpumask left over Yinghai Lu
2009-06-05  4:58   ` Rusty Russell
2009-06-05  5:18     ` Avi Kivity
2009-06-05  5:56     ` Yinghai Lu
2009-06-05 13:41       ` Rusty Russell
2009-06-05 17:34         ` Linus Torvalds
2009-06-05 17:46           ` Yinghai Lu
2009-06-05 17:57           ` Yinghai Lu
2009-06-06 23:40             ` Rusty Russell
2009-06-06 23:43           ` Rusty Russell
2009-06-06  9:22         ` Avi Kivity
2009-06-06  9:36           ` Yinghai Lu
2009-06-06  9:39             ` Avi Kivity
2009-06-06 10:57               ` Yinghai Lu
2009-06-06 21:50                 ` [PATCH 1/6] cpumask: introduce zalloc_cpumask_var Yinghai Lu
2009-06-06 21:51                   ` Subject: [PATCH 2/6] cpumask: alloc zeroed cpumask for static cpumask_var_ts Yinghai Lu
2009-06-06 21:52                   ` [PATCH 3/6] kvm: fix kvm reboot crash when MAXSMP is used Yinghai Lu
2009-06-06 21:53                   ` [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of = Yinghai Lu
2009-06-09  6:57                     ` Rusty Russell
2009-06-09  8:13                       ` Yinghai Lu
2009-06-10  4:20                         ` Rusty Russell
2009-06-10 13:39                           ` Dave Jones
2009-06-10 17:01                             ` Ingo Molnar
2009-06-09 15:46                       ` Linus Torvalds
2009-06-09 16:28                         ` Dave Jones
2009-06-09 16:41                           ` Linus Torvalds
2009-06-10  4:55                             ` Rusty Russell
2009-06-10  6:22                         ` Rusty Russell
2009-06-10 11:10                           ` S06cpuspeed/2637 is trying to acquire lock (&(&dbs_info->work)->work (was: Re: [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of =) Ingo Molnar
2009-06-10 20:58                             ` Dave Jones
2009-06-11 10:52                               ` Ingo Molnar
2009-06-20 12:48                                 ` Ingo Molnar [this message]
2009-06-21 19:55                                   ` Thomas Renninger
2009-06-23 18:17                                     ` [PATCH] cpufreq: remove dbs_mutex Ingo Molnar
2009-06-23 18:40                                       ` Ingo Molnar
2009-06-23 18:51                                         ` Pallipadi, Venkatesh
2009-06-23 19:14                                           ` Ingo Molnar
2009-06-23 19:24                                             ` Pallipadi, Venkatesh
2009-06-23 19:32                                               ` Ingo Molnar
2009-06-25 14:01                                                 ` Fix dead lock in cpufreq for CPU hotplug and suspend for 2.6.30.stable Thomas Renninger
2009-06-25 14:06                                                   ` Thomas Renninger
2009-06-25 14:01                                                 ` [PATCH 1/2] CPUFREQ: Remove unneeded dbs_mutexes from ondemand and conservative governors Thomas Renninger
2009-06-25 14:25                                                   ` Mathieu Desnoyers
2009-06-25 15:03                                                     ` Pallipadi, Venkatesh
2009-06-25 22:17                                                     ` Thomas Renninger
2009-06-25 22:26                                                       ` Thomas Renninger
2009-06-30  6:33                                                   ` Pavel Machek
2009-07-03 10:10                                                     ` Thomas Renninger
2009-07-05 19:46                                                       ` Pavel Machek
2009-06-30 22:58                                                   ` [stable] " Greg KH
2009-06-30 23:14                                                     ` Mathieu Desnoyers
2009-06-30 23:39                                                       ` Greg KH
2009-07-01  9:07                                                         ` Thomas Renninger
2009-06-25 14:01                                                 ` [PATCH 2/2] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site) Thomas Renninger
2009-06-10 19:42                           ` [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of = Langsdorf, Mark
2009-06-11  2:34                             ` Rusty Russell
2009-09-21 16:44                               ` Langsdorf, Mark
2009-06-06 21:55                   ` [PATCH 5/6] core: use cpumask_copy instead of = for cpus_allowed in fork Yinghai Lu
2009-06-06 21:56                   ` [PATCH 6/6] x86/cpufreq: don't use SPEEDSTEP with MAXSMP Yinghai Lu
2009-06-06 21:56                   ` [PATCH 1/6] cpumask: introduce zalloc_cpumask_var Andrew Morton
2009-06-06 22:07                     ` Yinghai Lu
2009-06-06 21:58                   ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090620124817.GA22831@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox