[Pkg-opt-media-team] Bug#598275: dvdisaster harms my system

Stephan Seidl stephan.seidl at tu-dresden.de
Mon Sep 27 22:12:04 UTC 2010


Package: dvdisaster
Version: 0.71.26-2
Severity: important

### submit at bugs.debian.org
### Subject: dvdisaster harms my system

Let us firstly see what a patched dvdisaster does.
Patched means here, that the quick hack below has been applied.

$ ls -l
total 662952
-rw------- 1 seidl seidl     14067 Sep 27 23:56 Bugreport
-rwx------ 1 seidl seidl       138 Sep 26 23:30 Script
-rw------- 1 seidl seidl 678172672 Sep 26 23:29 cd1.iso
$ cat Script
unset LANG LANGUAGE LC_ALL
LC_ALL=C
export LC_ALL
dvdisaster --create --image cd1.iso --ecc cd1.ecc --device /dev/hugo-ist-doof
$ file cd1.iso
cd1.iso: ISO 9660 CD-ROM filesystem data 'Debian 5.0.1 i386 Bin-1        ' (bootable)
$ echo Run a patched version of dvdisaster
Run a patched version of dvdisaster
$ ./Script
dvdisaster-0.70  Copyright 2004-2008 Carsten Gnoerlich.
This software comes with  ABSOLUTELY NO WARRANTY.  This
is free software and you are welcome to redistribute it
under the conditions of the GNU GENERAL PUBLIC LICENSE.
See the file "COPYING" for further information.

Opening cd1.iso: 331139 medium sectors.
00:00:10.7 for CRC writing/generation.
Encoding with Method RS01: 32 roots, 14.3% redundancy.
00:00:57.4 for ECC generation.
Ecc generation: 100.0%
Error correction file "cd1.ecc" created.
Make sure to keep this file on a reliable medium.
$

All works fine. cd1.ecc has been created from cd1.iso, /dev/hugo-ist-doof has been ignored.

On the other hand, if Script invokes the original dvdisaster binary, regardless of its
release, the things change. I tried 0.70.6 ... 0.72~rc1-1. dvdisaster hangs for a long time
before it starts to work as expected. During the hang-time one can continue his work.
The hanging process cannot be eliminated.

$ date ; ./Script ; date
Mon Sep 27 01:01:32 CEST 2010
dvdisaster-0.71  Copyright 2004-2008 Carsten Gnoerlich.
This software comes with  ABSOLUTELY NO WARRANTY.  This
is free software and you are welcome to redistribute it
under the conditions of the GNU GENERAL PUBLIC LICENSE.
See the file "COPYING" for further information.
No CD/DVD drives found in /dev.
No drives will be pre-selected.

Opening cd1.iso: 331139 medium sectors.
00:00:07.5 for CRC writing/generation.
Encoding with Method RS01: 32 roots, 14.3% redundancy.
00:01:09.9 for ECC generation.
Ecc generation: 100.0%
Error correction file "cd1.ecc" created.
Make sure to keep this file on a reliable medium.
Mon Sep 27 01:23:41 CEST 2010
$

Some analysis to show what is going on.

# lsof -p 5950 | grep /dev/
dvdisaste 5950 seidl    0u   CHR  136,4               7 /dev/pts/4
dvdisaste 5950 seidl    1u   CHR  136,4               7 /dev/pts/4
dvdisaste 5950 seidl    2u   CHR  136,4               7 /dev/pts/4
dvdisaste 5950 seidl    4r   BLK   11,0            1341 /dev/sr0
# cat /var/log/syslog | grep sr0 | tail -1
Sep 26 21:40:50 <hostname> kernel: sr 1:0:1:0: Attached scsi CD-ROM sr0
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: SEAGATE  Model: ST3300655LW      Rev: 0003
  Type:   Direct-Access                    ANSI  SCSI revision: 03
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: SEAGATE  Model: ST3300655LW      Rev: 0003
  Type:   Direct-Access                    ANSI  SCSI revision: 03
Host: scsi1 Channel: 00 Id: 01 Lun: 00
  Vendor: TEAC     Model: CD-W512SB        Rev: 1.0K
  Type:   CD-ROM                           ANSI  SCSI revision: 02
