linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
@ 2012-01-17 23:22 John Kacur
  2012-01-17 23:53 ` Karsten Wiese
  0 siblings, 1 reply; 7+ messages in thread
From: John Kacur @ 2012-01-17 23:22 UTC (permalink / raw)
  To: LKML, RT
  Cc: Thomas Gleixner, Steven Rostedt, Paul E. McKenney, Peter Zijlstra

I got a whole bunch of these in 3.0.14-rt31 that basically look alike.
Will try to drill deeper down. In the meantime, I'm happy to provide
more information if anyone would like.
Thanks, John

[ 4251.928097] BUG: sleeping function called from invalid context at
/home/jkacur/rt.linux.git/kernel/rtmutex.c:645
[ 4251.928100] in_atomic(): 1, irqs_disabled(): 1, pid: 168, name: irq/9-acpi
[ 4251.928102] INFO: lockdep is turned off.
[ 4251.928103] irq event stamp: 5888
[ 4251.928104] hardirqs last  enabled at (5887): [<ffffffff810b2a69>]
rcu_preempt_note_context_switch+0x1c8/0x1d9
[ 4251.928109] hardirqs last disabled at (5888): [<ffffffff813e4326>]
_raw_spin_lock_irq+0x19/0x79
[ 4251.928113] softirqs last  enabled at (0): [<ffffffff81041c88>]
copy_process+0x517/0xfbd
[ 4251.928116] softirqs last disabled at (0): [<          (null)>]
      (null)
[ 4251.928119] Pid: 168, comm: irq/9-acpi Not tainted
3.0.14-rt31-debug-00322-g6aaac97b #1
[ 4251.928121] Call Trace:
[ 4251.928125]  [<ffffffff81037b06>] __might_sleep+0xf4/0xf9
[ 4251.928128]  [<ffffffff8107e4f5>] rt_spin_lock_fastlock.clone.0+0x24/0x31
[ 4251.928130]  [<ffffffff813e3b33>] rt_spin_lock+0x16/0x40
[ 4251.928133]  [<ffffffff8103eb60>] __wake_up+0x28/0x50
[ 4251.928136]  [<ffffffff8122ca51>] acpi_ec_gpe_handler+0x72/0xc4
[ 4251.928145]  [<ffffffff81238443>] acpi_ev_gpe_dispatch+0xbd/0x12e
[ 4251.928147]  [<ffffffff81238727>] acpi_ev_gpe_detect+0xbb/0x110
[ 4251.928150]  [<ffffffff81236e88>] acpi_ev_sci_xrupt_handler+0x22/0x2b
[ 4251.928152]  [<ffffffff81226e5e>] acpi_irq+0x16/0x31
[ 4251.928155]  [<ffffffff810adcab>] irq_forced_thread_fn+0x25/0x45
[ 4251.928157]  [<ffffffff813e45d1>] ? _raw_spin_unlock_irq+0x50/0x5e
[ 4251.928159]  [<ffffffff810adaee>] irq_thread+0xff/0x1e9
[ 4251.928162]  [<ffffffff810adc86>] ? exit_irq_thread+0x74/0x74
[ 4251.928164]  [<ffffffff810ad9ef>] ? irq_finalize_oneshot+0xaf/0xaf
[ 4251.928166]  [<ffffffff810ad9ef>] ? irq_finalize_oneshot+0xaf/0xaf
[ 4251.928169]  [<ffffffff81062b48>] kthread+0x94/0x9c
[ 4251.928171]  [<ffffffff813e1f99>] ? preempt_schedule+0x4b/0x53
[ 4251.928174]  [<ffffffff813e45da>] ? _raw_spin_unlock_irq+0x59/0x5e
[ 4251.928177]  [<ffffffff813ebb54>] kernel_thread_helper+0x4/0x10
[ 4251.928180]  [<ffffffff813e4984>] ? retint_restore_args+0xe/0xe
[ 4251.928182]  [<ffffffff81062ab4>] ? kthreadd+0x168/0x168
[ 4251.928184]  [<ffffffff813ebb50>] ? gs_change+0xb/0xb

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
  2012-01-17 23:22 rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context John Kacur
@ 2012-01-17 23:53 ` Karsten Wiese
  2012-01-18  1:02   ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Karsten Wiese @ 2012-01-17 23:53 UTC (permalink / raw)
  To: John Kacur
  Cc: LKML, RT, Thomas Gleixner, Steven Rostedt, Paul E. McKenney,
	Peter Zijlstra

