From: Steven Rostedt <rostedt@goodmis.org>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Mark Knecht <markknecht@gmail.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
rmk@arm.linux.org.uk
Subject: Re: scsi_eh / 1394 bug - -rt7
Date: Wed, 19 Oct 2005 03:10:55 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0510190300010.20634@localhost.localdomain> (raw)
In-Reply-To: <1129695564.8910.64.camel@mindpipe>
On Wed, 19 Oct 2005, Lee Revell wrote:
> On Tue, 2005-10-18 at 23:43 -0400, Lee Revell wrote:
> > On Tue, 2005-10-18 at 14:02 -0700, Mark Knecht wrote:
> > > Hi,
> > > I'm seeing this each time I plug in a 1394 hard drive:
> > >
> > > Attached scsi disk sdc at scsi6, channel 0, id 0, lun 0
> > > ieee1394: Node changed: 0-01:1023 -> 0-00:1023
> > > ieee1394: Node changed: 0-02:1023 -> 0-01:1023
> > > ieee1394: Reconnected to SBP-2 device
> > > ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
> > > ieee1394: Node suspended: ID:BUS[0-00:1023] GUID[0050c501e00b31ec]
> > > prev->state: 2 != TASK_RUNNING??
> > > scsi_eh_6/20286[CPU#0]: BUG in __schedule at kernel/sched.c:3328
> >
> > I hit this exact same bug while at a client site today, with an external
> > USB drive.
>
> And again on my home machine running -rt1 with my digital camera!
>
> Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
> usb 2-1: USB disconnect, address 2
> prev->state: 2 != TASK_RUNNING??
> scsi_eh_0/12648[CPU#0]: BUG in __schedule at kernel/sched.c:3326
> [<c01048b9>] dump_stack+0x19/0x20 (20)
> [<c011e766>] __WARN_ON+0x46/0x80 (12)
> [<c02c0bf7>] __schedule+0x547/0x790 (84)
> [<c012057a>] do_exit+0x26a/0x430 (28)
> [<c010147b>] kernel_thread_helper+0xb/0x10 (1020129312)
>
This is also a problem in the upstream kernel. It's just that RT catches
it! Here's the patch. I'll also write one for the upstream kernel,
although this patch would probably work there as well. But I'll make it
official.
Ingo,
Here's the patch. The problem is similar to the pcmcia bug. It seems
that the loop usually exits in the TASK_INTERRUPTIBLE state.
Lee and Mark,
Can you two try it as well and confirm that you cant get the
bug anymore.
Thanks,
-- Steve
Index: linux-2.6.14-rc4-rt9/drivers/scsi/scsi_error.c
===================================================================
--- linux-2.6.14-rc4-rt9.orig/drivers/scsi/scsi_error.c 2005-10-19 02:54:49.000000000 -0400
+++ linux-2.6.14-rc4-rt9/drivers/scsi/scsi_error.c 2005-10-19 02:57:06.000000000 -0400
@@ -1645,6 +1645,12 @@
set_current_state(TASK_INTERRUPTIBLE);
}
+ /*
+ * There's a good chance that the loop will exit in the
+ * TASK_INTERRUPTIBLE state.
+ */
+ __set_current_state(TASK_RUNNING);
+
SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d"
" exiting\n",shost->host_no));
next prev parent reply other threads:[~2005-10-19 7:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-18 21:02 Mark Knecht
2005-10-19 3:43 ` Lee Revell
2005-10-19 4:19 ` Lee Revell
2005-10-19 7:10 ` Steven Rostedt [this message]
2005-10-19 7:54 ` [PATCH] scsi_error thread exits in TASK_INTERRUPTIBLE state Steven Rostedt
2005-10-19 11:31 ` Christoph Hellwig
2005-10-19 11:51 ` Steven Rostedt
2005-10-19 11:54 ` Christoph Hellwig
2005-10-19 12:22 ` Steven Rostedt
2005-10-19 11:56 ` Ingo Molnar
2005-10-19 11:59 ` Christoph Hellwig
2005-10-19 11:22 ` scsi_eh / 1394 bug - -rt7 Ingo Molnar
2005-10-19 15:23 ` Mark Knecht
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=Pine.LNX.4.58.0510190300010.20634@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markknecht@gmail.com \
--cc=mingo@elte.hu \
--cc=rlrevell@joe-job.com \
--cc=rmk@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®