Bug 566581 - blkid appears to break CD-R burning
blkid appears to break CD-R burning
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-02-18 16:22 EST by nayfield
Modified: 2010-04-19 06:22 EDT (History)
4 users (show)

See Also:
Fixed In Version: udev-145-20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 566535
Last Closed: 2010-04-19 06:22:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description nayfield 2010-02-18 16:22:57 EST
Running blkid on a CD/DVD recorder while burning a disc kills the burn.

Unfortunately udev runs blkid automatically when burning starts, this effectively makes it impossible to burn CD or DVDs.  

+++ This bug was initially created as a clone of Bug #566535 +++

Description of problem:

By default, up-to-date F12 x86_64 installation can't burn on SATA burner.  A new burner was purchased and same result.

Version-Release number of selected component (if applicable):


How reproducible:

Always, 100%.  

Also, killing udevd fixes the problem 100%

Steps to Reproduce:
1. Attempt to burn CD with brasero (may be sata specific)
Actual results:

from running wodim by hand:
Performing OPC...
Sending CUE sheet...
SAO startsec: -11607
Writing lead-in...
Errno: 5 (Input/output error), write_g1 scsi sendcmd: no error
CDB:  2A 00 FF FF FB 49 00 02 8A 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 2A 00 00 80 30 05 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x30 Qual 0x05 (cannot write medium - incompatible format) Fru 0x0
Sense flags: Blk 0 (not valid) 
cmd finished after 0.006s timeout 200s
write CD-Text data: error after 998400 bytes
wodim: Could not write Lead-in.
Writing  time:   18.527s
wodim: fifo had 255 puts and 0 gets.
wodim: fifo was 0 times empty and 0 times full, min fill was 100%.

Expected results:

no sense errors

Additional info:

* `sudo killall udevd` and then repeating the command will succeed.

* commenting out all lines in 70-persistent-cd.rules

My theory is that udev is acting on the kernel uevent that happens when brasero starts to write, and somehow impacts the system

--- Additional comment from rod@nayfield.com on 2010-02-18 13:49:25 EST ---

Created an attachment (id=394964)
Run with udevd killed

--- Additional comment from rod@nayfield.com on 2010-02-18 14:00:13 EST ---

Created an attachment (id=394968)
commented log from udevadm monitor --udev --property --kernel

--- Additional comment from rod@nayfield.com on 2010-02-18 14:03:51 EST ---

Looking at udev rules I do see that everything gets passed to hal.

However, the issue still occurs after `service haldaemon stop`

--- Additional comment from rod@nayfield.com on 2010-02-18 14:12:54 EST ---

it has to do with 60-cdrom_id.rules.

It seems that cdrom_id runs against the cd burner at the point where burning starts in the udev log I attached.

I can burn CDs / DVDs by creating an empty file with this name in /etc/udev/rules.d

--- Additional comment from rod@nayfield.com on 2010-02-18 15:56:01 EST ---

digging around with systemtap it seems there are several things that open /dev/sr0 while wodim is burning.

I then disabled 60-persistent-storage.rules and ran them during burns to see what was causing the problem.


Things that come from udev which read from sr0 that don't honor O_EXCL:
 blkid - kills burns instantly
 devkit-disks-part-id - kills burns instantly
 cdrom_id - doesn't kill burns
 scsi_id - doesn't kill burns

hald-addon-storage opens sr0 every second or so but uses O_EXCL and thus doesn't interfere.
Comment 1 Harald Hoyer 2010-04-19 06:21:24 EDT
with recent udev versions, cdrom_id uses O_EXCL, and blkid will not run, if cdrom_id was blocked and does not report ID_CDROM_MEDIA=1  

Comment 2 Harald Hoyer 2010-04-19 06:22:21 EDT
sry. of course:   http://admin.fedoraproject.org/updates/udev-145-20.fc12

Note You need to log in before you can comment on or make changes to this bug.