Bug 546437

Summary: wodim fails to write last 12 4k blocks on CD-R and CD-RW
Product: [Fedora] Fedora Reporter: Pavel Roskin <plroskin>
Component: cdrkitAssignee: Roman Rakus <rrakus>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: npajkovs, rrakus, stephent98, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 15:33:34 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 Pavel Roskin 2009-12-10 21:29:33 UTC
Description of problem:

wodim creates CD-R and CD-RW discs that are read back with errors.  It can be reproduces reliably on two systems running Fedora 11 with different brands of drives (TSST and PDBS).  Both systems have written CD-R ands CD-RW in the past with no trouble.

Version-Release number of selected component (if applicable):

wodim-1.1.9-6.fc11.x86_64

How reproducible:

Every time

Steps to Reproduce:
1. Get an iso that fits a CD (e.g. http://pogostick.net/~pnh/ntpasswd/cd080802.zip; unzip it)
2. Write it with wodim at the lowest speed (I tried no "-speed" as well):
wodim -speed=1 cd080802.iso
3. Reload the disk, compare it to the image:
cmp cd080802.iso /dev/sr0
  
Actual results:
cmp: /dev/sr0: Input/output error

Expected results:
comparison suceeds

Additional info:

wodim output:

# wodim -speed=1 cd080802.iso 
wodim: No write mode specified.
wodim: Asuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
Device was not specified. Trying to find an appropriate drive...
Looking for a CD-R drive to store 3.53 MiB...
Detected CD-R drive: /dev/cdrw
Using /dev/cdrom of unknown capabilities
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'TSSTcorp'
Identification : 'CDDVDW SH-S223F '
Revision       : 'SB02'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
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 1412 KB/s
Starting to write CD/DVD at speed   8.0 in real TAO mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Track 01: Total bytes read/written: 3702784/3702784 (1808 sectors).

Kernel messages:
sr 2:0:1:0: [sr0] Unhandled sense code
sr 2:0:1:0: [sr0] Result: hostbyte=0x00 driverbyte=0x08
sr 2:0:1:0: [sr0] Sense Key : 0x3 [current] 
sr 2:0:1:0: [sr0] ASC=0x11 ASCQ=0x5
sr 2:0:1:0: [sr0] CDB: cdb[0]=0x28: 28 00 00 00 06 f8 00 00 1a 00
end_request: I/O error, dev sr0, sector 7136
__ratelimit: 3 callbacks suppressed
Buffer I/O error on device sr0, logical block 892
Buffer I/O error on device sr0, logical block 893
Buffer I/O error on device sr0, logical block 894
Buffer I/O error on device sr0, logical block 895
Buffer I/O error on device sr0, logical block 896
Buffer I/O error on device sr0, logical block 897
Buffer I/O error on device sr0, logical block 898
Buffer I/O error on device sr0, logical block 899
Buffer I/O error on device sr0, logical block 900
Buffer I/O error on device sr0, logical block 901

The same happens with bigger images, such as FreeBSD 8.0.  The same happens when writing to CD-RW.  I don't have DVD-R with me.  Writing to DVD+R with growisofs is fine.

The original image size is 3702784 (904*4096).  When reading back the image, the size is 3653632 (892*4096).  Thus, the last 12 blocks (4k each) are not readable.

Writing to a DVD-R was successful, the cmp command reported no difference, but the messages from wodim indicated some problem:

# wodim -speed=1 cd080802.iso 
wodim: No write mode specified.
wodim: Asuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
Device was not specified. Trying to find an appropriate drive...
Looking for a CD-R drive to store 3.53 MiB...
Detected CD-R drive: /dev/cdrw
Using /dev/cdrom of unknown capabilities
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'TSSTcorp'
Identification : 'CDDVDW SH-S223F '
Revision       : 'SB02'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: PACKET SAO
Speed set to 5540 KB/s
Starting to write CD/DVD at speed   4.0 in real unknown mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Track 01: Total bytes read/written: 3702784/3702784 (1808 sectors).
Errno: 5 (Input/output error), flush cache scsi sendcmd: no error
CDB:  35 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 72 0B 00 00 00 00 00 0E 09 0C 00 00 00 03 00 00
Sense Key: 0x0 No Additional Sense, Segment 11
Sense Code: 0x00 Qual 0x03 (setmark detected) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 136.231s timeout 120s
Trouble flushing the cache
wodim: Cannot fixate disk.

The same bug is described in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/cdrkit/+bug/435237

Comment 1 Pavel Roskin 2009-12-10 22:05:05 UTC
The current cdrkit (r841 from svn://svn.debian.org/debburn/cdrkit/trunk) exhibits the same problem.  But the current cdrecord (Cdrecord-ProDVD-ProBD-Clone 2.01.01a69) is working fine.

Comment 2 Pavel Roskin 2009-12-10 23:12:17 UTC
It's not that simple.  cdrecord worked with a short file (cd080802.iso, 3702784 bytes) and CD-RW.  However, when I tried it on a longer FreeBSD image (8.0-RELEASE-amd64-disc1.iso, 690227200 bytes) on a different Fedora 11 system, I still got errors:

Buffer I/O error on device sr0, logical block 337016
Buffer I/O error on device sr0, logical block 337017
Buffer I/O error on device sr0, logical block 337018
Buffer I/O error on device sr0, logical block 337019
Buffer I/O error on device sr0, logical block 337020
Buffer I/O error on device sr0, logical block 337021
Buffer I/O error on device sr0, logical block 337022
Buffer I/O error on device sr0, logical block 337023
Buffer I/O error on device sr0, logical block 337024
Buffer I/O error on device sr0, logical block 337025

690227200 = 2048*337025, so if the blocks are 2k long (I don't understand why they were 4k for another disk), it means that the last 9 blocks were defective.

Sure, it's a long image, but it looks like that only the very end is always damaged.

Comment 3 Bug Zapper 2010-04-28 11:33:44 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Bug Zapper 2010-06-28 15:33:34 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Steve Tyler 2010-10-26 20:40:08 UTC
(In reply to comment #0)
> Description of problem:
...
> wodim: Asuming -tao mode.

"-dao" may help with this.
("dao" is "Disk At Once", also called sao, which is "Session At Once")

Bug 558676, Comment 4 - cdrkit produces dodgy CDs with I/O errors towards the outer sectors, even with small images