Bug#343666: cdrecord: segfaults on burn start
On Sat, 2005-12-17 at 12:48 +, Steve McIntyre wrote: On Fri, Dec 16, 2005 at 05:40:09PM -0700, dann frazier wrote: Package: cdrecord Version: 4:2.01+01a03-4 Severity: important A backtrace is below[1]. The 4:2.01+01a03-4 release didn't segv, but reported an error[2]. Bugger. I _think_ I've found the problem, some debug left in that was a little too i386-specific. I have an ia64 here, but not with a CD-R drive attached to be able to test the fix. Can you test a rebuild with the patch 27_scsi_buffer_size replaced with the version attached please? Thanks Steve. I dropped the libscg/scg/scsitransp.h hunk because it already appears to be in -4 - rest of the patch applied cleanly. However, it still crashes in the same place. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#343666: cdrecord: segfaults on burn start
On Mon, Dec 19, 2005 at 06:40:40PM -0700, dann frazier wrote: On Sat, 2005-12-17 at 12:48 +, Steve McIntyre wrote: On Fri, Dec 16, 2005 at 05:40:09PM -0700, dann frazier wrote: Package: cdrecord Version: 4:2.01+01a03-4 Severity: important A backtrace is below[1]. The 4:2.01+01a03-4 release didn't segv, but reported an error[2]. Bugger. I _think_ I've found the problem, some debug left in that was a little too i386-specific. I have an ia64 here, but not with a CD-R drive attached to be able to test the fix. Can you test a rebuild with the patch 27_scsi_buffer_size replaced with the version attached please? Thanks Steve. I dropped the libscg/scg/scsitransp.h hunk because it already appears to be in -4 - rest of the patch applied cleanly. However, it still crashes in the same place. :-( Can you mail me a coredump please? I'll have to dig in further and see what's going on... -- Steve McIntyre, Cambridge, UK.[EMAIL PROTECTED] Getting a SCSI chain working is perfectly simple if you remember that there must be exactly three terminations: one on one end of the cable, one on the far end, and the goat, terminated over the SCSI chain with a silver-handled knife whilst burning *black* candles. --- Anthony DeBoer signature.asc Description: Digital signature
Bug#343666: cdrecord: segfaults on burn start
On Tue, 2005-12-20 at 01:52 +, Steve McIntyre wrote: On Mon, Dec 19, 2005 at 06:40:40PM -0700, dann frazier wrote: On Sat, 2005-12-17 at 12:48 +, Steve McIntyre wrote: On Fri, Dec 16, 2005 at 05:40:09PM -0700, dann frazier wrote: Package: cdrecord Version: 4:2.01+01a03-4 Severity: important A backtrace is below[1]. The 4:2.01+01a03-4 release didn't segv, but reported an error[2]. Bugger. I _think_ I've found the problem, some debug left in that was a little too i386-specific. I have an ia64 here, but not with a CD-R drive attached to be able to test the fix. Can you test a rebuild with the patch 27_scsi_buffer_size replaced with the version attached please? Thanks Steve. I dropped the libscg/scg/scsitransp.h hunk because it already appears to be in -4 - rest of the patch applied cleanly. However, it still crashes in the same place. :-( Can you mail me a coredump please? I'll have to dig in further and see what's going on... http://dannf.org/bugs/343666 Corresponding binaries/source included as well, thanks! -- dann frazier [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#343666: cdrecord: segfaults on burn start
On Fri, Dec 16, 2005 at 05:40:09PM -0700, dann frazier wrote: Package: cdrecord Version: 4:2.01+01a03-4 Severity: important A backtrace is below[1]. The 4:2.01+01a03-4 release didn't segv, but reported an error[2]. Bugger. I _think_ I've found the problem, some debug left in that was a little too i386-specific. I have an ia64 here, but not with a CD-R drive attached to be able to test the fix. Can you test a rebuild with the patch 27_scsi_buffer_size replaced with the version attached please? -- Steve McIntyre, Cambridge, UK.[EMAIL PROTECTED] Google-bait: Debian does NOT ship free CDs. Please do NOT contact the mailing lists asking us to send them to you. #! /bin/sh /usr/share/dpatch/dpatch-run ## 27_scsi_buffer_size.dpatch by Steve McIntyre [EMAIL PROTECTED] ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: If we can't get a buffer as big as we would like, shrink the desired ## size until it works. Bug #330371 @DPATCH@ diff -urNad cdrtools-2.01+01a03/cdda2wav/interface.c /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdda2wav/interface.c --- cdrtools-2.01+01a03/cdda2wav/interface.c2005-12-17 12:37:57.0 + +++ /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdda2wav/interface.c 2005-12-17 12:38:31.0 + @@ -484,6 +484,7 @@ { int retval = 0; struct stat fstatstruct; + long bufsize = 0; /* The device (given by pdevname) can be: a. an SCSI device specified with a /dev/xxx name, @@ -559,10 +560,15 @@ dontneedroot(); if (global.nsectors (unsigned) scg_bufsize(scgp, 3*1024*1024)/CD_FRAMESIZE_RAW) global.nsectors = scg_bufsize(scgp, 3*1024*1024)/CD_FRAMESIZE_RAW; - if (global.overlap = global.nsectors) -global.overlap = global.nsectors-1; - init_scsibuf(scgp, global.nsectors*CD_FRAMESIZE_RAW); + bufsize = global.nsectors * CD_FRAMESIZE_RAW; + + init_scsibuf(scgp, bufsize); +global.nsectors = bufsize / CD_FRAMESIZE_RAW; + + if (global.overlap = global.nsectors) + global.overlap = global.nsectors-1; + if (global.scanbus) { select_target(scgp, stdout); exit(0); diff -urNad cdrtools-2.01+01a03/cdda2wav/scsi_cmds.c /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdda2wav/scsi_cmds.c --- cdrtools-2.01+01a03/cdda2wav/scsi_cmds.c2005-12-17 12:37:57.0 + +++ /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdda2wav/scsi_cmds.c 2005-12-17 12:38:31.0 + @@ -1780,11 +1780,11 @@ static caddr_t scsibuffer; /* page aligned scsi transfer buffer */ -void init_scsibuf __PR((SCSI *, unsigned)); +void init_scsibuf __PR((SCSI *, long *)); void init_scsibuf(scgp, amt) SCSI *scgp; - unsigned amt; + long *amt; { if (scsibuffer != NULL) { fprintf(stderr, the SCSI transfer buffer has already been allocated!\n); diff -urNad cdrtools-2.01+01a03/cdda2wav/scsi_cmds.h /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdda2wav/scsi_cmds.h --- cdrtools-2.01+01a03/cdda2wav/scsi_cmds.h2005-12-17 12:37:57.0 + +++ /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdda2wav/scsi_cmds.h 2005-12-17 12:38:31.0 + @@ -40,7 +40,7 @@ get_orig_sectorsize __PR((SCSI *scgp, unsigned char *m4, unsigned char *m10, unsigned char *m11)); int heiko_mmc __PR(( SCSI *scgp )); -void init_scsibuf __PR(( SCSI *scgp, unsigned amt )); +void init_scsibuf __PR(( SCSI *scgp, long *amt )); intmyscsierr __PR(( SCSI *scgp )); extern int accepts_fua_bit; diff -urNad cdrtools-2.01+01a03/cdrecord/cdrecord.c /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdrecord/cdrecord.c --- cdrtools-2.01+01a03/cdrecord/cdrecord.c 2005-12-17 12:38:26.0 + +++ /tmp/dpep.KsKoR8/cdrtools-2.01+01a03/cdrecord/cdrecord.c2005-12-17 12:38:31.0 + @@ -280,6 +280,7 @@ charerrstr[80]; BOOLgracedone = FALSE; char*suf = '\0'; +size_t wanted_bufsize = 0; /* cut the Debian specific suffix from the executable filename */ suf = strstr(av[0], .mmap); @@ -584,12 +585,18 @@ if (lverbose driveropts) printf(Driveropts: '%s'\n, driveropts); -/* bufsize = scg_bufsize(scgp, CDR_BUF_SIZE);*/ bufsize = scg_bufsize(scgp, bufsize); if (lverbose || debug) error(SCSI buffer size: %ld\n, bufsize); - if ((buf = scg_getbuf(scgp, bufsize)) == NULL) - comerr(Cannot get SCSI I/O buffer.\n); + +wanted_bufsize = bufsize; +buf = scg_getbuf(scgp, bufsize); + +if (NULL == buf) +comerr(Cannot get SCSI I/O buffer of size %d bytes.\n, bufsize); + +if ((lverbose || debug) (bufsize != wanted_bufsize)) +errmsgno(EX_BAD, Asked for SCSI I/O buffer size %d bytes, could only get %d.\n, wanted_bufsize, bufsize); if ((flags F_SCANBUS) != 0) { select_target(scgp, stdout); diff -urNad cdrtools-2.01+01a03/include/scg/scsitransp.h
Bug#343666: cdrecord: segfaults on burn start
Package: cdrecord Version: 4:2.01+01a03-4 Severity: important A backtrace is below[1]. The 4:2.01+01a03-4 release didn't segv, but reported an error[2]. [1] [EMAIL PROTECTED]:/tmp$ sudo gdb /usr/bin/cdrecord.mmap GNU gdb 6.3.90_20051119-debian Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as ia64-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) set args -v /tmp/debian-31r0a-amd64-netinst-hpde-20051216.iso (gdb) run Starting program: /usr/bin/cdrecord.mmap -v /tmp/debian-31r0a-amd64-netinst-hpde-20051216.iso /usr/bin/cdrecord: No write mode specified. /usr/bin/cdrecord: Asuming -tao mode. /usr/bin/cdrecord: Future versions of cdrecord may have different drive dependent defaults. /usr/bin/cdrecord: Continuing in 5 seconds... Cdrecord-Clone 2.01.01a03 (ia64-unknown-linux-gnu) Copyright (C) 1995-2005 Joerg Schilling NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord and thus may have bugs that are not present in the original version. Please send bug reports and support requests to [EMAIL PROTECTED]. The original author should not be bothered with problems of this version. /usr/bin/cdrecord: Warning: Running on Linux-2.6.14-2-mckinley-smp /usr/bin/cdrecord: There are unsettled issues with Linux-2.5 and newer. /usr/bin/cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris. TOC Type: 1 = CD-ROM scsidev: '/dev/cdrom' devname: '/dev/cdrom' scsibus: -2 target: -2 lun: -2 Warning: Open by 'devname' is unintentional and not supported. Linux sg driver version: 3.5.27 Using libscg version 'ubuntu-0.8ubuntu1'. /usr/bin/cdrecord: Warning: using inofficial version of libscg (ubuntu-0.8ubuntu1 '@(#)scsitransp.c 1.91 04/06/17 Copyright 1988,1995,2000-2004 J. Schilling'). Driveropts: 'burnfree' SCSI buffer size: 64512 /usr/bin/cdrecord: Asked for SCSI I/O buffer size 64512 bytes, could only get 20480. atapi: 1 Device type: Removable CD-ROM Version: 0 Response Format: 2 Capabilities : Vendor_info: 'LITE-ON ' Identifikation : 'LTR-24102B ' Revision : '5KS3' Device seems to be: Generic mmc CD-RW. Current: 0x000A Profile: 0x000A (current) Profile: 0x0009 Profile: 0x0008 Profile: 0x0002 (current) 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 : 1966272 = 1920 KB Program received signal SIGSEGV, Segmentation fault. fillbytes (tov=0xc0001c40, cnt=value optimized out, val=value optimized out) at fillbytes.c:95 95 *to++ = cval; (gdb) bt #0 fillbytes (tov=0xc0001c40, cnt=value optimized out, val=value optimized out) at fillbytes.c:95 #1 0x400117a0 in main (ac=3, av=0x6f837728) at cdrecord.c:4021 (gdb) bt full #0 fillbytes (tov=0xc0001c40, cnt=value optimized out, val=value optimized out) at fillbytes.c:95 to = 0xc0001c40 Address 0xc0001c40 out of bounds n = 3 lval = 0 #1 0x400117a0 in main (ac=3, av=0x6f837728) at cdrecord.c:4021 vers = value optimized out auth = value optimized out dev = 0x6001c270 /dev/cdrom timeout = 40 speed = 10 flags = 1048576 blanktype = 0 i = dwarf2_read_address: Corrupted DWARF expression. (gdb) [2] [EMAIL PROTECTED]:/tmp$ sudo cdrecord -v blank=fast /tmp/debian-31r0a-amd64-netinst-hpde-20051216.iso cdrecord: No write mode specified. cdrecord: Asuming -tao mode. cdrecord: Future versions of cdrecord may have different drive dependent defaults. cdrecord: Continuing in 5 seconds... Cdrecord-Clone 2.01.01a03 (ia64-unknown-linux-gnu) Copyright (C) 1995-2005 Joerg Schilling NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord and thus may have bugs that are not present in the original version. Please send bug reports and support requests to [EMAIL PROTECTED]. The original author should not be bothered with problems of this version. cdrecord: Warning: Running on Linux-2.6.14-2-mckinley-smp cdrecord: There are unsettled issues with Linux-2.5 and newer. cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris. TOC Type: 1 = CD-ROM scsidev: '/dev/cdrom' devname: '/dev/cdrom' scsibus: -2 target: -2 lun: -2 Warning: Open by 'devname' is unintentional and not supported. Linux sg driver version: 3.5.27 Using libscg version 'ubuntu-0.8ubuntu1'. cdrecord: Warning: using inofficial version of libscg (ubuntu-0.8ubuntu1 '@(#)scsitransp.c 1.91 04/06/17 Copyright 1988,1995,2000-2004 J.