Bug 98962 - [ata] [burncd]: [patch] writing >1 session on ATAPI CDs fails
Summary: [ata] [burncd]: [patch] writing >1 session on ATAPI CDs fails
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-14 23:20 UTC by John Hood
Modified: 2018-02-18 07:25 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (560 bytes, patch)
2006-06-14 23:20 UTC, John Hood
no flags Details | Diff
beforepatch (1.94 KB, text/plain; charset=us-ascii)
2006-12-28 03:56 UTC, John Hood
no flags Details
afterpatch (2.33 KB, text/plain; charset=us-ascii)
2006-12-28 03:56 UTC, John Hood
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Hood 2006-06-14 23:20:27 UTC
Writing the second session on a multi-session CD-R or CD-RW with
burncd fails.  Edited script session follows:

Script started on Wed Jun 14 17:02:04 2006
root@faster# burncd blank
blanking CD - 98 % done     
root@faster# mkisofs -r -o /tmp/iso1 /etc/profile
Total translation table size: 0
Total rockridge attributes bytes: 248
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 91c4
176 extents written (0 MB)
root@faster# burncd -m data /tmp/iso1 fixate
next writeable LBA 0
writing from file /tmp/iso1 size 352 KB
written this track 352 KB (100%) total 352 KB
fixating CD, please wait..
root@faster# burncd msinfo
burncd: ioctl(CDIOREADTOCHEADER): Input/output error
root@faster# cdcontrol ej  # this stale-TOC bug is already fixed
root@faster# cdcontrol cl
root@faster# burncd msinfo
0,11700
root@faster# mkisofs -r -C 0,11700 -M /dev/acd0 -o /tmp/iso2 /etc/printcap
Rock Ridge signatures found
Total translation table size: 0
Total rockridge attributes bytes: 329
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used a1c4
11877 extents written (23 MB)
root@faster# burncd -m data /tmp/iso2 fixate
next writeable LBA 11700
writing from file /tmp/iso2 size 354 KB

Input/output error

fixating CD, please wait..
root@faster# echo $?
0
root@faster# cdcontrol ej
root@faster# cdcontrol cl
root@faster# mount /cdrom
root@faster# ls /cdrom
profile
root@faster# umount /cdrom
root@faster# burncd msinfo
0,11700
root@faster# exit

Script done on Wed Jun 14 17:10:17 2006

ktrace shows burncd getting EIO on its first write to /dev/acd0.

Fix: If a CD has a TOC, the acd driver reports the CD's current size to
GEOM, and GEOM later prevents writes beyond the last session on the
media.  Writing the first session works because the driver sets the
disk size to (u_int32_t)-1, which gets cast to an int64 for GEOM,
becoming 0xffffffff.

This patch sets the media size for GEOM to a large positive number,
but only when the device is opened writable.

How-To-Repeat: 	See above script.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-06-15 05:32:42 UTC
Responsible Changed
From-To: freebsd-bugs->sos

Over to maintainer.
Comment 2 John Hood 2006-09-15 02:03:32 UTC
On Wed, Jun 14, 2006 at 10:20:27PM +0000, FreeBSD-gnats-submit@FreeBSD.org wrote:
> Thank you very much for your problem report.
> It has the internal identification `kern/98962'.

Hey Soren,

Could you have another look at this?

It's a real bug in the driver.  It does happen to look a lot like the
stale-TOC bug a lot of drives have (which you've already worked
around), but is actually a bad interaction with GEOM.  I'd like to see
a fix for this get checked in.

Thanks,

  --jh
Comment 3 Remko Lodder freebsd_committer freebsd_triage 2006-12-25 21:06:33 UTC
State Changed
From-To: open->feedback

Hello, can you see what the status is on the latest 6-stable 
and/or 7-current ? thanks! 


Comment 4 Remko Lodder freebsd_committer freebsd_triage 2006-12-25 21:06:33 UTC
Responsible Changed
From-To: sos->remko

steal the ticket from Soren to get more information.
Comment 5 John Hood 2006-12-28 03:56:42 UTC
On Mon, Dec 25, 2006 at 09:07:30PM +0000, Remko Lodder wrote:
> Old Synopsis: [ata] [patch] writing >1 session on ATAPI CDs fails
> New Synopsis: [ata] [burncd]: [patch] writing >1 session on ATAPI CDs fails
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: remko
> State-Changed-When: Mon Dec 25 21:06:33 UTC 2006
> State-Changed-Why: 
> Hello, can you see what the status is on the latest 6-stable
> and/or 7-current ? thanks!

Since you didn't mention what fixes to check, I ended up cvsup-ing
6_RELENG as of about 20061228 0100 UTC and building and checking that.
The original bug I reported in the PR is still there, along with the
slow 'burncd fixate' and never-ending 'burncd blank' problems talked
about on -stable.

Applying the patch in the original PR fixes the multisession burn
problem, at least :)

I'll check the last snapshot of CURRENT and see what that does.  I
expect it'll have the same problem; I'll report if it behaves
differently from 6_RELENG.

Scripts attached.

  --jh
Comment 6 John Hood 2006-12-28 05:13:40 UTC
On Wed, Dec 27, 2006 at 10:56:42PM -0500, John Hood wrote:
> I'll check the last snapshot of CURRENT and see what that does.  I
> expect it'll have the same problem; I'll report if it behaves
> differently from 6_RELENG.

On the 20061105 snapshot, I get the same behavior, plus this kernel printf:

  Nov  5 20:44:04  kernel: acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x11 ascq=0x05

when 'burncd -m data file fixate' or 'burncd msinfo' exit (but not
when typing ^C at 'burncd blank', IIRC).  Both the 6-stable test and
this test are on a Dell Latitude D610 with a DVD/CD-RW combo drive,
dmesg attached.

I didn't try patching it yet.  I could also try testing it on the
machine that I did the original PR on, if that's desired.

  --jh
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2008-03-02 02:51:39 UTC
State Changed
From-To: feedback->open

Note that feedback was received some time ago.
Comment 8 Remko Lodder freebsd_committer freebsd_triage 2011-02-24 16:23:31 UTC
Responsible Changed
From-To: remko->mav

Hi mav@ can you have a look please?
Comment 9 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:21 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 10 Alex Kozlov freebsd_committer freebsd_triage 2018-02-18 07:25:48 UTC
The burncd(8) was removed after import of new ata stack.