#

Just to know.

# o=`ps ax`; echo "${o}" | grep dvdisaster
 5950 pts/4    D+     0:00 dvdisaster --create --image cd1.iso --ecc cd1.ecc --device /dev/hugo-ist-doof
# kill -15 5950 || echo 111111
# o=`ps ax`; echo "${o}" | grep dvdisaster
 5950 pts/4    D+     0:00 dvdisaster --create --image cd1.iso --ecc cd1.ecc --device /dev/hugo-ist-doof
# kill -9 5950 || echo 111111
# o=`ps ax`; echo "${o}" | grep dvdisaster
 5950 pts/4    D+     0:00 dvdisaster --create --image cd1.iso --ecc cd1.ecc --device /dev/hugo-ist-doof
#

Syslog entries.

Sep 27 01:22:08 <hostname> kernel: sr 1:0:1:0: [sr0] Attempting to queue an ABORT message
Sep 27 01:22:08 <hostname> kernel: CDB: 0x12 0x0 0x0 0x0 0x24 0x0 0x0 0x0 0x0 0x0 0x0 0x0
Sep 27 01:22:08 <hostname> kernel: scsi1: At time of recovery, card was not paused
Sep 27 01:22:08 <hostname> kernel: >>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
Sep 27 01:22:08 <hostname> kernel: scsi1: Dumping Card State in Command phase, at SEQADDR 0xb7
Sep 27 01:22:08 <hostname> kernel: Card was paused
Sep 27 01:22:08 <hostname> kernel: ACCUM = 0x80, SINDEX = 0xa0, DINDEX = 0xe4, ARG_2 = 0x0
Sep 27 01:22:08 <hostname> kernel: HCNT = 0xc SCBPTR = 0x0
Sep 27 01:22:08 <hostname> kernel: SCSISIGI[0x44]:(BSYI|IOI) ERROR[0x0] SCSIBUSL[0x54] 
Sep 27 01:22:08 <hostname> kernel: LASTPHASE[0x80]:(CDI) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI) 
Sep 27 01:22:08 <hostname> kernel: SBLKCTL[0xa]:(SELWIDE|SELBUSB) SCSIRATE[0x15]:(SINGLE_EDGE) 
Sep 27 01:22:08 <hostname> kernel: SEQCTL[0x10]:(FASTMODE) SEQ_FLAGS[0x0] SSTAT0[0x0] 
Sep 27 01:22:08 <hostname> kernel: SSTAT1[0x3]:(REQINIT|PHASECHG) SSTAT2[0x50]:(EXP_ACTIVE|SHVALID) 
Sep 27 01:22:08 <hostname> kernel: SSTAT3[0x8] SIMODE0[0x8]:(ENSWRAP) SIMODE1[0xac]:(ENSCSIPERR|ENBUSFREE|ENSCSIRST|ENSELTIMO) 
Sep 27 01:22:08 <hostname> kernel: SXFRCTL0[0x80]:(DFON) DFCNTRL[0x24]:(DIRECTION|SCSIEN) 
Sep 27 01:22:08 <hostname> kernel: DFSTATUS[0x80]:(PRELOAD_AVAIL) 
Sep 27 01:22:08 <hostname> kernel: STACK: 0x0 0x167 0x17d 0x35
Sep 27 01:22:08 <hostname> kernel: SCB count = 8
Sep 27 01:22:08 <hostname> kernel: Kernel NEXTQSCB = 6
Sep 27 01:22:08 <hostname> kernel: Card NEXTQSCB = 6
Sep 27 01:22:08 <hostname> kernel: QINFIFO entries: 
Sep 27 01:22:08 <hostname> kernel: Waiting Queue entries: 
Sep 27 01:22:08 <hostname> kernel: Disconnected Queue entries: 
Sep 27 01:22:08 <hostname> kernel: QOUTFIFO entries: 
Sep 27 01:22:08 <hostname> kernel: Sequencer Free SCB List: 2 5 4 3 1 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 
Sep 27 01:22:08 <hostname> kernel: Sequencer SCB Info: 
Sep 27 01:22:08 <hostname> kernel:  0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0x17] SCB_LUN[0x0] 
Sep 27 01:22:08 <hostname> kernel: SCB_TAG[0x0] 
Sep 27 01:22:08 <hostname> kernel:  1 SCB_CONTROL[0xe0]:(TAG_ENB|DISCENB|TARGET_SCB) SCB_SCSIID[0x7] 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0x0] SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  2 SCB_CONTROL[0xe0]:(TAG_ENB|DISCENB|TARGET_SCB) SCB_SCSIID[0x7] 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0x0] SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  3 SCB_CONTROL[0xe0]:(TAG_ENB|DISCENB|TARGET_SCB) SCB_SCSIID[0x7] 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0x0] SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  4 SCB_CONTROL[0xe0]:(TAG_ENB|DISCENB|TARGET_SCB) SCB_SCSIID[0x7] 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0x0] SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  5 SCB_CONTROL[0xe0]:(TAG_ENB|DISCENB|TARGET_SCB) SCB_SCSIID[0x7] 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0x0] SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel:  9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 16 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 17 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 18 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 19 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 20 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 21 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 22 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 23 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 24 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 25 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 26 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 27 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 28 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 29 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 30 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: 31 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID) 
Sep 27 01:22:08 <hostname> kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff] 
Sep 27 01:22:08 <hostname> kernel: Pending list: 
Sep 27 01:22:08 <hostname> kernel:  0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0x17] SCB_LUN[0x0] 
Sep 27 01:22:08 <hostname> kernel: Kernel Free SCB list: 7 1 3 5 2 4 
Sep 27 01:22:08 <hostname> kernel: Untagged Q(1): 0 
Sep 27 01:22:08 <hostname> kernel:
Sep 27 01:22:08 <hostname> kernel: <<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
Sep 27 01:22:08 <hostname> kernel: sr 1:0:1:0: [sr0] Device is active, asserting ATN
Sep 27 01:22:08 <hostname> kernel: Recovery code sleeping
Sep 27 01:22:13 <hostname> kernel: Timer Expired
Sep 27 01:22:13 <hostname> kernel: Recovery code awake
Sep 27 01:22:13 <hostname> kernel: aic7xxx_abort returns 0x2003
Sep 27 01:22:13 <hostname> kernel: sr 1:0:1:0: [sr0] Attempting to queue a TARGET RESET message
Sep 27 01:22:13 <hostname> kernel: CDB: 0x12 0x0 0x0 0x0 0x24 0x0 0x0 0x0 0x0 0x0 0x0 0x0
Sep 27 01:22:13 <hostname> kernel: aic7xxx_dev_reset returns 0x2003
Sep 27 01:22:13 <hostname> kernel: Recovery SCB completes

