Bug 207177 - handles CD change badly
Summary: handles CD change badly
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-vfs2
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-19 20:24 UTC by Bill Nottingham
Modified: 2014-03-17 03:02 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-03-05 15:02:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
CD device entry (2.94 KB, text/plain)
2007-02-21 19:37 UTC, Bill Nottingham
no flags Details

Description Bill Nottingham 2006-09-19 20:24:49 UTC
Description of problem:

When I manually switch CDs without using the UI, gnome-cd does not
really cope well at all - it either then errors, or leaves the
old CDDB info up, etc.

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

2.16.1-2.fc6

How reproducible:

Every time

Steps to Reproduce:
1. play cd
2. switch cd
3. attempt to play again

Comment 1 Bastien Nocera 2007-02-21 18:45:10 UTC
Switch CD, how?

That probably means that HAL isn't picking up that the CD changed. Does the
audio CD appear/disappear from the desktop?

Comment 2 Bill Nottingham 2007-02-21 19:09:10 UTC
Right click on desktop icon, choose 'eject'.

The desktop icon remains, gnome-cd still tries to play, etc.


Comment 3 David Zeuthen 2007-02-21 19:16:10 UTC
(In reply to comment #2)
> Right click on desktop icon, choose 'eject'.
> 
> The desktop icon remains, gnome-cd still tries to play, etc.

This sounds like either a gnome-vfs bug or a hal bug. Does hal notice the device
go away? lshal --monitor is your friend here...


Comment 4 Bill Nottingham 2007-02-21 19:22:12 UTC
[notting@nostromo: ~]$ lshal  --monitor

Start monitoring devicelist:
-------------------------------------------------

<insert CD #1>

storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true
volume_part_1_size_357697536 added

<right click, eject>
... silence ...

<insert CD #2>

... silence ...

<hit eject button on drive>

storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = false
volume_part_1_size_357697536 removed

<insert CD #2 again>

storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true
storage_model_UJDA745_DVD/CDRW property storage.removable.media_size = 640739328
(0x2630e800)


Comment 5 David Zeuthen 2007-02-21 19:31:09 UTC
(In reply to comment #4)
> <insert CD #1>
> 
> storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true
> volume_part_1_size_357697536 added
> 
> <right click, eject>
> ... silence ...

Try doing 'gnome-mount -t -v -e /dev/cdrom' and post the output?
Wait. Did the disc pop out?

> <insert CD #2>
> 
> ... silence ...
>
> <hit eject button on drive>
> 
> storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = false
> volume_part_1_size_357697536 removed



> 
> <insert CD #2 again>
> 
> storage_model_UJDA745_DVD/CDRW property storage.removable.media_available = true
> storage_model_UJDA745_DVD/CDRW property storage.removable.media_size = 640739328
> (0x2630e800)
> 

Something is wrong here. I'll try to reproduce it. Also, please attach output of
'lshal --long --show storage_model_UJDA745_DVD/CDRW'. Thanks.


Comment 6 David Zeuthen 2007-02-21 19:36:42 UTC
Also, please try to reproduce with with gnome-cd uninstalled or moved out of the
way.

Comment 7 Bill Nottingham 2007-02-21 19:37:32 UTC
Created attachment 148528 [details]
CD device entry

$ lshal --long --show storage_model_UJDA745_DVD/CDRW
lshal.c 186 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was not set.

Assuming the attached is what you want.

Comment 8 Bill Nottingham 2007-02-21 19:42:41 UTC
Seems to work with gnome-cd killed.

$ gnome-mount -t -v -e -d /dev/cdrom
gnome-mount 0.5
Resolved device file /dev/cdrom -> /dev/scd0
libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was
not set.
** (gnome-mount:10456): DEBUG: Ejecting
/org/freedesktop/Hal/devices/volume_part_1_size_357697536
** (gnome-mount:10456): DEBUG: in unmount_done : user_data = 0x0
Ejected /dev/scd0

and lshal --monitor shows it.

When gnome-cd is running:

$  gnome-mount -t -v -e -d /dev/cdrom
gnome-mount 0.5
Resolved device file /dev/cdrom -> /dev/scd0
libhal-storage.c 1401 : INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was
not set.
** (gnome-mount:10514): DEBUG: Ejecting
/org/freedesktop/Hal/devices/volume_part_1_size_357697536
** (gnome-mount:10514): DEBUG: in unmount_done : user_data = 0x0
Ejected /dev/scd0

So, gnome-mount works the same in either case, but hal doesn't get the notification.

Comment 9 Bill Nottingham 2007-02-21 19:43:31 UTC
Actually, after ejecting, lshal --monitor gets the 'media_availabe=false'
change... as soon as I close gnome-cd.

Comment 10 David Zeuthen 2007-02-21 19:47:22 UTC
I bet this one is a dupe of bug 206847 :-) 

Comment 11 David Zeuthen 2007-02-21 19:49:42 UTC
Anyway, reassigning back to gnome-media. The problem is that gnome-cd, or one of
it's libraries, is keeping the fd open using O_EXCL. 

I wonder what other software (Rhythmbox, Banshee, etc.) suffer from this?

Comment 12 Bill Nottingham 2007-02-21 19:50:42 UTC
In that O_EXCL locks out other things, yes. The CD isn't multisession.

I suspect if the eject process tried to open with O_EXCL and errored out if it
couldn't open it that way, things would be 'better'.

Comment 13 David Zeuthen 2007-02-21 19:53:09 UTC
> I suspect if the eject process tried to open with O_EXCL and errored out if it
> couldn't open it that way, things would be 'better'.

Yah. Let me burn an audio disc (who uses these anymore? :-) ), reproduce it and
I'll fix this in HAL. Still, gnome-cd ought to be fixed to close the fd when
it's not needed.

Comment 14 David Zeuthen 2007-02-21 20:34:32 UTC
OK, fix committed to HAL for this

 http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=ff20966d70fe8a0f23b2195ec8d6579201c0d4ba

Will be in Rawhide in a few days. With this, attempts to eject the disc will
result in this dialog

 http://people.freedesktop.org/~david/gnome-mount-busy-error.png

As a matter of fact, the eject button works is gnome-cd so I think we're all
good now and this bug can be closed.

Comment 15 David Zeuthen 2007-03-05 15:02:34 UTC
This is now in Rawhide.


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