Bug 454067 - Changing cd stops sound juicer working.
Changing cd stops sound juicer working.
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ConsoleKit (Show other bugs)
9
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: David Zeuthen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-04 05:19 EDT by Wes Armour
Modified: 2013-03-05 22:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-14 11:12:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wes Armour 2008-07-04 05:19:21 EDT
Description of problem:

If I boot my machine with a audio cd in the cdrom I can then launch sound juicer
and rip the cd (to ogg vorbis).
If I then try to change the cd sound juicer can't get a lock on the cdrom...
(I've cut repeted attempts to access the cdrom out so this isn't thousands of
lines long!)

~~~~~~~~~~~~~~~~~~~~~~~~~~~ cli output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ sound-juicer 

** (sound-juicer:3506): WARNING **: Could not lock drive: Extracting audio from CD
Error trying to open /dev/sg0 exclusively (Permission denied). retrying in 1 second.

Error trying to open /dev/sga exclusively (No such file or directory). retrying
in 1 second.

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

If I look at what device cdrom and cdrw are linked to I find...

~~~~~~~~~~~~~~~~~~~~~~~~~~~ cli output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ ll /dev/cdr*
lrwxrwxrwx 1 root root 3 2008-07-04 09:35 /dev/cdrom -> sr0
lrwxrwxrwx 1 root root 3 2008-07-04 09:35 /dev/cdrw -> sr0

$ ll /dev/sr0 
brw-r-----+ 1 root disk 11, 0 2008-07-04 09:35 /dev/sr0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now I look at who is using the device.....
~~~~~~~~~~~~~~~~~~~~~~~~~~~ cli output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ /sbin/fuser -v /dev/cdr*
                     USER        PID ACCESS COMMAND
/dev/cdrom:          wa78       3441 f.... gvfsd-cdda
/dev/cdrw:           wa78       3441 f.... gvfsd-cdda

$ /sbin/fuser -v /dev/sr0
                     USER        PID ACCESS COMMAND
/dev/sr0:            ****       3441 f.... gvfsd-cdda
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


So I Try to launch sound juicer and tell it to use /dev/sr0 and I get...
~~~~~~~~~~~~~~~~~~~~~~~~~~~ cli output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ sound-juicer --device=/dev/sr0 

** (sound-juicer:3540): WARNING **: Could not lock drive: Extracting audio from CD
Error trying to open /dev/sg0 exclusively (Permission denied). retrying in 1 second.

etc.....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have a feeling that this is due to sound-juicer and gnomevfs....
~~~~~~~~~~~~~~~~~~~~~~~~~~~ cli output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ gnomevfs-df 
Volume          Free space
/scratch            42.0 GB (45078933504)
/                   9.4 GB (10059841536)
/boot               437.9 MB (459125760)
/sys/fs/fuse/connections 0 bytes (0)
/selinux            0 bytes (0)
/home/wa78/.gvfs    9.4 GB (10059841536)
/dev/shm            2.9 GB (3104829440)
/dev                2.9 GB (3104714752)
/                   9.4 GB (10059841536)
Drives:
	file:///scratch	/dev/md2	124.5 GB Volume
			/dev/fd0	Floppy Drive
	cdda:///dev/sr0	/dev/sr0	CD-RW/DVD±RW Drive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've tried to make sound-juicer access /dev/sr0 via cdda:///dev/sr0 but it
doesn't like it one bit.

I'm at at a loss as to how to fix this. Any ideas????

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

$ rpm -q kernel
kernel-2.6.25.6-55.fc9.x86_64
kernel-2.6.25.9-76.fc9.x86_64

$ rpm -q sound-juicer
sound-juicer-2.22.0-3.fc9.x86_64

How reproducible:

Every time.