This software tries to kill me.
One can imagine what would happen if the TEAC burner would be attached
to the first SCSI controller, where the system disk lives.

My ideas.
I do not expect that anyone cleans up the SCSI code such that my TEAC burner works,
but I expect that this TEAC burner is not touched without a good reason.
The latter means
1) with --create and --ecc <regular-file>, probing in /dev/ should not happen.
2) if a device is given via --device, probing in /dev/ should also not happen.

The quick hack I usually apply to make dvdisaster working for me looks as follows.
It should be noted the the Windows version of dvdisaster works perfectly, even
on a full-SCSI system.

======================================================================================
diff -Naur dvdisaster-0.72.1.orig-ORG/scsi-linux.c dvdisaster-0.72.1.orig/scsi-linux.c
--- dvdisaster-0.72.1.orig-ORG/scsi-linux.c	2009-07-06 20:32:15.000000000 +0200
+++ dvdisaster-0.72.1.orig/scsi-linux.c	2010-09-27 00:53:45.000000000 +0200
@@ -38,6 +38,8 @@
    const char* dev;
    int dev_type;
 
+   return g_strdup("/dev/cdrom");
+
    dir = g_dir_open("/dev", 0, NULL);
 
    if(!dir)
======================================================================================

That's it.
Regards
Stephan





More information about the Pkg-opt-media-team mailing list