Am Mittwoch 18 Januar 2012 schrieb John Kacur:
> I got a whole bunch of these in 3.0.14-rt31 that basically look alike.
> Will try to drill deeper down. In the meantime, I'm happy to provide
> more information if anyone would like.
> Thanks, John
> 
> [ 4251.928097] BUG: sleeping function called from invalid context at
> /home/jkacur/rt.linux.git/kernel/rtmutex.c:645
> [ 4251.928100] in_atomic(): 1, irqs_disabled(): 1, pid: 168, name: irq/9-acpi
> [ 4251.928102] INFO: lockdep is turned off.
> [ 4251.928103] irq event stamp: 5888
> [ 4251.928104] hardirqs last  enabled at (5887): [<ffffffff810b2a69>]
> rcu_preempt_note_context_switch+0x1c8/0x1d9
> [ 4251.928109] hardirqs last disabled at (5888): [<ffffffff813e4326>]
> _raw_spin_lock_irq+0x19/0x79
> [ 4251.928113] softirqs last  enabled at (0): [<ffffffff81041c88>]
> copy_process+0x517/0xfbd
> [ 4251.928116] softirqs last disabled at (0): [<          (null)>]
>       (null)
> [ 4251.928119] Pid: 168, comm: irq/9-acpi Not tainted
> 3.0.14-rt31-debug-00322-g6aaac97b #1
> [ 4251.928121] Call Trace:
> [ 4251.928125]  [<ffffffff81037b06>] __might_sleep+0xf4/0xf9
> [ 4251.928128]  [<ffffffff8107e4f5>] rt_spin_lock_fastlock.clone.0+0x24/0x31
> [ 4251.928130]  [<ffffffff813e3b33>] rt_spin_lock+0x16/0x40
> [ 4251.928133]  [<ffffffff8103eb60>] __wake_up+0x28/0x50
> [ 4251.928136]  [<ffffffff8122ca51>] acpi_ec_gpe_handler+0x72/0xc4
> [ 4251.928145]  [<ffffffff81238443>] acpi_ev_gpe_dispatch+0xbd/0x12e
> [ 4251.928147]  [<ffffffff81238727>] acpi_ev_gpe_detect+0xbb/0x110

The bug happens because acpi_ev_gpe_detect does
raw_spin_lock_irqsave(&acpi_gbl_gpe_lock, flags) before it calls
acpi_ev_gpe_dispatch.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
  2012-01-17 23:53 ` Karsten Wiese
@ 2012-01-18  1:02   ` Steven Rostedt
  2012-01-19 16:16     ` John Kacur
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2012-01-18  1:02 UTC (permalink / raw)
  To: Karsten Wiese
  Cc: John Kacur, LKML, RT, Thomas Gleixner, Paul E. McKenney, Peter Zijlstra

On Wed, 2012-01-18 at 00:53 +0100, Karsten Wiese wrote:

> The bug happens because acpi_ev_gpe_detect does
> raw_spin_lock_irqsave(&acpi_gbl_gpe_lock, flags) before it calls
> acpi_ev_gpe_dispatch.

Correct. I believe there's a fix in the 3.2-rt. I'm working on getting
the updates from it to the stable tree.

-- Steve



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
  2012-01-18  1:02   ` Steven Rostedt
