2001-12-24 10:09:37

by Stanislav Meduna

[permalink] [raw]
Subject: IDE CDROM locks the system hard on media error

Hello,

I am catalogizing my set of CDs and so I have tortured my CD drive
with a bunch of less-than-optimal CDs. I had two hard lockups
most probably connected to problematic media.

The last message in log is

kernel: scsi0: ERROR on channel 0, id 0, lun 0,
CDB: Request Sense 00 00 00 40 00
kernel: Current sd0b:00: sense key Medium Error
kernel: Additional sense indicates No seek complete
kernel: I/O error: dev 0b:00, sector 504
kernel: ISOFS: unable to read i-node block

Shortly (but not immediately, the kernel tried a bit more to get
some data from the drive) after that the system froze - not even
SysRq worked.

I am using vanilla 2.4.17, hdc=ide-scsi, my drive is Mitsumi CR-4804TE,
motherboard is Abit BP6 SMP, Intel PIIX4 IDE controller,

More details available upon request. Please, Cc: replies to me.

Regards
--
Stano


2001-12-24 16:38:07

by Alan

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

> I am using vanilla 2.4.17, hdc=ide-scsi, my drive is Mitsumi CR-4804TE,
> motherboard is Abit BP6 SMP, Intel PIIX4 IDE controller,

I've seen a few similar reports of this back to about 2.4.10 or so, maybe
earlier even. Right now I don't think anyone knows what is up

2001-12-24 18:05:22

by Douglas Gilbert

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

> I am catalogizing my set of CDs and so I have tortured my CD drive
> with a bunch of less-than-optimal CDs. I had two hard lockups
> most probably connected to problematic media.
>
> The last message in log is
>
> kernel: scsi0: ERROR on channel 0, id 0, lun 0,
> CDB: Request Sense 00 00 00 40 00
> kernel: Current sd0b:00: sense key Medium Error
> kernel: Additional sense indicates No seek complete
> kernel: I/O error: dev 0b:00, sector 504
> kernel: ISOFS: unable to read i-node block
>
> Shortly (but not immediately, the kernel tried a bit more to get
> some data from the drive) after that the system froze - not even
> SysRq worked.
>
> I am using vanilla 2.4.17, hdc=ide-scsi, my drive is Mitsumi CR-4804TE,
> motherboard is Abit BP6 SMP, Intel PIIX4 IDE controller.

Does turning off or restricting the DMA mode using either
one of these help?
hdparm -d0 -c1 /dev/hdc
hdparm -d 1 -X 34 /dev/hdc

Doug Gilbert

2001-12-24 21:00:09

by Andre Hedrick

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

On Mon, 24 Dec 2001, Alan Cox wrote:

> > I am using vanilla 2.4.17, hdc=ide-scsi, my drive is Mitsumi CR-4804TE,
> > motherboard is Abit BP6 SMP, Intel PIIX4 IDE controller,
>
> I've seen a few similar reports of this back to about 2.4.10 or so, maybe
> earlier even. Right now I don't think anyone knows what is up

If it is DMAing and there is a 1us transaction delay it is toast.
Intel PIIX4 AB/EB is a NO-NO for doing ATAPI on.

Regards,

Andre Hedrick
CEO/President, LAD Storage Consulting Group
Linux ATA Development
Linux Disk Certification Project

2001-12-24 21:28:45

by Stanislav Meduna

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

Hello,

> > I am using vanilla 2.4.17, hdc=ide-scsi, my drive is Mitsumi CR-4804TE,
> > motherboard is Abit BP6 SMP, Intel PIIX4 IDE controller.
>
> Does turning off or restricting the DMA mode using either
> one of these help?
> hdparm -d0 -c1 /dev/hdc

This seems to help - I tried the most problematic CD several times,
got the error messages, but it did not froze.

Thanks - I didn't even know that it defaults to DMA on CD-ROMs...

> hdparm -d 1 -X 34 /dev/hdc

This drive cannot do more than mdma1 (at least according to hdparm -i).

Regards
--
Stano

2001-12-24 21:38:06

by Stanislav Meduna

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

Hello,

> If it is DMAing and there is a 1us transaction delay it is toast.

Oh... But why does the whole kernel lock up?

> Intel PIIX4 AB/EB is a NO-NO for doing ATAPI on.

Only when using DMA or generally?

Maybe there should be some "quirk" disallowing this or at least
warn when the user happens to select this?

Regards
--
Stano

2001-12-24 22:39:06

by Brian Landsberger

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

Do you have multiple CD/DVD-R/ROM/R's? This happened today to me when I
was installing Myth II and Quake III at the same time.

First CDROM according to "cat /proc/ide/hdc/model" is pretty generic:
ATAPI 48X CDROM

Second CD-RW according to "cat /proc/ide/hdd/model" is a: LITE-ON
LTR-16102B

Some stuff ala syslog:

