[Libburn-hackers] Re: libburn failure

Thomas Schmitt scdbackup at gmx.net
Sat Oct 3 10:06:56 CDT 2009


> working on brasero I noticed a bug in libburn. If you tried to burn
> several tracks to an audio disc with TAO and dummy option on, the
> burn will fail when starting to burn the second track.
> [...]
> cdrskin: DEBUG : TAO pre-track 02 : get_nwa(0)=1, d=17255 ,
> demand=35338240 , cap=736966656
> Track 01: Total bytes read/written: 40581452/40583760 (17255
> sectors).
> cdrskin: DEBUG : SCSI error condition on command 2Ah WRITE(10): [5 21
> 02]  Invalid address
> cdrskin: FATAL : SCSI error on write(17255,13): [5 21 02]  Invalid
> address

I experience the same. Thanks for finding this.
It happens with -data, too.

> NOTICE the "cdrskin: DEBUG : TAO pre-track 02 : get_nwa(0)=1, d=17255
> , demand=35338240 , cap=736966656"

libburn ignores the NWA 0 and happily goes
on with writing where the previous track ends.
That's because in libburn/write.c, at the end of
function burn_write_track() :

                if (nwa > d->nwa)
                        d->nwa = nwa;

A preliminary remedy would be this

                if (nwa > d->nwa || o->simulate)
                        d->nwa = nwa;

I have to think about the meaning of
(d->nwa < nwa) in this situation if not
the drive was asked to do a dummy burn.

Next there occurs another failure
  cdrskin: DEBUG : Closing track 02
  cdrskin: DEBUG : SCSI error condition on command 5Bh CLOSE TRACK/SESSION: [5 24 00]  Invalid field in cdb

It vanishes if i change in  burn_write_track() :

                if (burn_write_close_track(o, s, tnum) <= 0)
                        ret = 0;


                if (!o->simulate)
                        if (burn_write_close_track(o, s, tnum) <= 0)
                                ret = 0;

This fixes NWA = 0 with the second track !
I now get
  cdrskin: DEBUG : TAO pre-track 02 : get_nwa(1134)=1, d=982 , demand=2490368 , cap=734644224

So i have to find out why closing the tracks
is disliked in simulation mode.
It appears that cdrecord does not emit this
command even in real writing mode. Obviously
it relies entirely on 35h SYNCHRONIZE CACHE to
mark the end of a TAO track.
(Learned by watching cdrecord -V)


I will commit above two changes to SVN after
getting an opinion about the open questions.
Be invited to try them in your local copy
of libburn.

Actually only the second one seems really needed
but the first one appears reasonable, too.


Have a nice day :)


More information about the Libburn-hackers mailing list