Bug 12612

Summary: hard lockup when interrupting cdda2wav
Product: Drivers Reporter: Rafael J. Wysocki (rjw)
Component: OtherAssignee: drivers_other
Status: CLOSED CODE_FIX    
Severity: normal CC: florian
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.28 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 11808    

Description Rafael J. Wysocki 2009-02-01 15:51:58 UTC
Subject    : 2.6.28 regression: hard lockup when interrupting cdda2wav
Submitter  : Matthias Reichl <hias@horus.com>
Date       : 2009-01-28 16:41
References : http://marc.info/?l=linux-kernel&m=123316111415677&w=4
Handled-By : FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

This entry is being used for tracking a regression from 2.6.27.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Rafael J. Wysocki 2009-02-05 08:10:51 UTC
On Thursday 05 February 2009, Matthias Reichl wrote:
> On Wed, Feb 04, 2009 at 11:58:51AM +0100, Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a report
> > of regressions introduced between 2.6.27 and 2.6.28.
> > 
> > The following bug entry is on the current list of known regressions
> > introduced between 2.6.27 and 2.6.28.  Please verify if it still should
> > be listed and let me know (either way).
> > 
> > 
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=12612
> > Subject             : hard lockup when interrupting cdda2wav
> > Submitter   : Matthias Reichl <hias@horus.com>
> > Date                : 2009-01-28 16:41 (8 days old)
> > References  : http://marc.info/?l=linux-kernel&m=123316111415677&w=4
> > Handled-By  : FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> 
> This bug is still present in 2.6.28.3.
Comment 2 Rafael J. Wysocki 2009-02-14 14:48:03 UTC
Patch : http://marc.info/?l=linux-scsi&m=123371501613019&w=2
Comment 3 Rafael J. Wysocki 2009-02-17 12:22:15 UTC
On Tuesday 17 February 2009, Matthias Reichl wrote:
> The bug is still present in 2.6.28.5:
> 
> =============================================
> [ INFO: possible recursive locking detected ]
> 2.6.28.5-dbg #1
> ---------------------------------------------
> swapper/0 is trying to acquire lock:
>  (&q->__queue_lock){.+..}, at: [<ffffffff8040e615>] blk_put_request+0x25/0x60
> 
> but task is already holding lock:
>  (&q->__queue_lock){.+..}, at: [<ffffffff8040e4fa>] blk_end_io+0x5a/0xa0
> 
> other info that might help us debug this:
> 1 lock held by swapper/0:
>  #0:  (&q->__queue_lock){.+..}, at: [<ffffffff8040e4fa>] blk_end_io+0x5a/0xa0
> 
> stack backtrace:
> Pid: 0, comm: swapper Not tainted 2.6.28.5-dbg #1
> Call Trace:
>  <IRQ>  [<ffffffff8026cd07>] __lock_acquire+0x1797/0x1930
>  [<ffffffff806abf8b>] error_exit+0x29/0xa9
>  [<ffffffff80521f40>] sg_rq_end_io+0x0/0x2e0
>  [<ffffffff8026cf3a>] lock_acquire+0x9a/0xe0
>  [<ffffffff8040e615>] blk_put_request+0x25/0x60
>  [<ffffffff806ab973>] _spin_lock_irqsave+0x43/0x90
>  [<ffffffff8040e615>] blk_put_request+0x25/0x60
>  [<ffffffff8040e615>] blk_put_request+0x25/0x60
>  [<ffffffff80520a94>] sg_finish_rem_req+0xa4/0x100
>  [<ffffffff805221b8>] sg_rq_end_io+0x278/0x2e0
>  [<ffffffff8040e2a1>] end_that_request_last+0x61/0x260
>  [<ffffffff8040e508>] blk_end_io+0x68/0xa0
>  [<ffffffff80508181>] scsi_end_request+0x41/0xd0
>  [<ffffffff80508870>] scsi_io_completion+0x130/0x470
>  [<ffffffff80413405>] blk_done_softirq+0x75/0x90
>  [<ffffffff802488ab>] __do_softirq+0x9b/0x180
>  [<ffffffff80213df3>] native_sched_clock+0x13/0x70
>  [<ffffffff8020d6ec>] call_softirq+0x1c/0x30
>  [<ffffffff8020f175>] do_softirq+0x65/0xa0
>  [<ffffffff80248345>] irq_exit+0xa5/0xb0
>  [<ffffffff8020f467>] do_IRQ+0x107/0x1d0
>  [<ffffffff8020c7fb>] ret_from_intr+0x0/0xf
>  <EOI>  [<ffffffff80214ba6>] mwait_idle+0x56/0x60
>  [<ffffffff80214b9d>] mwait_idle+0x4d/0x60
>  [<ffffffff8020b353>] cpu_idle+0x63/0xc0
Comment 4 Florian Mickler 2010-09-03 09:04:54 UTC
Fixed by mainline commit merged in 2.6.30-rc1:

commit c96952ed7031e7c576ecf90cf95b8ec099d5295a
Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date:   Wed Feb 4 11:36:27 2009 +0900

    [SCSI] sg: avoid blk_put_request/blk_rq_unmap_user in interrupt