Dec 24 13:26:33 fux0r kernel: cdrom: open failed.
Dec 24 13:26:45 fux0r kernel: cdrom: open failed.
Dec 24 13:29:22 fux0r su(pam_unix)[27872]: session closed for user root
Dec 24 13:31:25 fux0r kernel: scsi : aborting command due to timeout :
pid 34319, scsi1, channel 0, id 0, lun 0 Read (10) 00 00 00 00 42 00 00
01 00
Dec 24 13:31:25 fux0r kernel: hdc: timeout waiting for DMA
Dec 24 13:31:25 fux0r kernel: ide_dmaproc: chipset supported
ide_dma_timeout func only: 14
Dec 24 13:31:25 fux0r kernel: scsi : aborting command due to timeout :
pid 34321, scsi1, channel 0, id 1, lun 0 Read (10) 00 00 00 c2 e7 00 00
01 00
Dec 24 13:31:26 fux0r kernel: hdc: status timeout: status=0xd0 { Busy }
Dec 24 13:31:26 fux0r kernel: hdc: drive not ready for command
Dec 24 13:31:30 fux0r kernel: hdc: ATAPI reset complete
Dec 24 13:31:31 fux0r kernel: hdc: irq timeout: status=0xc0 { Busy }
Dec 24 13:31:31 fux0r kernel: hdc: ATAPI reset complete

the next thing we see is syslogd restarting (after rebooting)

Thanks,
Brian




On Mon, 2001-12-24 at 13:28, Stanislav Meduna wrote:
> Hello,
>
> > > I am using vanilla 2.4.17, hdc=ide-scsi, my drive is Mitsumi CR-4804TE,
> > > motherboard is Abit BP6 SMP, Intel PIIX4 IDE controller.
> >
> > Does turning off or restricting the DMA mode using either
> > one of these help?
> > hdparm -d0 -c1 /dev/hdc
>
> This seems to help - I tried the most problematic CD several times,
> got the error messages, but it did not froze.
>
> Thanks - I didn't even know that it defaults to DMA on CD-ROMs...
>
> > hdparm -d 1 -X 34 /dev/hdc
>
> This drive cannot do more than mdma1 (at least according to hdparm -i).
>
> Regards
> --
> Stano
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


2001-12-24 22:57:06

by Andre Hedrick

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error


Only in UltraDMA for all devices.
Switch to MWDMA2 and it is all cool.

On Mon, 24 Dec 2001, Stanislav Meduna wrote:

> Hello,
>
> > If it is DMAing and there is a 1us transaction delay it is toast.
>
> Oh... But why does the whole kernel lock up?
>
> > Intel PIIX4 AB/EB is a NO-NO for doing ATAPI on.
>
> Only when using DMA or generally?
>
> Maybe there should be some "quirk" disallowing this or at least
> warn when the user happens to select this?
>
> Regards
> --
> Stano
>

Andre Hedrick
CEO/President, LAD Storage Consulting Group
Linux ATA Development
Linux Disk Certification Project

2001-12-24 23:18:51

by Alan

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

> If it is DMAing and there is a 1us transaction delay it is toast.
> Intel PIIX4 AB/EB is a NO-NO for doing ATAPI on.

So we should set ATAPI devices on the PIIX4 to non DMA modes ?

2001-12-25 00:45:04

by Ricardo Galli

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

On 24/12/01 23:28, Alan Cox shaped the electrons to say:

>> If it is DMAing and there is a 1us transaction delay it is toast.
>> Intel PIIX4 AB/EB is a NO-NO for doing ATAPI on.
>
>So we should set ATAPI devices on the PIIX4 to non DMA modes ?

I am having the same problem with a USB HTP cd-writer...

No messages at all.

--
ricardo
Cuando usaba Mac, se re?an porque no ten?a l?nea de comandos.
Ahora que uso Linux, se r?en porque tengo l?nea de comandos.

2001-12-25 01:01:11

by Svein Ove Aas

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

>
> So we should set ATAPI devices on the PIIX4 to non DMA modes ?

Setting it to mdma2 fixes the problem on my system, and there is no slowdown
whatsoever. (Due to its already slow speed?)

It would have to be verified by someone with a faster device than mine, but
right now there doesn't seem to be any downside.

2001-12-25 01:23:53

by Brian Landsberger

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

My mobo is an Abit KT7E - which has some VIA (KT133 I think) chipset
and it still happens here under certain circumstances - I doubt this is
the issue.

On Mon, 2001-12-24 at 15:28, Alan Cox wrote:
> > If it is DMAing and there is a 1us transaction delay it is toast.
> > Intel PIIX4 AB/EB is a NO-NO for doing ATAPI on.
>
> So we should set ATAPI devices on the PIIX4 to non DMA modes ?
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


2001-12-25 07:17:42

by Stanislav Meduna

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

> Do you have multiple CD/DVD-R/ROM/R's?

No. I have two disks on primary IDE and one CD-R that is alone on
the secondary.

