bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-xorriso] consultation about libburn


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] consultation about libburn
Date: Tue, 15 Jul 2014 08:58:39 +0200

Hi,

> linux3.0.35 is tested on the ARM (freescale imx6q) which occurs
> the problem.

So for now i would suspect an ARM architecture specific problem
which is triggered by the SCSI command sequence beginning at line
198 of the log file:

---------------------------------------------------------------------

First an GET CONFIGURATION command is issued with a sparse reply
buffer size in order to learn the necessary size for this buffer:

  GET CONFIGURATION 
  46 00 00 00 00 00 00 00 08 00

Similar to a previous occasion in line 95 of the log file, libburn
gets an answer from the drive

  From drive: 8b 
  00 3a 41 00 00 00 00 00 
       1062 us     [ 3021392 ]

Different from the answer to line 95, the announced size is
unrealistically large:     0x003a4100 = 3817728 decimal.
The answer for line 95 was 0x0000019c = 412 which is plausible.
My test drive Samsung CDDVDW SH-S203B tells 0x00000158 = 344.

With this unrealistic size request, the command is performed
again in order to obtain the list of MMC profiles, which would
tell the supported media types and states.

The MMC command GET CONFIGURATION only has two bytes for
telling the drive the requested amount of data. 4 bytes have
to be added. So  0x003a4100 gets truncated to 0x4100 and 
then added up to 0x4104:

  GET CONFIGURATION
  46 00 00 00 00 00 00 41 04 00

Already this smaller size causes the protest of the operating system

  cdrskin: ( Most recent system error: 22  'Invalid argument' )
  --- SG_IO: return= -1 , errno= 22 , host_status= 0x0 , driver_status= 0x0

which would be bad enough. But obviously it also spoiled some
dynamic memory, which soon later causes the program crash.

  cdrskin: malloc.c:3096: sYSMALLOc: Assertion ...

---------------------------------------------------------------------

I will augment libburn to recognize such clearly ill size announcements.
Regrettably it will then only have the option to perform an emergency
end. The only advantage will be a clearer error message and no memory
fault at program end.

You should now look for advise by the people who maintain that ARM
Linux kernel. (I assume CD drives are an exotic add-on to this kind
of machine.)
Show them my above diagnosis and eventually the cdrskin_scsi.log file.
Tell them that the SCSI commands are specified in SCSI documents SPC-3,
SBC-2, and MMC-5.

I am willing to answer their questions. But i will be offline for about
10 days beginning tomorrow evening.
(Probably the biggest problem with those developers will be to get
 a CD/DVD drive attached to their test machines.)

The code which performs GET CONFIGURATION is in functions
  mmc_get_configuration()
  http://libburnia-project.org/browser/libburn/trunk/libburn/mmc.c#L3238
  mmc_get_configuration_al()
  http://libburnia-project.org/browser/libburn/trunk/libburn/mmc.c#L2926


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]