public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
@ 2005-01-30 23:34 Fabio Coatti
  2005-01-31  8:00 ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Coatti @ 2005-01-30 23:34 UTC (permalink / raw)
  To: akpm, linux-kernel

I'm seeing a problem with latest mm releases; with 2.6.11-rc1,2-mmX every time 
I fire up k3b, it get stuck here: (last line, previous lines just for 
documentation :) )

open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
ioctl(11, CDROM_SEND_PACKET, 0xbfffc4e0) = 0
close(11)                               = 0
open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
ioctl(11, CDROM_SEND_PACKET, 0xbfffc590) = -1 EIO (Input/output error)
close(11)                               = 0
open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
ioctl(11, CDROM_SEND_PACKET, 0xbfffc4e0) = 0
ioctl(11, CDROM_SEND_PACKET, 0xbfffc4e0) = 0
close(11)                               = 0
open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
ioctl(11, CDROM_GET_CAPABILITY or SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, 
0x7fffffff) = 3735535
close(11)                               = 0
lstat64("/dev", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=30220, ...}) = 0
lstat64("/dev/sr1", {st_mode=S_IFBLK|0600, st_rdev=makedev(11, 1), ...}) = 0
open("/dev/sr1", O_RDONLY|O_NONBLOCK)   = 11
fstat64(11, {st_mode=S_IFBLK|0600, st_rdev=makedev(11, 1), ...}) = 0
ioctl(11, CDROM_SEND_PACKET, 0xbfffd740) = 0
close(11)                               = 0
open("/dev/sr1", O_RDONLY|O_NONBLOCK)   = 11
fstat64(11, {st_mode=S_IFBLK|0600, st_rdev=makedev(11, 1), ...}) = 0
ioctl(11, CDROMAUDIOBUFSIZ or SCSI_IOCTL_GET_IDLUN, 0xbfffd7e8) = 0
ioctl(11, SCSI_IOCTL_GET_BUS_NUMBER, 0xbfffd8a4) = 0
close(11)                               = 0
open("/dev/sr1", O_RDONLY|O_NONBLOCK)   = 11
ioctl(11, CDROM_SEND_PACKET, 0xbfffd7d0) = 0
ioctl(11, CDROM_SEND_PACKET          

At this point k3b is stuck in D stat, needs reboot.

I've thinked of faulty HW, but 2.6.10-mm2 can complete the scan (I haven't 
tried to use that device, to ber honest, after successful initialization).

On scsi- bus I've the following devices:
cova@kefk ~ $ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: Nikon    Model: COOLSCANIII      Rev: 1.31
  Type:   Scanner                          ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: PLEXTOR  Model: CD-ROM PX-40TS   Rev: 1.01
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: YAMAHA   Model: CRW6416S         Rev: 1.0c
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: Maxtor 6Y160M0   Rev: YAR5
  Type:   Direct-Access                    ANSI SCSI revision: 05

cova@kefk ~ $ cat /proc/scsi/aic7xxx/0
Adaptec AIC7xxx driver version: 6.2.36
Adaptec 2902/04/10/15/20C/30C SCSI adapter
aic7850: Single Channel A, SCSI Id=7, 3/253 SCBs
Allocated SCBs: 4, SG List Length: 128



Let me know if further details/testing are needed.



-- 
Fabio Coatti       http://members.ferrara.linux.it/cova     
Ferrara Linux Users Group           http://ferrara.linux.it
GnuPG fp:9765 A5B6 6843 17BC A646  BE8C FA56 373A 5374 C703
Old SysOps never die... they simply forget their password.

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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-30 23:34 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok Fabio Coatti
@ 2005-01-31  8:00 ` Jens Axboe
  2005-01-31 10:08   ` Fabio Coatti
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2005-01-31  8:00 UTC (permalink / raw)
  To: Fabio Coatti; +Cc: akpm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

On Mon, Jan 31 2005, Fabio Coatti wrote:
> I'm seeing a problem with latest mm releases; with 2.6.11-rc1,2-mmX every time 
> I fire up k3b, it get stuck here: (last line, previous lines just for 
> documentation :) )
> 
> open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
> ioctl(11, CDROM_SEND_PACKET, 0xbfffc4e0) = 0
> close(11)                               = 0
> open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
> ioctl(11, CDROM_SEND_PACKET, 0xbfffc590) = -1 EIO (Input/output error)
> close(11)                               = 0
> open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
> ioctl(11, CDROM_SEND_PACKET, 0xbfffc4e0) = 0
> ioctl(11, CDROM_SEND_PACKET, 0xbfffc4e0) = 0
> close(11)                               = 0
> open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 11
> ioctl(11, CDROM_GET_CAPABILITY or SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, 
> 0x7fffffff) = 3735535
> close(11)                               = 0
> lstat64("/dev", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=30220, ...}) = 0
> lstat64("/dev/sr1", {st_mode=S_IFBLK|0600, st_rdev=makedev(11, 1), ...}) = 0
> open("/dev/sr1", O_RDONLY|O_NONBLOCK)   = 11
> fstat64(11, {st_mode=S_IFBLK|0600, st_rdev=makedev(11, 1), ...}) = 0
> ioctl(11, CDROM_SEND_PACKET, 0xbfffd740) = 0
> close(11)                               = 0
> open("/dev/sr1", O_RDONLY|O_NONBLOCK)   = 11
> fstat64(11, {st_mode=S_IFBLK|0600, st_rdev=makedev(11, 1), ...}) = 0
> ioctl(11, CDROMAUDIOBUFSIZ or SCSI_IOCTL_GET_IDLUN, 0xbfffd7e8) = 0
> ioctl(11, SCSI_IOCTL_GET_BUS_NUMBER, 0xbfffd8a4) = 0
> close(11)                               = 0
> open("/dev/sr1", O_RDONLY|O_NONBLOCK)   = 11
> ioctl(11, CDROM_SEND_PACKET, 0xbfffd7d0) = 0
> ioctl(11, CDROM_SEND_PACKET          
> 
> At this point k3b is stuck in D stat, needs reboot.

The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
2.6.11-rc2-mm1 with bk-scsi backed out? (attached)

-- 
Jens Axboe


[-- Attachment #2: bk-scsi-rc-fixes.patch.bz2 --]
[-- Type: application/x-bunzip2, Size: 30881 bytes --]

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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-31  8:00 ` Jens Axboe
@ 2005-01-31 10:08   ` Fabio Coatti
  2005-01-31 11:05     ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Coatti @ 2005-01-31 10:08 UTC (permalink / raw)
  To: Jens Axboe; +Cc: akpm, lkml

Alle 09:00, lunedì 31 gennaio 2005, Jens Axboe ha scritto:
>
> > At this point k3b is stuck in D stat, needs reboot.
>
> The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
> 2.6.11-rc2-mm1 with bk-scsi backed out? (attached)

just tried, right guess :)
backing out that patch the problem disappears.
Let me know if you need to narrow further that issue.

Thanks :)


-- 
Fabio Coatti       http://members.ferrara.linux.it/cova     
Ferrara Linux Users Group           http://ferrara.linux.it
GnuPG fp:9765 A5B6 6843 17BC A646  BE8C FA56 373A 5374 C703
Old SysOps never die... they simply forget their password.

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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-31 10:08   ` Fabio Coatti
@ 2005-01-31 11:05     ` Jens Axboe
  2005-01-31 11:49       ` Douglas Gilbert
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2005-01-31 11:05 UTC (permalink / raw)
  To: Fabio Coatti; +Cc: akpm, lkml, dougg

On Mon, Jan 31 2005, Fabio Coatti wrote:
> Alle 09:00, lunedì 31 gennaio 2005, Jens Axboe ha scritto:
> >
> > > At this point k3b is stuck in D stat, needs reboot.
> >
> > The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
> > 2.6.11-rc2-mm1 with bk-scsi backed out? (attached)
> 
> just tried, right guess :)
> backing out that patch the problem disappears.
> Let me know if you need to narrow further that issue.

Doug, it looks like your REQ_BLOCK_PC changes are buggy. Let me know if
you cannot find the full post and I'll forward it to you.

-- 
Jens Axboe


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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-31 11:05     ` Jens Axboe
@ 2005-01-31 11:49       ` Douglas Gilbert
  2005-01-31 11:49         ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Douglas Gilbert @ 2005-01-31 11:49 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Fabio Coatti, akpm, lkml

Jens Axboe wrote:
> On Mon, Jan 31 2005, Fabio Coatti wrote:
> 
>>Alle 09:00, lunedì 31 gennaio 2005, Jens Axboe ha scritto:
>>
>>>>At this point k3b is stuck in D stat, needs reboot.
>>>
>>>The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
>>>2.6.11-rc2-mm1 with bk-scsi backed out? (attached)
>>
>>just tried, right guess :)
>>backing out that patch the problem disappears.
>>Let me know if you need to narrow further that issue.
> 
> 
> Doug, it looks like your REQ_BLOCK_PC changes are buggy. Let me know if
> you cannot find the full post and I'll forward it to you.

Jens,
Hmm. Found the thread on lkml. I got an almost identical
lock up in k3b with a USB external cd/dvd drive recently.
My laptop didn't need rebooting (probably since the root
fs is one an ide disk).

That is a quite large patch that you referenced. I'll
try and replicate and report back.

Doug Gilbert


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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-31 11:49       ` Douglas Gilbert
@ 2005-01-31 11:49         ` Jens Axboe
  2005-01-31 13:09           ` Douglas Gilbert
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2005-01-31 11:49 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: Fabio Coatti, akpm, lkml

