Bug 128826 - errors in read with cdrom scsi emulation
errors in read with cdrom scsi emulation
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
1
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-29 22:48 EDT by Jay Kulpinski
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-29 16:33:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
script to show read beyond end of device (498 bytes, text/plain)
2004-09-05 22:38 EDT, Jay Kulpinski
no flags Details

  None (edit)
Description Jay Kulpinski 2004-07-29 22:48:19 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040619

Description of problem:
Using dd to verify burned ISO image fails using scsi emulation layer,
but passes using straight atapi (not using hdc=ide-scsi on grub boot
line).  This example is from disc 4 of FC2 release.  Disc is verified
good on another computer.

$ dd if=/dev/scd0 bs=2k count=99481 | md5sum
scsi0: ERROR on channel 0, id 0, lun 0, CDB: Read (10) 00 00 01 84 
64 00 00 37 00
current sd0b:00: sense key Medium error
Additional sense indicates L-EC uncorrectable error
I/O error: dev 0b:00, sector 397712
dd: reading '/dev/scd0', Input/output error
99428+0 records in
99428+0 records out

------- reboot without ide-scsi --------------
$ dd if=/dev/hdc bs=2k count=99481 | md5sum

(returns correct result)

------ from dmesg ---------------
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
ICH4: IDE controller at PCI slot 00:1f.1
PCI: Found IRQ 9 for device 00:1f.1
PCI: Sharing IRQ 9 with 00:1d.2
ICH4: chipset revision 1
ICH4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hda: ST380011A, ATA DISK drive
blk: queue c0402f40, I/O limit 4095Mb (mask 0xffffffff)
hdc: SAMSUNG CD-R/RW SW-252S, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 156250000 sectors (80000 MB) w/2048KiB Cache, CHS=9726/255/63,
UDMA(100)
Partition check:
 hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 hda9 >
ide: late registration of driver.
...
SCSI subsystem driver Revision: 1.00
hdc: attached ide-scsi driver.
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
  Vendor: SAMSUNG   Model: CD-R/RW SW-252S   Rev: R902
  Type:   CD-ROM                             ANSI SCSI revision: 02



-------- from lspci -v --------
00:1f.1 IDE interface: Intel Corp. 82801DB (ICH4) Ultra ATA 100
Storage Controller (rev 01) (prog-if 8a [Master SecP PriP])
        Subsystem: Dell Computer Corporation: Unknown device 0160
        Flags: bus master, medium devsel, latency 0, IRQ 9
        I/O ports at <ignored>
        I/O ports at <ignored>
        I/O ports at <ignored>
        I/O ports at <ignored>
        I/O ports at ffa0 [size=16]
        Memory at feb7fc00 (32-bit, non-prefetchable) [size=1K]



Version-Release number of selected component (if applicable):
kernel-2.4.22-1.2197.nptl

How reproducible:
Always

Steps to Reproduce:
1. burn CD with binary disc 4 image from FC2 release
2. $ dd if=/dev/cdrom bs=2k count=99481 | md5sum
3. note error messages
4. reboot system without hdc=ide-scsi boot option
5. $ dd if=/dev/hdc bs=2k count=99481 | md5sum
6. note no errors and correct MD5SUM reported

Actual Results:  read errors reported from dd

Expected Results:  no read errors from dd

Additional info:
Comment 1 Jay Kulpinski 2004-07-29 22:56:18 EDT
I can't seem to get Bugzilla to change my e-mail address.  Use
fedora@berkshirecycling.org to contact me.
Comment 2 Jay Kulpinski 2004-09-05 22:38:22 EDT
Created attachment 103497 [details]
script to show read beyond end of device 

This script will show that kernel will attempt to read more blocks than
requested by dd.  The attempt to read beyond the end of the device reports
an error, causing dd to fail.  This appears to happen only with images
that have an odd nubmer of 2k byte blocks.  Is ide-scsi layer trying to 
use 4k blocks or do a read-ahead beyond end of device?	This behavior 
does not occur using basic IDE device (/dev/hdd rather than /dev/scd1).
Comment 3 Jay Kulpinski 2004-09-05 22:48:05 EDT
The medium errors reported above *might* be due to a bad drive.  I
installed another drive and don't get them.  I'm still not sure,
as the errors do not appear using /dev/hdX rather than /dev/scdX.

There is definitely a repeatable problem with verifying CD images
that have an odd number of 2k byte blocks.  (e.g. discs 2 and 4 of
the Fedora Core 2 distribution, which caused a great deal of trouble
for me)

Kernel message showing read attempt beyond end of dd request
(dd if=/dev/scd1 bs=2k count=12345):

Sep  5 22:33:12 spike kernel:  I/O error: dev 0b:01, sector 49380
Sep  5 22:33:12 spike kernel: attempt to access beyond end of device
Sep  5 22:33:12 spike kernel: 0b:01: rw=0, want=24692, limit=24690

version info:
kernel-2.4.22-1.2199.nptl
cdrecord-2.01-0.a19.2
Comment 4 Jay Kulpinski 2004-09-05 23:56:23 EDT
This read beyond end of device also occurs using vanilla 2.4.27
kernel.

Comment 5 David Lawrence 2004-09-29 16:33:23 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.