Hi,

attached is a patch which enables SCSI logging to stderr in dvd+rw-tools.
It is based on dvd+rw-tools-7.1.tar.gz (MD5 8acb3c885c87f6838704a0025e435871).

There is no run-time control for this feature yet. Define or undefine
macro Libburnish_scsi_log_to_stderR and run "make" to enable or
disable the logging.

I tested it roughly by

  $ ./dvd+rw-mediainfo /dev/sr0

  INQUIRY
  12 00 00 00 24 00 
  From drive: 36b
  05 80 00 32 5b 00 00 00 41 53 55 53 20 20 20 20 42 57 2d 31
  36 44 31 48 54 20 20 20 20 20 20 20 31 2e 30 31 
       4 ms
  INQUIRY:                [ASUS    ][BW-16D1HT       ][1.01]
  
  TEST UNIT READY
  00 00 00 00 00 00 
  +++ key=2  asc=3Ah  ascq=01h   (    16 ms)
  
  MODE SENSE
  5a 08 2a 00 00 00 00 00 24 00 
  From drive: 36b
  00 4a 70 00 00 00 00 00 2a 42 3f 37 f1 77 29 23 21 14 01 00
  0f e0 21 14 00 10 21 14 21 14 00 01 00 00 00 00  
       4 ms
  
  MODE SENSE
  5a 08 2a 00 00 00 00 00 4c 00 
  From drive: 76b
  00 4a 70 00 00 00 00 00 2a 42 3f 37 f1 77 29 23 21 14 01 00
  0f e0 21 14 00 10 21 14 21 14 00 01 00 00 00 00 21 14 00 00
  00 00 21 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
       8 ms
  
  GET CONFIGURATION
  46 01 00 00 00 00 00 00 08 00 
  From drive: 8b
  00 00 00 9c 00 00 00 00 
  From drive: 8b
  00 00 00 9c 00 00 00 00 
       8 ms
  
  GET CONFIGURATION
  46 01 00 00 00 00 00 00 a0 00 
  From drive: 160b
  00 00 00 9c 00 00 00 00 00 00 03 48 00 43 00 00 00 42 00 00
  00 41 00 00 00 40 00 00 00 2b 00 00 00 1b 00 00 00 1a 00 00
  00 16 00 00 00 15 00 00 00 14 00 00 00 13 00 00 00 12 00 00
  00 11 00 00 00 10 00 00 00 0a 00 00 00 09 00 00 00 08 00 00
  00 02 00 00 00 01 0b 08 00 00 00 07 01 00 00 00 00 02 07 04
  02 00 00 00 00 03 0b 04 39 00 00 00 01 00 03 00 01 05 07 04
  00 00 00 00 01 08 03 0c 4b 39 43 46 39 32 41 35 30 31 32 20
  01 0c 03 10 32 31 31 33 30 32 30 35 31 39 33 30 20 20 00 00
       8 ms
  GET [CURRENT] CONFIGURATION:
  :-( no media mounted, exiting...

The time measurement is the coarse one from the SG_IO transaction.
One could improve this patch by importing the newer time measuring
code from libburn/spc.c function scsi_log_reply():

       fprintf(fp, " %8.f us     [ %.f ]\n",
               duration * 1.0e6,
               (burn_get_time(0) - lib_start_time) * 1.0e6);

But purchasing the necessary parameters is not totally trivial and i
will probably get to doing it soon.

Have a nice day :)

Thomas


** Patch added: "This patch enables SCSI logging to stderr in dvd+rw-tools"
   
https://bugs.launchpad.net/ubuntu/+source/dvd+rw-tools/+bug/1757030/+attachment/5087814/+files/dvd+rw-tools-scsi-log.patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to dvd+rw-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1757030

Title:
  Lite-On DS8A1H Slimline fails to record dual layer DVD+R

Status in dvd+rw-tools package in Ubuntu:
  New