@ 2012-01-19 16:16     ` John Kacur
  2012-01-19 16:38       ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: John Kacur @ 2012-01-19 16:16 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Karsten Wiese, LKML, RT, Thomas Gleixner, Paul E. McKenney,
	Peter Zijlstra

On Wed, Jan 18, 2012 at 2:02 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Wed, 2012-01-18 at 00:53 +0100, Karsten Wiese wrote:
>
>> The bug happens because acpi_ev_gpe_detect does
>> raw_spin_lock_irqsave(&acpi_gbl_gpe_lock, flags) before it calls
>> acpi_ev_gpe_dispatch.
>
> Correct. I believe there's a fix in the 3.2-rt. I'm working on getting
> the updates from it to the stable tree.

I'm testing v3.0.14-rt32-rc1, and it greatly reduced the number of
these, but I still got one during boot.

[   11.938649] BUG: sleeping function called from invalid context at
/home/jkacur/rt.linux.git/kernel/rtmutex.c:645
[   11.938651] in_atomic(): 1, irqs_disabled(): 1, pid: 168, name: irq/9-acpi
[   11.938653] 1 lock held by irq/9-acpi/168:
[   11.938653]  #0:  (acpi_gbl_gpe_lock){......}, at:
[<ffffffff8123881d>] acpi_ev_gpe_detect+0x31/0x110
[   11.938661] irq event stamp: 1148
[   11.938662] hardirqs last  enabled at (1147): [<ffffffff813e4731>]
_raw_spin_unlock_irq+0x30/0x5e
[   11.938667] hardirqs last disabled at (1148): [<ffffffff813e4524>]
_raw_spin_lock_irqsave+0x1e/0x85
[   11.938669] softirqs last  enabled at (0): [<ffffffff81041c88>]
copy_process+0x517/0xfbd
[   11.938673] softirqs last disabled at (0): [<          (null)>]
      (null)
[   11.938676] Pid: 168, comm: irq/9-acpi Not tainted
3.0.14-rt32-rc1-debug-00323-ga86a4da #1
[   11.938677] Call Trace:
[   11.938681]  [<ffffffff81037b06>] __might_sleep+0xf4/0xf9
[   11.938684]  [<ffffffff8107e6b1>] rt_spin_lock_fastlock.clone.0+0x24/0x31
[   11.938687]  [<ffffffff813e3cb3>] rt_spin_lock+0x16/0x40
[   11.938690]  [<ffffffff8107574c>] ? trace_hardirqs_off_caller+0x1f/0x99
[   11.938694]  [<ffffffff8111ac19>] __local_lock_irq+0x29/0x7c
[   11.938696]  [<ffffffff8111ac8c>] __local_lock_irqsave+0x20/0x31
[   11.938698]  [<ffffffff8111dfc1>] kmem_cache_alloc_trace+0x5f/0x14f
[   11.938701]  [<ffffffff81238683>] ? acpi_os_allocate_zeroed+0x2d/0x2d
[   11.938704]  [<ffffffff81227831>] __acpi_os_execute+0x38/0x143
[   11.938706]  [<ffffffff81227969>] acpi_os_execute+0x10/0x12
[   11.938708]  [<ffffffff812385e5>] acpi_ev_gpe_dispatch+0xdf/0x12e
[   11.938710]  [<ffffffff812388a7>] acpi_ev_gpe_detect+0xbb/0x110
[   11.938713]  [<ffffffff81237008>] acpi_ev_sci_xrupt_handler+0x22/0x2b
[   11.938715]  [<ffffffff8122700e>] acpi_irq+0x16/0x31
[   11.938719]  [<ffffffff810ade67>] irq_forced_thread_fn+0x25/0x45
[   11.938721]  [<ffffffff813e4751>] ? _raw_spin_unlock_irq+0x50/0x5e
[   11.938723]  [<ffffffff810adcaa>] irq_thread+0xff/0x1e9
[   11.938725]  [<ffffffff810ade42>] ? exit_irq_thread+0x74/0x74
[   11.938727]  [<ffffffff810adbab>] ? irq_finalize_oneshot+0xaf/0xaf
[   11.938730]  [<ffffffff810adbab>] ? irq_finalize_oneshot+0xaf/0xaf
[   11.938733]  [<ffffffff81062b48>] kthread+0x94/0x9c
[   11.938735]  [<ffffffff813e7633>] ? sub_preempt_count+0xa3/0xb6
[   11.938738]  [<ffffffff813e4751>] ? _raw_spin_unlock_irq+0x50/0x5e
[   11.938741]  [<ffffffff813ebcd4>] kernel_thread_helper+0x4/0x10
[   11.938744]  [<ffffffff8103bec0>] ? finish_task_switch+0x85/0xe2
[   11.938746]  [<ffffffff813e4b04>] ? retint_restore_args+0xe/0xe
[   11.938749]  [<ffffffff81062ab4>] ? kthreadd+0x168/0x168
[   11.938751]  [<ffffffff813ebcd0>] ? gs_change+0xb/0xb

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
  2012-01-19 16:16     ` John Kacur
@ 2012-01-19 16:38       ` Steven Rostedt
  2012-01-19 21:06         ` John Kacur
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2012-01-19 16:38 UTC (permalink / raw)
  To: John Kacur
  Cc: Karsten Wiese, LKML, RT, Thomas Gleixner, Paul E. McKenney,
	Peter Zijlstra

On Thu, 2012-01-19 at 17:16 +0100, John Kacur wrote:

