Bug 145300

Summary: cdrecord does not work with atapi drive, but used to
Product: [Fedora] Fedora Reporter: Joe Acosta <josepha48>
Component: kernelAssignee: Alan Cox <alan>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: davej, harald
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-16 04:44:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Acosta 2005-01-17 05:28:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
cdrecord used to blank my cdroms, but now it does not. I am not sure
if it is kernel 2.6.10 that broke it or if it broke at 2.6.9, but it
no longer works.



Version-Release number of selected component (if applicable):
cdrecord-2.01.1-0.FC2.1

How reproducible:
Always

Steps to Reproduce:
1. using an atapi dvd-cdrw
2. try to blank a cdrom
3. it fails
    

Actual Results:  cdrecord: Success. blank unit: scsi sendcmd: no error
CDB:  A1 01 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 30 06 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x30 Qual 0x06 (cannot format medium - incompatible
medium) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 9600s
cdrecord: Cannot blank disk, aborting.
cdrecord: Some drives do not support all blank types.


Expected Results:  it should blank, I've never had problems blanking
these disks before.  I cannot write to the rewritable cdroms either.  

Additional info:

I've tried 
cdrecord -v dev=ATA:1,0,0 speed=0 blank=fast
cdrecord -v dev=/dev/hdc blank=fast
cdrecord -v dev=ATA:1,0,0 speed=0 blank=all