Bug description:
  I tried Verbatim 8x and 2.4x DVD+R DL.  The failure is always exactly
  the same.

  $ growisofs -dvd-compat -Z /dev/dvdrw=2017.iso
  Executing 'builtin_dd if=2017.iso of=/dev/dvdrw obs=32k seek=0'
  /dev/dvdrw: splitting layers at 2009552 blocks
  /dev/dvdrw: "Current Write Speed" is 1.6x1352KBps.
      9175040/8231090176 ( 0.1%) @2.0x, remaining 74:40 RBU 100.0% UBU   7.4%
     21135360/8231090176 ( 0.3%) @2.6x, remaining 58:16 RBU 100.0% UBU  98.8%
     33095680/8231090176 ( 0.4%) @2.6x, remaining 49:32 RBU 100.0% UBU  98.6%
     45056000/8231090176 ( 0.5%) @2.6x, remaining 45:25 RBU 100.0% UBU  98.8%
     57016320/8231090176 ( 0.7%) @2.6x, remaining 45:23 RBU 100.0% UBU  98.8%
     69009408/8231090176 ( 0.8%) @2.6x, remaining 43:22 RBU 100.0% UBU  98.8%
     80969728/8231090176 ( 1.0%) @2.6x, remaining 41:56 RBU 100.0% UBU  98.6%
     92930048/8231090176 ( 1.1%) @2.6x, remaining 42:19 RBU 100.0% UBU  98.6%
  [..]
   4077289472/8231090176 (49.5%) @4.1x, remaining 15:15 RBU  90.0% UBU  88.4%
   4096065536/8231090176 (49.8%) @4.1x, remaining 15:11 RBU  43.0% UBU  97.9%
   4114808832/8231090176 (50.0%) @4.1x, remaining 15:06 RBU  28.0% UBU  97.9%
   4115562496/8231090176 (50.0%) @0.2x, remaining 15:08 RBU  69.4% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:12 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:15 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:18 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:22 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:25 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:28 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:32 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:35 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:38 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:42 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:45 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:48 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:52 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:55 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 15:58 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 16:02 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 16:05 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 16:08 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 16:12 RBU 100.0% UBU 100.0%
   4115562496/8231090176 (50.0%) @0.0x, remaining 16:15 RBU 100.0% UBU 100.0%
  :-[ WRITE@LBA=1ea9d0h failed with SK=5h/ASC=21h/ACQ=04h]: Invalid argument
  :-( write failed: Invalid argument
  $ dmesg
  [..]
  [5033003.021339] capability: warning: `growisofs' uses 32-bit capabilities 
(legacy support in use)
  [5033841.644130] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 
frozen
  [5033841.644149] ata1.00: cmd a0/01:00:00:00:80/00:00:00:00:00/a0 tag 0 dma 
32768 out
                            Write(10) 2a 00 00 1e d8 40 00 00 10 00res 
40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
  [5033841.644155] ata1.00: status: { DRDY }
  [5033846.688236] ata1: link is slow to respond, please be patient (ready=0)
  [5033851.684070] ata1: device not ready (errno=-16), forcing hardreset
  [5033851.684086] ata1: soft resetting link
  [5033851.888486] ata1.00: configured for MWDMA2
  [5033851.889482] ata1: EH complete

  xorriso is fine:
  $ xorrecord dev='/dev/sr0' -v -dao -pad 2017.iso
  xorriso 1.4.6 : RockRidge filesystem manipulator, libburnia project.

  Drive current: -outdev '/dev/sr0'
  Media current: DVD+R/DL
  Media status : is blank
  Media summary: 0 sessions, 0 data blocks, 0 data, 8152m free
  Beginning to write data track.
  [..]
  Writing to '/dev/sr0' completed successfully.

  xorriso : NOTE : Re-assessing -outdev '/dev/sr0'
  xorriso : NOTE : Disc status unsuitable for writing
  Drive current: -outdev '/dev/sr0'
  Media current: DVD+R/DL
  Media status : is written , is closed
  Media summary: 1 session, 4019104 data blocks, 7850m data,     0 free

  Disc status afterwards:
  $ dvd+rw-mediainfo /dev/dvdrw
  INQUIRY:                [Slimtype][DVD A  DS8A1H   ][WH66]
  GET [CURRENT] CONFIGURATION:
   Mounted Media:         2Bh, DVD+R Double Layer
   Media ID:              MKM/001
   Current Write Speed:   4.0x1385=5540KB/s
   Write Speed #0:        4.0x1385=5540KB/s
   Write Speed #1:        2.4x1385=3324KB/s
  GET [CURRENT] PERFORMANCE:
   Write Performance:     1.6x1385=2216KB/s@0 -> 5.8x1385=8036KB/s@4019103
   Speed Descriptor#0:    00/4019103 [email protected]=8310KB/s [email protected]=5540KB/s
   Speed Descriptor#1:    00/4019103 [email protected]=8310KB/s [email protected]=3324KB/s
  READ DVD STRUCTURE[#0h]:
   Media Book Type:       00h, DVD-ROM book [revision 0]
   Legacy lead-out at:    2086912*2KB=4273995776
  DVD+R DOUBLE LAYER BOUNDARY INFORMATION:
   L0 Data Zone Capacity: 2086912*2KB, can no longer be set
  READ DISC INFORMATION:
   Disc status:           complete
   Number of Sessions:    1
   State of Last Session: complete
   Number of Tracks:      1
  READ TRACK INFORMATION[#1]:
   Track State:           invisible
   Track Start Address:   0*2KB
   Free Blocks:           0*2KB
   Track Size:            4019104*2KB
   ROM Compatibility LBA: 262144
  FABRICATED TOC:
   Track#1  :             14@0
   Track#AA :             14@4019104
   Multi-session Info:    #1@0
  READ CAPACITY:          4019104*2048=8231124992

  It looks like growisofs has an alignment bug at the layer change.  The SCSI 
error code corresponds to:
  21/04  DZ             UNALIGNED WRITE COMMAND
  http://www.t10.org/lists/asc-num.htm#ASC_21

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: dvd+rw-tools 7.1-11.1
  ProcVersionSignature: Ubuntu 4.13.0-25.29-generic 4.13.13
  Uname: Linux 4.13.0-25-generic x86_64
  NonfreeKernelModules: openafs
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: LXDE
  Date: Mon Mar 19 19:15:02 2018
  SourcePackage: dvd+rw-tools
  UpgradeStatus: Upgraded to artful on 2018-01-06 (72 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dvd+rw-tools/+bug/1757030/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to