On Mon, Jan 31 2005, Douglas Gilbert wrote:
> Jens Axboe wrote:
> >On Mon, Jan 31 2005, Fabio Coatti wrote:
> >
> >>Alle 09:00, lunedì 31 gennaio 2005, Jens Axboe ha scritto:
> >>
> >>>>At this point k3b is stuck in D stat, needs reboot.
> >>>
> >>>The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
> >>>2.6.11-rc2-mm1 with bk-scsi backed out? (attached)
> >>
> >>just tried, right guess :)
> >>backing out that patch the problem disappears.
> >>Let me know if you need to narrow further that issue.
> >
> >
> >Doug, it looks like your REQ_BLOCK_PC changes are buggy. Let me know if
> >you cannot find the full post and I'll forward it to you.
> 
> Jens,
> Hmm. Found the thread on lkml. I got an almost identical
> lock up in k3b with a USB external cd/dvd drive recently.
> My laptop didn't need rebooting (probably since the root
> fs is one an ide disk).
> 
> That is a quite large patch that you referenced. I'll
> try and replicate and report back.

My guess would be the scsi_lib changes, I would suggest you start there.

-- 
Jens Axboe


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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-31 11:49         ` Jens Axboe
@ 2005-01-31 13:09           ` Douglas Gilbert
  2005-01-31 13:53             ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Douglas Gilbert @ 2005-01-31 13:09 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Fabio Coatti, akpm, lkml, linux-scsi

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

Jens Axboe wrote:
> On Mon, Jan 31 2005, Douglas Gilbert wrote:
> 
>>Jens Axboe wrote:
>>
>>>On Mon, Jan 31 2005, Fabio Coatti wrote:
>>>
>>>
>>>>Alle 09:00, lunedì 31 gennaio 2005, Jens Axboe ha scritto:
>>>>
>>>>
>>>>>>At this point k3b is stuck in D stat, needs reboot.

I was able to replicate this with a USB burner.
My system didn't need a reboot. The "D" state was locked
on "blk_execute_rq". The burner was still accessible via
sg.

>>>>>The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
>>>>>2.6.11-rc2-mm1 with bk-scsi backed out? (attached)
>>>>
>>>>just tried, right guess :)
>>>>backing out that patch the problem disappears.
>>>>Let me know if you need to narrow further that issue.
>>>
>>>
>>>Doug, it looks like your REQ_BLOCK_PC changes are buggy. Let me know if
>>>you cannot find the full post and I'll forward it to you.
>>
>>Jens,
>>Hmm. Found the thread on lkml. I got an almost identical
>>lock up in k3b with a USB external cd/dvd drive recently.
>>My laptop didn't need rebooting (probably since the root
>>fs is one an ide disk).
>>
>>That is a quite large patch that you referenced. I'll
>>try and replicate and report back.
> 
> 
> My guess would be the scsi_lib changes, I would suggest you start there.

Indeed. I'm not sure what I was thinking in
scsi_io_completion(). This small reversion
fixes my k3b problem; tested with a USB external
burner.

Signed-off-by: Douglas Gilbert <dougg@torque.net>