and various combinations all return the same:

Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004
J�rg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in
this version.
TOC Type: 1 = CD-ROM
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version
(schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c  1.83
04/05/20 Copyright 1997 J. Schilling').
SCSI buffer size: 64512
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : '        '
Identifikation : 'COMBO-52X16C    '
Revision       : '2.00'
Device seems to be: Generic mmc2 DVD-ROM.
Current: 0x0008
Profile: 0x000A
Profile: 0x0009
Profile: 0x0008 (current)
Profile: 0x0002
Profile: 0x0010
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P
RAW/R96R
Drive buf size : 1951488 = 1905 KB
Current Secsize: 2048
Speed set to 5634 KB/s
Starting to write CD/DVD at speed  32.0 in real BLANK mode for single
session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Performing OPC...
Blanking entire disk
cdrecord: Success. blank unit: scsi sendcmd: no error
CDB:  A1 00 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 30 06 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x30 Qual 0x06 (cannot format medium - incompatible
medium) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 9600s
cdrecord: Cannot blank disk, aborting.

Comment 1 Harald Hoyer 2005-01-17 10:14:29 UTC
please retry with the latest FC2 update kernel (if you are using FC2)

Comment 2 Joe Acosta 2005-01-17 18:16:11 UTC
# uname -r 

2.6.10-1.9_FC2custom

#cdrecord dev=ATA:1,0,0 blank=all

Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004
Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in
this version.
scsidev: 'ATA:1,0,0'
devname: 'ATA'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version
(schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c       
1.83 04/05/20 Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : '        '
Identifikation : 'COMBO-52X16C    '
Revision       : '2.00'
Device seems to be: Generic mmc2 DVD-ROM.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P
RAW/R96R
Speed set to 5634 KB/s
Starting to write CD/DVD at speed  32.0 in real BLANK mode for single
session.
Last chance to quit, starting real write    0 seconds. Operation starts.
cdrecord: Success. blank unit: scsi sendcmd: no error
CDB:  A1 00 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 30 06 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x30 Qual 0x06 (cannot format medium - incompatible
medium) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.003s timeout 9600s
cdrecord: Cannot blank disk, aborting.

#dmesg | tail 

ide-floppy driver 0.99.newide
hdd: No disk in drive
hdd: 98304kB, 96/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm
hdd: No disk in drive
scsi: unknown opcode 0x01

** here's a clip of part of dmesg that may be relevant to the hardware
VP_IDE: IDE controller at PCI slot 0000:00:07.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci0000:00:07.1
    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: WDC WD300BB-32AUA1, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: COMBO-52X16C, ATAPI CD/DVD-ROM drive
hdd: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 128KiB
hda: 58633344 sectors (30020 MB) w/2048KiB Cache, CHS=58168/16/63,
UDMA(100)
hda: cache flushes not supported
 hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 >
hdc: ATAPI 52X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20




Comment 3 Joe Acosta 2005-01-17 22:09:53 UTC
I have done some checking on this.
                                                                     
          
* I think in 2.6.8 I was able to burn and blank cdroms, but blankning
had problems, can't test because kernel 2.6.8 source is not in archive?

* using 2.6.9-1.9_FC2custom
   + I can burn a cd both a cd-rw and a cd-r and I check the media to
make sure burned disk is readable
   + This includes my cd-rw 650mb disks and my 700mb cd-r disks.  I
just burned a backup of about 185Megs and another of 579 on a couple
of 650Meg cd-rw disks.
                                                                     
          
   - cannot blank cdroms
                                                                     
          
   = my cdrom is supported
                                                                     
          
* using kernel 2.6.10-1.9_FC2custom
    -  wont burn any cdroms or blank cdrom


Comment 4 Harald Hoyer 2005-01-18 12:43:53 UTC
reassigning to kernel

Comment 5 Joe Acosta 2005-01-19 06:41:55 UTC
Tried buring another cd, but it failed on fixating.  Its acting like
my old scsi cdrom used to, and failing at random places.  Kinda like
an ungrounded or poorley terminated scsi device.  Only its not scsi,
its ide.

Track 01:  579 of  579 MB written (fifo 100%) [buf 100%]   4.2x.
Track 01: Total bytes read/written: 607873024/607873024 (296813 sectors).
Writing  time:  995.421s
Average write speed   4.0x.
Min drive buffer fill was 100%
Fixating...
cdrecord: Success. close track/session: scsi sendcmd: no error
CDB:  5B 00 02 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 03 00 00 00 00 0A 00 00 00 00 72 02 00 00
Sense Key: 0x3 Medium Error, Segment 0
Sense Code: 0x72 Qual 0x02 (session fixation error writing lead-out)
Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 62.228s timeout 480s
cmd finished after 62.228s timeout 480s
cdrecord: Cannot fixate disk.
Fixating time:   62.230s
cdrecord: fifo had 9575 puts and 9575 gets.
cdrecord: fifo was 0 times empty and 9491 times full, min fill was 85%.

Comment 6 Joe Acosta 2005-01-25 06:50:23 UTC
Upgraded to the latest 2.6.9 kernel  2.6.9-1.11_FC2custom.

I blanked a cdrom once.  First time it worked.  I tried again and the
second time it failed. Same error.  It seems to work 50% of the time.

Comment 7 Dave Jones 2005-01-25 07:13:30 UTC
any better with the 2.6.10 update kernel ?
(2.6.10-1.11 just got pushed into -testing, you can also grab it from
people.redhat.com/davej/kernels/Fedora/FC2/ if your local mirror
doesnt have it yet.


Comment 8 Joe Acosta 2005-01-26 04:17:55 UTC
Okay am trying the new kernel. uname -r  => 2.6.10-1.11_FC2custom

test 1 blank a cdrom... cdrecord -v dev=ATA:1,0,0 speed=0 blank=all
it passed

test 2 burn a cdrom... below is output... 

BURN-Free is OFF.
Performing OPC...
Starting new track at sector: 0
Track 01:  579 of  579 MB written (fifo 100%) [buf 100%]   4.2x.
Track 01: Total bytes read/written: 607873024/607873024 (296813 sectors).
cdrecord: Success. flush cache: scsi sendcmd: no error
CDB:  35 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 71 00 03 00 00 00 00 0A 00 00 00 00 73 04 00 00
Sense Key: 0x3 Medium Error, deferred error, Segment 0
Sense Code: 0x73 Qual 0x04 (program memory area update failure) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 14.100s timeout 120s
Trouble flushing the cache
cdrecord: Cannot close track.
Writing  time: 1002.127s
Average write speed   3.9x.
Min drive buffer fill was 100%
Fixating...
cdrecord: Success. close track/session: scsi sendcmd: no error
CDB:  5B 00 02 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 03 00 00 00 00 0A 00 00 00 00 72 02 00 00
Sense Key: 0x3 Medium Error, Segment 0
Sense Code: 0x72 Qual 0x02 (session fixation error writing lead-out)
Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 51.684s timeout 480s
cmd finished after 51.684s timeout 480s
cdrecord: Cannot fixate disk.
Fixating time:   51.686s
cdrecord: fifo had 9575 puts and 9575 gets.
cdrecord: fifo was 0 times empty and 9492 times full, min fill was 87%.

test 3.. attempting to blank / burn a cdrom after this fail also....

Comment 9 Joe Acosta 2005-01-26 04:33:26 UTC
Oh, not sure if this will help, but my scsi cd burner which is an HP
9200 series, works fine.  So I'm guessing this is something in the
ide-scsi layer, when not using ide-scsi IE: 

# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=m
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set


Comment 10 Joe Acosta 2005-02-03 06:49:13 UTC
a clue!

I rebooted my pc and was able to blank a cd.  

I then tried to burn a cdrom.  My ram went from 43% to 99% used.  I
have 512Megs of RAM.  In the error message, it has something about
"program memory area update failure" and not being able to flush
cache.  I'm thinking that maybe the kernel or cdrecord has a memory
leak or something like that.  I would not expect burning a single cd
to use over 256Megs, unless its mapping all rthe data to ram.

Track 01:  579 of  579 MB written (fifo 100%) [buf 100%]   4.2x.
Track 01: Total bytes read/written: 607873024/607873024 (296813 sectors).
cdrecord: Success. flush cache: scsi sendcmd: no error
CDB:  35 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 71 00 03 00 00 00 00 0A 00 00 00 00 73 04 00 00
Sense Key: 0x3 Medium Error, deferred error, Segment 0
Sense Code: 0x73 Qual 0x04 (program memory area update failure) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 13.373s timeout 120s
Trouble flushing the cache
cdrecord: Cannot close track.


Comment 11 Dave Jones 2005-04-16 04:44:21 UTC
Fedora Core 2 has now reached end of life, and no further updates will be
provided by Red Hat.  The Fedora legacy project will be producing further kernel
updates for security problems only.

If this bug has not been fixed in the latest Fedora Core 2 update kernel, please
try to reproduce it under Fedora Core 3, and reopen if necessary, changing the
product version accordingly.

Thank you.


Comment 12 Joe Acosta 2005-04-16 16:32:55 UTC
I knew this was coming.  I upgraded to FC3 this past weekend: 2.6.10-1.766_FC3.

I can't get kernel 2.6.11 to compile, so I'm going to try the default 2.6.11 kernel.

Track 01:  249 of  579 MB written (fifo 100%) [buf 100%]   4.0x.cdrecord:
Success. write_g1: scsi sendcmd: no error
CDB:  2A 00 00 01 F3 E0 00 00 1F 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 71 00 03 00 00 00 00 0A 00 00 00 00 0C 00 00 00
Sense Key: 0x3 Medium Error, deferred error, Segment 0
Sense Code: 0x0C Qual 0x00 (write error) Fru 0x0
Sense flags: Blk 0 (not valid)
resid: 63488
cmd finished after 0.095s timeout 40s

write track data: error after 262078464 bytes
cdrecord: A write error occured.
cdrecord: Please properly read the error message above.
Writing  time:  432.835s
Average write speed   9.1x.
Min drive buffer fill was 100%
cdrecord: fifo had 4192 puts and 4129 gets.
cdrecord: fifo was 0 times empty and 4109 times full, min fill was 87%.