#769826 wodim: burning audio disc with duplicate audio tracks fails, creates unusable disc

Package:
wodim
Source:
cdrkit
Description:
command line CD/DVD writing tool
Submitter:
Tim Walberg
Date:
2014-11-16 20:27:08 UTC
Severity:
normal
#769826#5
Date:
2014-11-16 20:09:14 UTC
From:
To:
Attempting to create an audio disc that uses the same input file for more than
one track fails and creates a bad disc. However, copying that input file and
burning essentially the same disc, works as expected.

It appears that wodim attempts to be smart by not re-reading the file, but
there is something broken in that logic.

Attached script file uses -dummy to avoid wasting more discs, but -dummy is not
at fault here - I wasted three discs before I figured out what was actually
happening...

Haven't attempted this yet on lenny/stable, as this system is the only one I
have right now with a burner on it, and is my last hold-out for the upgrade...

Reproduction:

# file *.wav
1.wav:        RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit,
stereo 44100 Hz
CopyOf-1.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit,
stereo 44100 Hz

# md5sum *.wav
c21cb5fc6d5c9b36b3e22d24df0c0e4f  1.wav
c21cb5fc6d5c9b36b3e22d24df0c0e4f  CopyOf-1.wav

### So there's two files to play with. Let's try to burn a disc with "1.wav"
specified twice:

# wodim -v -v -eject -dummy dev=/dev/scd0 driveropts=burnfree -pad -audio 1.wav
1.wav
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 0 = CD-DA
scsidev: '/dev/scd0'
devname: '/dev/scd0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
Using libusal version 'Cdrkit-1.1.11'.
Driveropts: 'burnfree'
SCSI buffer size: 64512
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'PIONEER '
Identification : 'DVD-RW  DVR-219L'
Revision       : '1.02'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009 (CD-R)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0018 (Reserved/Unknown)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Profile: 0xFFFF ()
Supported CD-RW media types: 0F
Drive current speed: 40
Drive default speed: 40
Drive max speed    : 40
Selected speed     : 40
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 : 1371392 = 1339 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size      : 12582912 = 12288 KB
Track 01: audio   11 MB (01:05.76) no preemp pad
Track 02: audio   11 MB (01:05.76) no preemp pad
track: 1 start: 0 pregap: 150
track: 2 start: 5083 pregap: 150
Total size:       22 MB (02:13.54) = 10016 sectors
Lout start:       22 MB (02:15/41) = 10016 sectors
 01 00 00 01 00 00 00 00
 01 01 00 00 00 00 00 00
 01 01 01 00 00 00 02 00
 01 02 00 00 00 01 07 3A
 01 02 01 00 00 01 09 3A
 01 AA 01 01 00 02 0F 29
Track 1 start 0
Track 2 start 5083
Track 3 start 10016
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 4
  Is not unrestricted
  Is not erasable
  Disk sub type: Medium Type A, high Beta category (A+) (3)
  ATIP start of lead in:  -11849 (97:24/01)
  ATIP start of lead out: 359847 (79:59/72)
Disk type:    Long strategy type (Cyanine, AZO or similar)
Manuf. index: 25
Manufacturer: Taiyo Yuden Company Limited
Blocks total: 359847 Blocks current: 359847 Blocks remaining: 349831
Speed set to 7056 KB/s
Starting to write CD/DVD at speed  40.0 in dummy TAO mode for single session.
Last chance to quit, starting dummy write in    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Starting new track at sector: 0
Track 01:   11 of   11 MB written (fifo 100%) [buf 100%]  19.0x.
WARNING: padding up to secsize.
Track 01: Total bytes read/written: 11601164/11602416 (4933 sectors).
Starting new track at sector: 0
Track 02:    0 of   11 MB written.                  <<<< Huh?
Track 02: writing 689 KB of pad data.          <<<<
Track 02: Total bytes read/written: 0/705600 (300 sectors).
Writing  time:   34.239s
Average write speed   3.9x.
Min drive buffer fill was 100%
Fixating...
WARNING: Some drives don't like fixation in dummy mode.
Fixating time:    0.007s
BURN-Free was never needed.
wodim: fifo had 184 puts and 184 gets.
wodim: fifo was 0 times empty and 0 times full, min fill was 100%.

### If I had actually burned the disc (no -dummy), then attempt to read it back
with cdparanoia, the second track will give lots of SCSI errors and fail to
read

### Now, if we burn a disc with 1.wav and CopyOf-1.wav...

# wodim -v -v -eject -dummy dev=/dev/scd0 driveropts=burnfree -pad -audio 1.wav
CopyOf-1.wav
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 0 = CD-DA
scsidev: '/dev/scd0'
devname: '/dev/scd0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
Using libusal version 'Cdrkit-1.1.11'.
Driveropts: 'burnfree'
SCSI buffer size: 64512
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'PIONEER '
Identification : 'DVD-RW  DVR-219L'
Revision       : '1.02'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009 (CD-R)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0018 (Reserved/Unknown)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Profile: 0xFFFF ()
Supported CD-RW media types: 0F
Drive current speed: 40
Drive default speed: 40
Drive max speed    : 40
Selected speed     : 40
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 : 1371392 = 1339 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size      : 12582912 = 12288 KB
Track 01: audio   11 MB (01:05.76) no preemp pad
Track 02: audio   11 MB (01:05.76) no preemp pad
track: 1 start: 0 pregap: 150
track: 2 start: 5083 pregap: 150
Total size:       22 MB (02:13.54) = 10016 sectors
Lout start:       22 MB (02:15/41) = 10016 sectors
 01 00 00 01 00 00 00 00
 01 01 00 00 00 00 00 00
 01 01 01 00 00 00 02 00
 01 02 00 00 00 01 07 3A
 01 02 01 00 00 01 09 3A
 01 AA 01 01 00 02 0F 29
Track 1 start 0
Track 2 start 5083
Track 3 start 10016
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 4
  Is not unrestricted
  Is not erasable
  Disk sub type: Medium Type A, high Beta category (A+) (3)
  ATIP start of lead in:  -11849 (97:24/01)
  ATIP start of lead out: 359847 (79:59/72)
Disk type:    Long strategy type (Cyanine, AZO or similar)
Manuf. index: 25
Manufacturer: Taiyo Yuden Company Limited
Blocks total: 359847 Blocks current: 359847 Blocks remaining: 349831
Speed set to 7056 KB/s
Starting to write CD/DVD at speed  40.0 in dummy TAO mode for single session.
Last chance to quit, starting dummy write in    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Starting new track at sector: 0
Track 01:   11 of   11 MB written (fifo 100%) [buf 100%]  19.0x.
WARNING: padding up to secsize.
Track 01: Total bytes read/written: 11601164/11602416 (4933 sectors).
Starting new track at sector: 0
Track 02:   11 of   11 MB written (fifo 100%) [buf 100%]  19.0x.    <<<<< All
good this time
WARNING: padding up to secsize.
Track 02: Total bytes read/written: 11601164/11602416 (4933 sectors).
Writing  time:   38.018s
Average write speed   3.5x.
Min drive buffer fill was 100%
Fixating...
WARNING: Some drives don't like fixation in dummy mode.
Fixating time:    0.007s
BURN-Free was never needed.
wodim: fifo had 366 puts and 366 gets.
wodim: fifo was 0 times empty and 156 times full, min fill was 93%.

#769826#10
Date:
2014-11-16 20:23:36 UTC
From:
To:
Original report erroneously stated that this has not been verified
on "lenny/stable" - that should have been "wheezy/stable".