dvd+rw-tools-5.15.4.8.5 and FreeBSD 5-current

From: Pav Lucistnik <pav_at_FreeBSD.org>
Date: Thu, 25 Dec 2003 18:36:17 +0100
Forwarding this from -ports to -current, because more kernel wizards are
lurking here. If anyone can look into this - if we can't solve this, no
one is going to burn a single CD on 5.2 system...


From: Andy Polyakov <appro_at_fy.chalmers.se>
To: chuck_at_pkix.net, ports_at_freebsd.org
Cc: pav_at_freebsd.org
Subject: dvd+rw-tools-5.15.4.8.5 and FreeBSD 5-current
Date: Tue, 23 Dec 2003 21:38:23 +0100

Folks,

It was brought to my attention that growisofs, principal burning utility
from dvd+rw-tools, fails to fulfill DVD recording under FreeBSD
5-current. In the course of trouble-shooting it became apparent that the
failure is cased by kernel bug, reportedly introduced with "ATAng
commit." The kernel deficiency manifests itself by failure to
automatically pull sense data for failed ATAPI command, when application
most expects it to (as CAM_DIS_AUTOSENSE flag is *not* set). It was
possible to work around the bug by explicitly checking for
CAM_AUTOSNS_VALID status flag and "manually" pulling the sense data with
REQUEST SENSE command. Thanks to Pav Lucistnik <pav_at_FreeBSD.org> for
working with me on this. The workaround is incorporated to
dvd+rw-tools-5.15.4.8.5 update, which is available for immediate
download at usual location,
http://fy.chalmers.se/~appro/linux/DVD+RW/tools/.

Even though workaround is available, it doesn't change the fact that
there is a kernel bug, which needs to be fixed. Well, one can argue if
it's a bug or feature, but the truth is that it doesn't affect
dvd+rw-tools only. Source code examination makes me conclude that at
least cd-write, cdrdao and cdrecord are affected as well. All three
apparently rely on kernel ability to pull sense data for failed command
automatically. One can wonder why it was not noticed and fixed so far?
ATAng is available for several months now, right? One possible
explanation might be that one can actually say that growisofs fails more
often. How come? There're few command MMC commands which come it two
flavors, "synchronous" and "immedidate." "Immediate" commands merely
initiate requested procedure and immediately return to requestor
(therefore the name:-), *implying* that requestor will periodically poll
the logical unit in order to find out when the requested procedure
actually finishes. Polling is normally done with TEST UNIT READY command
which is *bound* to fail while procedure in question progresses. Now the
catch is that unlike other programs dvd+rw-tools *extensively* use these
"immediate" commands in order to minimize the periods of IDE-bus
monopolization. So that in a sense one can say that growisofs is *bound*
to fail, yet it doesn't mean that recording was unsuccessful! Other
programs surely failed too, e.g. because of media defect, but such
failures are rare and intermittent and users could have silently
tolerated them as the problem just disappears if they retry.

Season greetings to everybody. A.

-- 
Pav Lucistnik <pav_at_oook.cz>
              <pav_at_FreeBSD.org>

Can't sing. Can't dance. Can handle a sword a little.

Received on Thu Dec 25 2003 - 08:36:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC