GNOME Bugzilla – Bug 749093
inserting a blank disk, dvd, cd, etc causes gvfs-udisks2-volume-monitor to segfault
Last modified: 2016-02-10 07:49:57 UTC
steps to reproduce. Open your cd/dvd/bd drive and insert a blank disk. Close the tray and wait. Let the disk spin up and then look at the logs. You should see a segfault message from systemd, or if not using systemd, in your kernel log. I've got a snippet of log that shows the segfault, with as much info as I could get below. I'll paste. May 08 02:13:51 tigger /usr/lib/gdm/gdm-x-session[406]: Activating service name='org.gtk.Private.UDisks2VolumeMonitor' May 08 02:13:51 tigger org.gtk.Private.UDisks2VolumeMonitor[414]: disc.c:332: error opening file BDMV/index.bdmv May 08 02:13:51 tigger org.gtk.Private.UDisks2VolumeMonitor[414]: disc.c:332: error opening file BDMV/BACKUP/index.bdmv May 08 02:13:51 tigger /usr/lib/gdm/gdm-x-session[406]: Successfully activated service 'org.gtk.Private.UDisks2VolumeMonitor' May 08 02:14:29 tigger org.gtk.Private.UDisks2VolumeMonitor[414]: bluray.c:1338: No device path provided! May 08 02:14:29 tigger gnome-session[416]: (tracker-extract:767): GVFS-RemoteVolumeMonitor-WARNING **: Owner of volume monitor org.gtk.Private.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts May 08 02:14:29 tigger gnome-session[416]: (gnome-shell:612): GVFS-RemoteVolumeMonitor-WARNING **: Owner of volume monitor org.gtk.Private.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts May 08 02:14:29 tigger gnome-session[416]: (nautilus:762): GVFS-RemoteVolumeMonitor-WARNING **: Owner of volume monitor org.gtk.Private.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts May 08 02:14:29 tigger gnome-session[416]: (tracker-miner-fs:738): GVFS-RemoteVolumeMonitor-WARNING **: Owner of volume monitor org.gtk.Private.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts May 08 02:14:29 tigger systemd-coredump[1048]: Process 677 (gvfs-udisks2-vo) of user 1000 dumped core. This occurs with gvfs built from git master. It also occurs with latest package in the arch repo, v1.24.1. This does not happen with any other media. Flash drive, audio player, a disk with content on it, only a blank disk. A restart of gnome will fix it, but it will crash when it tries to look at the blank disk.
Created attachment 303265 [details] backtrace Thanks for your bug report. The crash is reproducible (just it was hard to find empty disk for me). Attaching the backtrace. This could be also relevant with following errors (printed from the daemon): disc.c:332: error opening file BDMV/index.bdmv disc.c:332: error opening file BDMV/BACKUP/index.bdmv bluray.c:1338: No device path provided!
It is caused by the following commit: http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=da324c9abc045e3059936ef2dcb620fdc7ceb5b1 But it would be good to fix it also in gvfs. We shouldn't call bd_open with empty device path and they shouldn't crash in such case...
Created attachment 303283 [details] [review] common: Fix possible crash with blank disks Never call bd_open() with an empty path.
Review of attachment 303283 [details] [review]: Looks good!
Created attachment 303288 [details] [review] monitor: Do not search for any path on blank disks Bastien's patch fixes the issue, but I think we should not call any of g_vfs_mount_info_query_ functions if mount_path is NULL.
(In reply to Ondrej Holy from comment #5) > Created attachment 303288 [details] [review] [review] > monitor: Do not search for any path on blank disks > > Bastien's patch fixes the issue, but I think we should not call any of > g_vfs_mount_info_query_ functions if mount_path is NULL. Path is NULL, but the URI isn't. The burn:/// scheme isn't backed by fuse.
Review of attachment 303288 [details] [review]: I think the original patch was fine. Searching for (.xdg-volume-info, autorun.inf) doesn't seem to require a filesystem path so this patch is probably not necessary.
Only case when mount_entry (and also mount_path) is NULL is for empty disks, isn't it? Yes, uri isn't NULL, it is "burn:///". Is it really intended to check for burn:///autorun.inf and burn:///.xdg-volume-info (for empty disks)?
It should be fixed in libbluray already (I sent them fix yesterday, however they pushed own fix in a similar time): https://mailman.videolan.org/pipermail/libbluray-devel/2015-May/002061.html
(In reply to Ondrej Holy from comment #8) > Only case when mount_entry (and also mount_path) is NULL is for empty disks, > isn't it? Yes, uri isn't NULL, it is "burn:///". Is it really intended to > check for burn:///autorun.inf and burn:///.xdg-volume-info (for empty disks)? I don't think it matters either way.
Comment on attachment 303283 [details] [review] common: Fix possible crash with blank disks commit 7deded463b8cc148103c55460a84a6b23342c941