> I'm testing v3.0.14-rt32-rc1, and it greatly reduced the number of
> these, but I still got one during boot.
> 
> [   11.938649] BUG: sleeping function called from invalid context at
> /home/jkacur/rt.linux.git/kernel/rtmutex.c:645
> [   11.938651] in_atomic(): 1, irqs_disabled(): 1, pid: 168, name: irq/9-acpi
> [   11.938653] 1 lock held by irq/9-acpi/168:
> [   11.938653]  #0:  (acpi_gbl_gpe_lock){......}, at:
> [<ffffffff8123881d>] acpi_ev_gpe_detect+0x31/0x110

Could you test 3.2-rt. If that has the issue then we know we have more
to fix. If not, we know I missed a patch.

-- Steve



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
  2012-01-19 16:38       ` Steven Rostedt
@ 2012-01-19 21:06         ` John Kacur
  2012-01-25 11:02           ` Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: John Kacur @ 2012-01-19 21:06 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Karsten Wiese, LKML, RT, Thomas Gleixner, Paul E. McKenney,
	Peter Zijlstra

On Thu, Jan 19, 2012 at 5:38 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 2012-01-19 at 17:16 +0100, John Kacur wrote:
>
>> I'm testing v3.0.14-rt32-rc1, and it greatly reduced the number of
>> these, but I still got one during boot.
>>
>> [   11.938649] BUG: sleeping function called from invalid context at
>> /home/jkacur/rt.linux.git/kernel/rtmutex.c:645
>> [   11.938651] in_atomic(): 1, irqs_disabled(): 1, pid: 168, name: irq/9-acpi
>> [   11.938653] 1 lock held by irq/9-acpi/168:
>> [   11.938653]  #0:  (acpi_gbl_gpe_lock){......}, at:
>> [<ffffffff8123881d>] acpi_ev_gpe_detect+0x31/0x110
>
> Could you test 3.2-rt. If that has the issue then we know we have more
> to fix. If not, we know I missed a patch.
>

I tested with v3.2-rt10 and the issue is not there.

I also examined your patches and couldn't find anything wrong with
them, and for larks tried applying
cpumask-disable-offstack-on-rt.patch from v3.2-rt10
all to no avail, the problem is still there.

Thanks
John

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context
  2012-01-19 21:06         ` John Kacur
@ 2012-01-25 11:02           ` Thomas Gleixner
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Gleixner @ 2012-01-25 11:02 UTC (permalink / raw)
  To: John Kacur
  Cc: Steven Rostedt, Karsten Wiese, LKML, RT, Paul E. McKenney,
	Peter Zijlstra

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1307 bytes --]

On Thu, 19 Jan 2012, John Kacur wrote:

> On Thu, Jan 19, 2012 at 5:38 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > On Thu, 2012-01-19 at 17:16 +0100, John Kacur wrote:
> > 
> >> I'm testing v3.0.14-rt32-rc1, and it greatly reduced the number of
> >> these, but I still got one during boot.
> >>
> >> [   11.938649] BUG: sleeping function called from invalid context at
> >> /home/jkacur/rt.linux.git/kernel/rtmutex.c:645
> >> [   11.938651] in_atomic(): 1, irqs_disabled(): 1, pid: 168, name: irq/9-acpi
> >> [   11.938653] 1 lock held by irq/9-acpi/168:
> >> [   11.938653]  #0:  (acpi_gbl_gpe_lock){......}, at:
> >> [<ffffffff8123881d>] acpi_ev_gpe_detect+0x31/0x110
> >
> > Could you test 3.2-rt. If that has the issue then we know we have more
> > to fix. If not, we know I missed a patch.
> >
> 
> I tested with v3.2-rt10 and the issue is not there.

I'm surprised. I know already what the problem is and according to the
code it should be visible in 3.2 as well. I'm still twisting my head
around that acpi maze to fix that particular one.

> I also examined your patches and couldn't find anything wrong with
> them, and for larks tried applying
> cpumask-disable-offstack-on-rt.patch from v3.2-rt10
> all to no avail, the problem is still there.

What a surprise, it's completely unrelated.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-25 11:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-17 23:22 rt-kernel 3.0.14-rt31: BUG: sleeping function called from invalid context John Kacur
2012-01-17 23:53 ` Karsten Wiese
2012-01-18  1:02   ` Steven Rostedt
2012-01-19 16:16     ` John Kacur
2012-01-19 16:38       ` Steven Rostedt
2012-01-19 21:06         ` John Kacur
2012-01-25 11:02           ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).