> This happened today to me when I was installing Myth II and Quake III
> at the same time.

:-)))

Regards
--
Stano

2002-01-02 20:16:04

by Zdenek Kabelac

[permalink] [raw]
Subject: Re: IDE CDROM locks the system hard on media error

Stanislav Meduna wrote:
>
> Hello,
>
> I am catalogizing my set of CDs and so I have tortured my CD drive
> with a bunch of less-than-optimal CDs. I had two hard lockups
> most probably connected to problematic media.
>
> The last message in log is
>
> kernel: scsi0: ERROR on channel 0, id 0, lun 0,
> CDB: Request Sense 00 00 00 40 00
> kernel: Current sd0b:00: sense key Medium Error
> kernel: Additional sense indicates No seek complete
> kernel: I/O error: dev 0b:00, sector 504
> kernel: ISOFS: unable to read i-node block
>
> Shortly (but not immediately, the kernel tried a bit more to get
> some data from the drive) after that the system froze - not even
> SysRq worked.
>


Actually I've wanted to report the same problem - I even believe
I've already reported this long time ago in the dark ages when
everyone has been saying some stupid things about BP6...
Usualy reading CD-ROM && hdparm -t /dev/hda was quite easy way
to deadlock the whole system.

Now I would say that 2.4.17rc2 becames more stable but still I've
been faced with similar problem - I have tried to read damaged CD with
movie
and this is part of log:

begin of errors - please notice the TIME values!

Dec 29 22:02:04 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:02:13 decibel kernel: hdc: cdrom_decode_status: status=0x51 {
DriveReady SeekComplete Error }
Dec 29 22:02:13 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:02:20 decibel kernel: hdc: cdrom_decode_status: status=0x51 {
DriveReady SeekComplete Error }
Dec 29 22:02:20 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:02:27 decibel kernel: hdc: cdrom_decode_status: status=0x51 {
DriveReady SeekComplete Error }
Dec 29 22:02:27 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:02:33 decibel kernel: hdc: cdrom_decode_status: status=0x51 {
DriveReady SeekComplete Error }
Dec 29 22:02:33 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:02:33 decibel kernel: hdc: DMA disabled
Dec 29 22:02:33 decibel kernel: hdc: ATAPI reset complete
...
Dec 29 22:03:19 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:03:19 decibel kernel: hdc: ATAPI reset complete
Dec 29 22:03:19 decibel kernel: end_request: I/O error, dev 16:00 (hdc),
sector 321092
...
Dec 29 22:05:47 decibel kernel: hdc: ATAPI reset complete
Dec 29 22:05:47 decibel kernel: end_request: I/O error, dev 16:00 (hdc),
sector 321976Dec 29 22:08:37 decibel kernel: end_request: I/O error, dev
16:00 (hdc), sector 322416
Dec 29 22:08:43 decibel kernel: hdc: cdrom_decode_status: status=0x51 {
DriveReady SeekComplete Error }
...
Dec 29 22:08:59 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:09:25 decibel kernel: SysRq : Emergency Sync
Dec 29 22:09:25 decibel kernel: Syncing device 21:41 ... OK
Dec 29 22:09:25 decibel kernel: Syncing device 21:46 ... OK
Dec 29 22:09:25 decibel kernel: Syncing device 21:47 ... OK
Dec 29 22:09:25 decibel kernel: Syncing device 16:00 ... OK
Dec 29 22:09:25 decibel kernel: Syncing device 03:05 ... OK
Dec 29 22:09:25 decibel kernel: Done.

deadlock here after 'U' - reset button required


then again:

Dec 29 22:23:39 decibel kernel: hdc: cdrom_decode_status: error=0x30
Dec 29 22:23:39 decibel kernel: hdc: ATAPI reset complete
Dec 29 22:23:39 decibel kernel: end_request: I/O error, dev 16:00 (hdc),
sector 321980
...
Dec 29 22:28:10 decibel kernel: hdc: ATAPI reset complete
Dec 29 22:28:10 decibel kernel: end_request: I/O error, dev 16:00 (hdc),
sector 322420
...
Dec 29 22:29:30 decibel kernel: hdc: ATAPI reset complete
Dec 29 22:29:30 decibel kernel: end_request: I/O error, dev 16:00 (hdc),
sector 321980



And looping for loooong time without any progress here - around some
numbers.

I've tried then to use 'dd' with conv=noerror but I had
to skip error part manualy via skip simply because linux was unable
to make any progress here even after 10 minutes.

I guess my CD-ROM was in DMA mode initialy but after it switchies DMA of
the computer becomes almost unusable.


Another problem I would like to see solved one day - why just my machine
is completely unable while anacron does it's jobs ???
Why there couldn't be option in /proc to set limit for maximum amount of
RAM
for caching filesystem ??? (like 30MB from my 128MB ram ?)

(I think I know better what I need that the Linux VM)

bye


kabi