Cannot scan availables devices

Bug #2765 reported by Loic Pefferkorn
30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cdrdao (Ubuntu)
Fix Released
Medium
Ubuntu Burning Team

Bug Description

Cannot use scanbus option to see available devices

Since version 1:1.1.9-3ubuntu3, I cannot scan for availables drives :

$ sudo cdrdao scanbus
Cdrdao version 1.1.9 - (C) Andreas Mueller <email address hidden>
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Device or resource busy)... retrying in 1 second.

using previous cdrdao version (cdrdao_1.1.9-3ubuntu2) it works :
$ sudo cdrdao scanbus
Cdrdao version 1.1.9 - (C) Andreas Mueller <email address hidden>
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

ATA:1,0,0 PLEXTOR , CD-R PX-W4824A, 1.03
ATA:1,1,0 PIONEER , DVD-ROM DVD-106 , 1.22

The problem seems to come from :
-scsilib/libscp:
     - applied O_EXCL patch from cdrecord (debian, closes: #272646)

But I still can use devices using ATAPI driver :
$ cdrdao read-cd --read-raw --datafile demo44.bin --device ATAPI:/dev/hdd --driver generic-mmc-raw demo44.toc

Tags: patch
Loic Pefferkorn (loic)
description: updated
summary: + Cannot use scanbus option to see available devices
Changed in cdrdao:
assignee: nobody → motu
Revision history for this message
Stephan Rügamer (sruegamer) wrote :

The changelog of current cdrdao (-3ubuntu3):

cdrdao (1:1.1.9-3ubuntu3) breezy; urgency=low

  * dao/main.cc:
    - use "/dev/cdrw" as default (like cdrecord) (malone #1528)
    - unlock drive in "copy" if src == dst
  * scsilib/libscp:
    - applied O_EXCL patch from cdrecord (debian, closes: #272646)

 -- Michael Vogt <email address hidden> Wed, 28 Sep 2005 13:31:45 +0200

There must be another bug...investigate

Revision history for this message
Ante Karamatić (ivoks) wrote :

Hm.. All fine here.

Revision history for this message
Loic Pefferkorn (loic) wrote :

On my desktop: errors and nothing
On my laptop: errors and drives listed

try to find why...

Revision history for this message
Kåre Hviid (ukh) wrote :

This will happen if you have a live filesystem mounted on say /dev/hda,
which is quite reasonable. Also, during "scanbus", it appears libscg
expects to be able to open all devices. A quick'n'dirty approach to this
might be to only attempt sg_open_excl in the "openbydev" code paths and
avoid it in the device scans, but that isn't very clever.

Another way to go about it, which really isn't too good either, is to
relax sg_open_excl() a little. A proper solution should probably make either sg_open_excl() and/or libscg a bit more intelligent.

Since I'm unable to attach patches in this forum I have sent one that
appears to fix this issue for now by mail directly to Michael Vogt.

Revision history for this message
Kåre Hviid (ukh) wrote : Dirty fix for O_EXCL problems

Dirty fix for O_EXCL problems, c.f. my previous post.

Revision history for this message
Jo Shields (directhex) wrote :

This bug also affects cdda2wav, cdrecord (and presumably other apps based on the same code base)

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=360295 for more detail, and a functional patch

Revision history for this message
Rocco Stanzione (trappist) wrote :

No activity on this bug for some time, but I can confirm the problem on Edgy.

Changed in cdrdao:
status: Unconfirmed → Confirmed
Changed in cdrdao:
assignee: motu → ubuntu-burning
Revision history for this message
Eduard Bloch (edi-gmx) wrote :

The problem was only partially solved with 360295. A fix in the libscg of cdrkit-1.0pre5 has a better solution, no more stupid locking and looping over unavailable devices.

Revision history for this message
wing (wingsuit) wrote :

Having the same problem in Edgy. Even root couldn't write CDs. But it seems something (gnome?) is mounting blank images as well ( /dev/hdc on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev) ), thus umount /dev/yourcdrwdevice fixed a problem for me.

:~$ uname -a
Linux erik-lap 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006 i686 GNU/Linux

:~$ cdrecord --version
Cdrecord-Clone 2.01.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2005 Joerg Schilling

Revision history for this message
Conrad Knauer (atheoi) wrote :

directhex wrote: "This bug also affects cdda2wav, cdrecord (and presumably other apps based on the same code base)"

If I'm not mistaken, I ran across this bug last night while trying to use gcdmaster (it causes a long pause before it runs) in Feisty. Today I did a clean boot and here's the output from Terminal:

---
$ gcdmaster
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/hda exclusively (Permission denied)... retrying in 1 second.
----

But it does eventually start (last night there were ~30 of the 1 second retries!)

Revision history for this message
ttoine (ttoine) wrote :

I confirm that it works with some apps like serpentine, but i have the bug with gcdmaster, so impossible to burn. (Feisty)

Revision history for this message
Ross Campbell (ross-campbell) wrote :

I can confirm that cdrdao as shipped or available for hardy heron for X64 continues to exhibit this problem of providing repeated 1 second error messages and then bombs out.

I built cdrdao-1.2.2 from sources and it did *not* have this problem. I'm guessing the packages versions are linking with an older libschily or something...

Revision history for this message
Eric Hedekar (stochastic) wrote :

I can confirm this bug on Intrepid, it's been around since 2005!!

Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.
Error trying to open /dev/sg0 exclusively (Permission denied)... retrying in 1 second.

It does eventually start, but can't we fix this?

Revision history for this message
Schily (schilling-fokus) wrote :

This is not the original cdrdao but a hacked and defective one.

The original libscg does not try to use O_EXCL as this is a design bug
in hald that prevents libscg to get access in many cases.

You may try the original cdrdao (compiled from original sources) or cdrtools.

cdrecord.berlios.de
ftp://ftp.berlios.de/pub/cdrecord/alpha/

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

This is fixed for karmic.

Changed in cdrdao (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
shingarov (shingarov) wrote :

In Karmic, I still can not use cdrdao to burn CDs because the blank CD will automatically get mounted on /media/cdrom0. This is not related to cdrdao of course, but I would be glad to see this behavior gone (is this hal? gnome?)

Revision history for this message
Ben Hutchings (benh-debian) wrote :

Stefan: This cannot possibly have been fixed in karmic because 05-excl.patch is still applied. Reopening.

Changed in cdrdao (Ubuntu):
status: Fix Released → Confirmed
tags: added: patch
Revision history for this message
Nigel Babu (nigelbabu) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner.
There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test the current Ubuntu development version (10.10). If you can test it, and it is still an issue, we would appreciate if you could upload updated logs that are relevant for this particular issue.

Changed in cdrdao (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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