Steps to Reproduce:
1. Boot machine with audio cd. 
2. Rip cd (all well and good :-)
3. Change cd
4. Try to Rip new cd.
5. Sound juicer dies :-(
  
Actual results:
No oggs.

Expected results:
new oggs.

Additional info: None.
Comment 1 Tom Hughes 2008-07-04 09:06:44 EDT
This was happening to me as well and I eventually worked out that it was because
gvfs-fuse-daemon wasn't running.

The reason why it was failing to start was that I had an old broken .gvfs fuse
mount in my home directory. Unmounting that with "fusermount -u ~/.gvfs" and
logging in again got gvfs-fuse-daemon running and made sound juicer happy.
Comment 2 Tom Hughes 2008-07-04 09:39:01 EDT
Looks like I spoke too soon - that did get it working for me but only for one CD
like you. Each time I login the current CD can be ripped but no more.
Comment 3 Bastien Nocera 2008-07-04 10:02:04 EDT
Try running:
gvfs-mount -u cdda:///dev/sr0
on the command-line, after having inserted the second CD.

If that works, then it's a dupe of bug 452313.
Comment 4 Tom Hughes 2008-07-04 10:17:05 EDT
Doesn't seem to help no, in fact it complains it isn't mounted:

vauxhall [~] % gvfs-mount -u cdda:///dev/sr0
Error finding enclosing mount: The specified location is not mounted

Listing the mounts would appear to agree:


vauxhall [~] % gvfs-mount -l
Drive(0): CD-RW/DVD±RW Drive
  Volume(0): Audio Disc
    Mount(0): Audio Disc -> cdda://sr0/
Drive(1): USB Drive
  Volume(0): data
    Mount(0): data -> file:///media/data
Drive(2): CompactFlash Drive
Drive(3): USB Drive
Comment 5 Bastien Nocera 2008-07-04 10:29:08 EDT
That should have been:
gvfs-mount -u cdda://sr0/
Comment 6 Wes Armour 2008-07-04 10:30:47 EDT
I get the same error but it appears my drive is mounted.....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ gvfs-mount -u cdda:///dev/sr0
Error finding enclosing mount: The specified location is not mounted
[wa78@localhost ~]$ gnomevfs-df 
Volume          Free space
/scratch            41.9 GB (44983693312)
/                   9.3 GB (10020229120)
/boot               437.9 MB (459125760)
/sys/fs/fuse/connections 0 bytes (0)
/selinux            0 bytes (0)
/home/wa78/.gvfs    9.3 GB (10020229120)
/dev/shm            2.9 GB (3104829440)
/dev                2.9 GB (3104714752)
/                   9.3 GB (10020229120)
Drives:
	file:///scratch	/dev/md2	124.5 GB Volume
			/dev/fd0	Floppy Drive
	cdda:///dev/sr0	/dev/sr0	CD-RW/DVD±RW Drive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I also find that using fusermount -u ~/.gvfs and logging out and back in again
seems to fix it for just one cd, as soon as I try to change the cd sound juicer
locks up again :-(
Comment 7 Wes Armour 2008-07-04 10:34:25 EDT
Nope, sorry that one doesn't work for me, thanks for trying though :-)

$ gvfs-mount -u cdda://sr0/
Error finding enclosing mount: The specified location is not mounted

$ gnomevfs-df 
Volume          Free space
/scratch            41.9 GB (44983693312)
/                   9.3 GB (10020196352)
/boot               437.9 MB (459125760)
/sys/fs/fuse/connections 0 bytes (0)
/selinux            0 bytes (0)
/home/wa78/.gvfs    9.3 GB (10020196352)
/dev/shm            2.9 GB (3104829440)
/dev                2.9 GB (3104714752)
/                   9.3 GB (10020196352)
Drives:
        file:///scratch /dev/md2        124.5 GB Volume
                        /dev/fd0        Floppy Drive
        cdda:///dev/sr0 /dev/sr0        CD-RW/DVD±RW Drive
Comment 8 Tom Hughes 2008-07-04 10:44:37 EDT
That command does work in as much as it unmounts it without error, but it
doesn't help sound juicer at all.
Comment 9 Bastien Nocera 2008-07-04 10:48:12 EDT
Stop using gnomevfs-df to list the drives. Use gvfs-mount -l, otherwise
gnome-vfs will open the drive, and lock the device again, which is what we're
trying to avoid.
Comment 10 Wes Armour 2008-07-04 11:05:21 EDT
Ooops, Sorry, I didn't realise.

Ok so I've tried...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ gvfs-mount -u cdda://sr0/
Error finding enclosing mount: The specified location is not mounted

$ gvfs-mount -l
Drive(0): Floppy Drive
Drive(1): CD-RW/DVD±RW Drive
  Volume(0): Audio Disc

$ fusermount -u ~/.gvfs

$ gvfs-mount -l
Drive(0): Floppy Drive
Drive(1): CD-RW/DVD±RW Drive
  Volume(0): Audio Disc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

None of them seem to work. I don't understand why sound-juicer is trying to
access /dev/sg0 when gnomevfs-df (I promise I wont do it again) lists
cdda:///dev/sr0 /dev/sr0 ???
Comment 11 Bastien Nocera 2008-07-04 11:20:57 EDT
(In reply to comment #10)
<snip>
> None of them seem to work. I don't understand why sound-juicer is trying to
> access /dev/sg0 when gnomevfs-df (I promise I wont do it again) lists
> cdda:///dev/sr0 /dev/sr0 ???

That'd be because /dev/sr0 is the drive, /dev/sg0 is the generic SCSI interface
needed for CDDA access.

What's the outputs of those commands (run as root):
fuser /dev/sr0
fuser /dev/sg0
Comment 12 Tom Hughes 2008-07-04 11:39:27 EDT
I put the CD in and ran those and got:

vauxhall [~] % sudo fuser /dev/sr0
/dev/sr0:             3537  4683
vauxhall [~] % sudo fuser /dev/sg0

then unmounted:

vauxhall [~] % gvfs-mount -u cdda://sr0/

and got:

vauxhall [~] % sudo fuser /dev/sr0      
/dev/sr0:             3537
vauxhall [~] % sudo fuser /dev/sg0      

Process 3537 is rhythmbox, which is also trying to look at the CD and having
problems. Killing it makes no difference though.

One thing I did just notice is that /dev/sr0 has an ACL allowing me access, but
/dev/sg0 does not, which would explain why sound juicer and rhythmbox are
getting permission denied trying to access ag0. I assume PolicyKit installed the
ACL on the sr0 device?
Comment 13 Wes Armour 2008-07-04 11:41:35 EDT
Without sound-juicer running I get...
[root@localhost ~]# fuser /dev/sr0
[root@localhost ~]# fuser /dev/sg0
i.e. they return nothing.

If I run sound juicer I get nothing until I hit the extract button. Then I get...
** (sound-juicer:4590): WARNING **: Could not lock drive: Extracting audio from CD
# fuser /dev/sg0
[root@localhost ~]# fuser /dev/sr0
/dev/sr0:             4590

So the face the it will rip a cd as root make me think there might be some
permission issues somewhere???
Comment 14 Tom Hughes 2008-07-04 11:45:13 EDT
If I add write permission to sg0 though, then it just complains about /dev/sga
instead, which doesn't even exist...
Comment 15 Steve Hall 2008-07-04 23:58:42 EDT
I just learned that I can fix these symptoms after inserting the new disk simply
with:
  chmod g+w /dev/sr0

My machine only has one drive, a CD/DVD-RW. Does this help anybody?
Comment 16 Raina Otoni 2008-07-05 22:31:23 EDT
(In reply to comment #15)
> I just learned that I can fix these symptoms after inserting the new disk simply
> with:
>   chmod g+w /dev/sr0
> 
> My machine only has one drive, a CD/DVD-RW. Does this help anybody?

Thanks, Sound Juicer seems to work.
Comment 17 Steve Hall 2008-07-19 20:51:21 EDT
Can we bump severity from low to normal? Permissions related to cd devices is
broken here (not just Sound Juicer, same in grip). Cryptic command line
permission changes (as root/sudo) does not a userland workaround make, this is
something more systemic.
Comment 18 Bug Zapper 2009-06-09 21:54:49 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 19 Bug Zapper 2009-07-14 11:12:26 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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