[-- Attachment #2: scsi_lib2611rc2bk8.diff --]
[-- Type: text/x-patch, Size: 1233 bytes --]

--- linux/drivers/scsi/scsi_lib.c	2005-01-31 17:46:31.000000000 +1000
+++ linux/drivers/scsi/scsi_lib.c2611r2b8_k3b	2005-01-31 22:46:04.000000000 +1000
@@ -692,6 +692,7 @@
 	int this_count = cmd->bufflen;
 	request_queue_t *q = cmd->device->request_queue;
 	struct request *req = cmd->request;
+	int clear_errors = 1;
 	struct scsi_sense_hdr sshdr;
 	int sense_valid = 0;
 	int sense_deferred = 0;
@@ -721,6 +722,7 @@
 	if (blk_pc_request(req)) { /* SG_IO ioctl from block level */
 		req->errors = result;
 		if (result) {
+			clear_errors = 0;
 			if (sense_valid) {
 				/*
 				 * SG_IO wants current and deferred errors
@@ -745,11 +747,6 @@
 	cmd->request_buffer = NULL;
 	cmd->request_bufflen = 0;
 
-	if (blk_pc_request(req)) { /* SG_IO ioctl from block level */
-		scsi_end_request(cmd, 1, good_bytes, 0);
-		return;
-	}
-
 	/*
 	 * Next deal with any sectors which we were able to correctly
 	 * handle.
@@ -759,7 +756,8 @@
 					      req->nr_sectors, good_bytes));
 		SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg));
 
-		req->errors = 0;
+		if (clear_errors)
+			req->errors = 0;
 		/*
 		 * If multiple sectors are requested in one buffer, then
 		 * they will have been finished off by the first command.

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

* Re: 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok
  2005-01-31 13:09           ` Douglas Gilbert
@ 2005-01-31 13:53             ` Jens Axboe
  0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2005-01-31 13:53 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: Fabio Coatti, akpm, lkml, linux-scsi

On Mon, Jan 31 2005, Douglas Gilbert wrote:
> Jens Axboe wrote:
> >On Mon, Jan 31 2005, Douglas Gilbert wrote:
> >
> >>Jens Axboe wrote:
> >>
> >>>On Mon, Jan 31 2005, Fabio Coatti wrote:
> >>>
> >>>
> >>>>Alle 09:00, lunedì 31 gennaio 2005, Jens Axboe ha scritto:
> >>>>
> >>>>
> >>>>>>At this point k3b is stuck in D stat, needs reboot.
> 
> I was able to replicate this with a USB burner.
> My system didn't need a reboot. The "D" state was locked
> on "blk_execute_rq". The burner was still accessible via
> sg.

With a slave burner on the same interface as your hard drive, it would
soft hang the system.

> >>>>>The most likely suspect is the REQ_BLOCK_PC scsi changes. Can you try
> >>>>>2.6.11-rc2-mm1 with bk-scsi backed out? (attached)
> >>>>
> >>>>just tried, right guess :)
> >>>>backing out that patch the problem disappears.
> >>>>Let me know if you need to narrow further that issue.
> >>>
> >>>
> >>>Doug, it looks like your REQ_BLOCK_PC changes are buggy. Let me know if
> >>>you cannot find the full post and I'll forward it to you.
> >>
> >>Jens,
> >>Hmm. Found the thread on lkml. I got an almost identical
> >>lock up in k3b with a USB external cd/dvd drive recently.
> >>My laptop didn't need rebooting (probably since the root
> >>fs is one an ide disk).
> >>
> >>That is a quite large patch that you referenced. I'll
> >>try and replicate and report back.
> >
> >
> >My guess would be the scsi_lib changes, I would suggest you start there.
> 
> Indeed. I'm not sure what I was thinking in
> scsi_io_completion(). This small reversion
> fixes my k3b problem; tested with a USB external
> burner.

Well at least I had hoped you would have tested patches going into
mainline...

Can you make sure it gets to Linus asap? Otherwise I'm sure I'll be
flooded with mails on burning not working very shortly.

-- 
Jens Axboe


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

end of thread, other threads:[~2005-01-31 13:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-30 23:34 2.6.11-rc[1,2]-mmX scsi cdrom problem, 2.6.10-mm2 ok Fabio Coatti
2005-01-31  8:00 ` Jens Axboe
2005-01-31 10:08   ` Fabio Coatti
2005-01-31 11:05     ` Jens Axboe
2005-01-31 11:49       ` Douglas Gilbert
2005-01-31 11:49         ` Jens Axboe
2005-01-31 13:09           ` Douglas Gilbert
2005-01-31 13:53             ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox