Close session failed when burning 25gb blu-ray disc

Bug #1113679 reported by Richard Bilonick
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dvd+rw-tools (Debian)
Fix Released
Unknown
dvd+rw-tools (Ubuntu)
Fix Released
Low
Unassigned
Trusty
Won't Fix
Low
Unassigned
Utopic
Won't Fix
Low
Unassigned

Bug Description

[Impact]
 * All users of growisofs (including users of frontends like k3b) get a spurious IO error at the end of writing a blu-ray BD-R medium
 * The fix is very simple and just a single line, details in http://lists.alioth.debian.org/pipermail/debburn-devel/2013-June/000924.html

[Test Case]
 * you need a blu-ray BD-R medium and e.g. k3b
 * create a data project with e.g. 22GB
 * write using a blank BD-R
 * observe a IO error at the end of the write (the disc is fine though)

 * install growisofs from -updates
 * repeat the test and verify that there is no write error this time
 * bonus points for checking "verify written data" in the burn dialog of k3b

[Regression Potential]
 * its already showing a IO error at the end, its unlikely that the patch makes it worse

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

I create an image burn and then try to use growisofs to burn it to a 25GB blu-ray recordable disc using Ubuntu 13.04 (64-bit).

rick@rick-CT14:~/Downloads$ lsb_release -rd
Description: Ubuntu Raring Ringtail (development branch)
Release: 13.04
rick@rick-CT14:~/Downloads$ apt-cache policy growisofs
growisofs:
  Installed: 7.1-10build1
  Candidate: 7.1-10build1
  Version table:
 *** 7.1-10build1 0
        500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status

I expected to burn a blu-ray 25GB disc without error messages and without corrupted files. I get a "close session failed" error message with posssibly corrupted files. Even if the files aren't corrupted, it is disconcerting.

I followed the procedure outlined by Steve Litt: http://www.troubleshooters.com/linux/blu-ray-backup.htm

# Create empty file
truncate --size=24GB mybr2.udf

# Create udf file system
mkudffs mybr2.udf

# Mount file system
sudo mount -oloop,rw mybr2.udf /mnt/test

# Change ownership
sudo chown rick.rick /mnt/test

# Copy files into the mounted file system

# Unmount file system
sudo umount /dev/loop1

Everything above works as expected without problems.

# Burn to blank blu ray (25GB) empty disc
growisofs -speed=4 -Z /dev/sr0=mybr2.udf

Here is the key part at the end:

23549509632/24000000000 (98.1%) @1.7x, remaining 0:55 RBU 100.0% UBU 62.9%
23579131904/24000000000 (98.2%) @2.0x, remaining 0:52 RBU 100.0% UBU 59.7%
23603773440/24000000000 (98.3%) @1.6x, remaining 0:49 RBU 100.0% UBU 60.8%
23631527936/24000000000 (98.5%) @1.9x, remaining 0:45 RBU 100.0% UBU 59.7%
23658037248/24000000000 (98.6%) @1.8x, remaining 0:42 RBU 100.0% UBU 61.8%
23682940928/24000000000 (98.7%) @1.7x, remaining 0:39 RBU 99.9% UBU 57.5%
23712301056/24000000000 (98.8%) @2.0x, remaining 0:35 RBU 100.0% UBU 65.1%
23736418304/24000000000 (98.9%) @1.6x, remaining 0:32 RBU 100.0% UBU 60.8%
23765581824/24000000000 (99.0%) @1.9x, remaining 0:28 RBU 100.0% UBU 60.8%
23790682112/24000000000 (99.1%) @1.7x, remaining 0:25 RBU 100.0% UBU 61.8%
23820435456/24000000000 (99.3%) @2.0x, remaining 0:22 RBU 100.0% UBU 57.5%
23844945920/24000000000 (99.4%) @1.6x, remaining 0:19 RBU 100.0% UBU 59.7%
23872045056/24000000000 (99.5%) @1.8x, remaining 0:15 RBU 100.0% UBU 53.2%
23899209728/24000000000 (99.6%) @1.8x, remaining 0:12 RBU 100.0% UBU 66.1%
23924441088/24000000000 (99.7%) @1.7x, remaining 0:09 RBU 100.0% UBU 43.5%
23953473536/24000000000 (99.8%) @1.9x, remaining 0:05 RBU 100.0% UBU 60.8%
23979655168/24000000000 (99.9%) @1.7x, remaining 0:02 RBU 59.0% UBU 45.7%
builtin_dd: 11718752*2KB out @ average 1.8x4390KBps
/dev/sr0: flushing cache
/dev/sr0: closing track
/dev/sr0: closing session
:-[ CLOSE SESSION failed with SK=5h/INVALID FIELD IN CDB]: Input/output error
/dev/sr0: reloading tray
rick@rick-CT14:/media/rick/video$

The resulting blu-ray disc has the same total number of bytes as the file system. I haven't found any bad files on the disc. I've tried using k3b which "sort of" works but also has problems closing the disc (and in some cases some files are corrupted or bad). I've used the demo version of Nero for Linux on the same system - it creates a blu-ray disc without reporting any errors or problems. I'd rather not have to depend on proprietary software.

Tags: bd-r blu-ray
Revision history for this message
Richard Bilonick (rabil) wrote :

The first line should be: I created an image to burn and then ...

Revision history for this message
Richard Bilonick (rabil) wrote :

Ubuntu doesn't seem interested in this bug (it's been around for a long time apparently) and I've noticed other people reporting the same bug. Nero Linux seems to have its own problems (can't seem to write dual layer DVDs and can't handle upper and lower case correctly for blu-ray using UDF (and Nero apparently has no intentions of fixing this or making any changes or improvements to the Linux version of Nero EVER - so why buy Nero Linux?)

My work-around is to use xorriso using "-as cdrecord" argument. There is a simple example included in the man page that seems to work with any media. I've used xorriso to burn dual layer DVDs and 25 GB blu-ray UDF images. (Nero Linux, as mentioned above, does not handle UDF for unix/linux correctly - it complains if you have names that would be the same except for case.) xorriso burns the UDF image (which I create first using mkudffs as illustrated above) without any error or warning messages. And I have checked the discs and can't find any problems with them.

I'm not sure why burning blu-ray discs is such a mystery on Ubuntu and Linux in general. It's difficult (if not impossible) to find clear, easy to understand examples on the web. If someone knows a good tutorial I would love to see it. I also don't understand why growisofs is not fixed. xorriso seems to be currently worked on.

The only problem with using xorriso with "-as cdrecord" is that it seems to only accept cdrecord options and I haven't found a way to given a volume id to the disc. It always labels the disc as "Linux UDF" (which I can live with). xorriso has a "-volid" option but it doesn't work with "-as cdrecord".

Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,

thank you for flying xorriso.

The growisofs bug is indeed well known. It was announced several
years ago to become fixed in the next release. Regrettably that
release never happened. Currently growisofs seems unmaintained.
Much of its knowledge was pulled into libburn, though, which
xorriso is using for burning optical media.

> The only problem with using xorriso with "-as cdrecord" is
> that it seems to only accept cdrecord options and I haven't
> found a way to given a volume id to the disc. It always labels
> the disc as "Linux UDF" (which I can live with). xorriso has
> a "-volid" option but it doesn't work with "-as cdrecord".

The volume id is a property of the filesystem, not of the
optical medium. xorriso command -volid (or -as mkisofs -V)
would set such an id, but it would produce an ISO 9660
filesystem rather than an UDF.

So you will probably have to use mkudffs option --vid= and/or
--lvid= to replace the default text "Linux UDF". I don't know
which of both would show up with e.g. Linux mount. Maybe you
even have to set the desired id by --fsid=, too.

Have a nice day :)

Thomas

Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,

after re-reading this diagnosis of the problem by the
author of growisofs
  http://lists.debian.org/cdwrite/2008/07/msg00092.html
i developed a theory.
For details see
  http://lists.alioth.debian.org/pipermail/debburn-devel/2013-June/000924.html

I do not want to use up a blank BD-R for growisofs experiments
(selfish as i am).
So the open question is whether this tiny patch prevents the
inappropriate attempt to execute that CLOSE SESSION command:

--- growisofs_mmc_orig.cpp 2013-06-14 19:53:51.000000000 +0200
+++ growisofs_mmc.cpp 2013-06-14 19:55:25.000000000 +0200
@@ -756,6 +756,8 @@ static void bd_r_format (Scsi_Command &c

     wait_for_unit (cmd);

+ bdr_plus_pow = 1;
+
     cmd[0] = 0x35; // FLUSH CACHE
     cmd[9] = 0;
     cmd.transport();

Maybe some Ubuntu expert can convert the patch into an end-user-ready
Ubuntu thingy and maybe some end-user is willing to give it a try
when the next BD-R is about to be written.

Have a nice day :)

Thomas

Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,

Frank Griffin reports in
  http://lists.alioth.debian.org/pipermail/debburn-devel/2013-June/000928.html
that my proposed change in growisofs_mmc.cpp indeed silences
the error message at the end of growisofs BD-R writing.

Have a nice day :)

Thomas

affects: dvd+rw-tools (Ubuntu) → ubuntu
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
affects: ubuntu → dvd+rw-tools (Ubuntu)
Revision history for this message
Federico Tello Gentile (federicotg) wrote :
Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Another workaround is to format the BD-R before use by growisofs,
or to use growisofs option
  -use-the-force-luke=spare:none

Whatever, is it so hard for Ubuntu to fix its dvd+rw-tools package ?
Like Fedora did ?

Michael Vogt (mvo)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dvd+rw-tools - 7.1-10ubuntu1

---------------
dvd+rw-tools (7.1-10ubuntu1) vivid; urgency=medium

  * debian/patches/10-blue-ray-bug713016.patch:
    - apply patch from Thomas Schmitt to fix in session closing
      on blue ray (closes: #713016), LP: #1113679
 -- Michael Vogt <email address hidden> Thu, 19 Feb 2015 12:34:23 +0100

Changed in dvd+rw-tools (Ubuntu):
status: Confirmed → Fix Released
Michael Vogt (mvo)
Changed in dvd+rw-tools (Ubuntu Trusty):
status: New → In Progress
Changed in dvd+rw-tools (Ubuntu Utopic):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Richard, or anyone else affected,

Accepted dvd+rw-tools into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dvd+rw-tools/7.1-10ubuntu0.14.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Changed in dvd+rw-tools (Ubuntu Utopic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Richard, or anyone else affected,

Accepted dvd+rw-tools into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dvd+rw-tools/7.1-10ubuntu0.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in dvd+rw-tools (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Federico Tello Gentile (federicotg) wrote :
tags: added: verification-failed
removed: verification-needed
Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,

i got the growisofs log of K3b in a mail of 1.3 MB
  From: Federico Tello Gentile <email address hidden>
which does not show up here.

The growisofs run failed with:

> :-[ WRITE@LBA=b47400h failed with SK=5h/END OF USER AREA ENCOUNTERED ON THIS TRACK]: Input/output error

This is a related but different bug
  https://bugs.launchpad.net/ubuntu/+source/dvd+rw-tools/+bug/1424215

Remedy (again):

Circumvent the error inducing auto-formatter by formatting
the medium before applying growisofs resp. K3B.

  dvd+rw-format /dev/sr1

Have a nice day :)

Thomas

Mathew Hodson (mhodson)
Changed in dvd+rw-tools (Ubuntu):
importance: Undecided → Low
Changed in dvd+rw-tools (Ubuntu Trusty):
importance: Undecided → Low
Changed in dvd+rw-tools (Ubuntu Utopic):
importance: Undecided → Low
status: Fix Committed → Won't Fix
tags: added: verification-needed
removed: verification-failed
Changed in dvd+rw-tools (Debian):
status: Unknown → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Proposed package removed from archive

The version of dvd+rw-tools in the proposed pocket of Trusty that was purported to fix this bug report has been removed because the bugs that were to be fixed by the upload were not verified in a timely (105 days) fashion.

Changed in dvd+rw-tools (Ubuntu Trusty):
status: Fix Committed → Won't Fix
tags: removed: verification-needed
Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,
i am somewhat confused. The fix is part of Debian's packaging
https://sources.debian.net/src/dvd%2Brw-tools/7.1-11/debian/patches/10-blue-ray-bug713016.patch/
(It is theoretically well understood and clearly correct.)

So why can't it stay in Ubuntu ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.