GNOME Bugzilla – Bug 582772
gvfsd-computer crashes with SIGSEGV in recompute_files
Last modified: 2009-06-16 21:47:08 UTC
Steps to reproduce: Start Nautilus and browse to computer:/// (or just try and run $(libexec)/gvfsd-computer. This only crashes with gvfs-gdu-volume-monitor. If I use gvfs-hal-volume-monitor, it works fine. Stack trace:
+ Trace 215488
Other information: Running through gdb shows that "if (file->drive)" evaluates to true and g_drive_get_name () at daemon/gvfsbackendcomputer.c:461 returns NULL
This is with a snapshot in Ubuntu from git on 12-May
Here is the output of "gvfs-mount -li" with the gdu volume monitor: chr1s@chris-ubuntudevvm:~$ gvfs-mount -li Drive(0): (null) Type: GProxyDrive (GProxyVolumeMonitorGdu) ids: unix-device: '/dev/fd0' themed icons: [drive-removable-media] [drive-removable] [drive] is_media_removable=1 has_media=0 is_media_check_automatic=1 can_poll_for_media=1 can_eject=1 Drive(1): LITE-ON DVDRW SHM-165P6S Type: GProxyDrive (GProxyVolumeMonitorGdu) ids: unix-device: '/dev/sr1' themed icons: [drive-optical] [drive] is_media_removable=1 has_media=1 is_media_check_automatic=1 can_poll_for_media=1 can_eject=1 Volume(0): APCD_T-Mobile_G1 Type: GProxyVolume (GProxyVolumeMonitorGdu) ids: unix-device: '/dev/sr1' label: 'APCD_T-Mobile_G1' themed icons: [media-optical-cd-rom] [media-optical-cd] [media-optical] [media] can_mount=1 can_eject=1 Drive(2): NECVMWar VMware IDE CDR00 Type: GProxyDrive (GProxyVolumeMonitorGdu) ids: unix-device: '/dev/sr0' themed icons: [drive-optical] [drive] is_media_removable=1 has_media=0 is_media_check_automatic=1 can_poll_for_media=1 can_eject=1
According to devkit-disks, there is no vendor or model name for my floppy drive, so perhaps this is a devkit issue (or maybe gvfs should cope with that): chr1s@chris-ubuntudevvm:~$ devkit-disks --dump ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/fd0 native-path: /sys/devices/platform/floppy.0/block/fd0 device: 2:0 device-file: /dev/fd0 detected at: Fri 15 May 2009 15:28:06 BST system internal: 0 removable: 1 has media: 0 detects change: 1 detection by polling: 1 detection inhibitable: 1 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 0 block size: 0 job underway: no usage: type: version: uuid: label: drive: vendor: model: revision: serial: ejectable: 0 require eject: 0 media: compat: interface: (unknown) if speed: (unknown) ATA SMART: not available ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sda native-path: /sys/devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda device: 8:0 device-file: /dev/sda by-path: /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0 detected at: Fri 15 May 2009 15:28:06 BST system internal: 1 removable: 0 has media: 1 detects change: 0 detection by polling: 0 detection inhibitable: 0 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 21474836480 block size: 512 job underway: no usage: type: version: uuid: label: partition table: scheme: mbr count: 3 drive: vendor: VMware, model: VMware Virtual S revision: 1.0 serial: ejectable: 0 require eject: 0 media: compat: interface: scsi if speed: (unknown) ATA SMART: not available ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sda1 native-path: /sys/devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda/sda1 device: 8:1 device-file: /dev/sda1 by-id: /dev/disk/by-uuid/6812f1f1-0d15-4f59-8f55-2322906a816e by-path: /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part1 detected at: Fri 15 May 2009 15:28:06 BST system internal: 1 removable: 0 has media: 1 detects change: 0 detection by polling: 0 detection inhibitable: 0 detection inhibited: 0 is read only: 0 is mounted: 1 mount paths: / mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 20530266624 block size: 512 job underway: no usage: filesystem type: ext3 version: 1.0 uuid: 6812f1f1-0d15-4f59-8f55-2322906a816e label: partition: part of: /org/freedesktop/DeviceKit/Disks/devices/sda scheme: mbr number: 1 type: 0x83 flags: boot offset: 32256 size: 20530266624 label: uuid: ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sda2 native-path: /sys/devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda/sda2 device: 8:2 device-file: /dev/sda2 by-path: /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part2 detected at: Fri 15 May 2009 15:28:06 BST system internal: 1 removable: 0 has media: 1 detects change: 0 detection by polling: 0 detection inhibitable: 0 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 1024 block size: 512 job underway: no usage: type: version: uuid: label: partition: part of: /org/freedesktop/DeviceKit/Disks/devices/sda scheme: mbr number: 2 type: 0x05 flags: offset: 20530298880 size: 937681920 label: uuid: ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sda5 native-path: /sys/devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda/sda5 device: 8:5 device-file: /dev/sda5 by-id: /dev/disk/by-uuid/f2dc7cca-ac0c-4926-8be7-598fcba1349c by-path: /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part5 detected at: Fri 15 May 2009 15:28:06 BST system internal: 1 removable: 0 has media: 1 detects change: 0 detection by polling: 0 detection inhibitable: 0 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 937649664 block size: 512 job underway: no usage: other type: swap version: 2 uuid: f2dc7cca-ac0c-4926-8be7-598fcba1349c label: partition: part of: /org/freedesktop/DeviceKit/Disks/devices/sda scheme: mbr number: 5 type: 0x82 flags: offset: 20530331136 size: 937649664 label: uuid: ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sr0 native-path: /sys/devices/pci0000:00/0000:00:07.1/host0/target0:0:0/0:0:0:0/block/sr0 device: 11:0 device-file: /dev/sr0 by-path: /dev/disk/by-path/pci-0000:00:07.1-scsi-0:0:0:0 detected at: Fri 15 May 2009 15:28:06 BST system internal: 0 removable: 1 has media: 0 detects change: 1 detection by polling: 1 detection inhibitable: 1 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 0 block size: 0 job underway: no usage: type: version: uuid: label: drive: vendor: NECVMWar model: VMware IDE CDR00 revision: 1.00 serial: ejectable: 0 require eject: 1 media: compat: optical_cd optical_mrw optical_mrw_w interface: scsi if speed: (unknown) ATA SMART: not available ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sr1 native-path: /sys/devices/pci0000:00/0000:00:07.1/host1/target1:0:0/1:0:0:0/block/sr1 device: 11:1 device-file: /dev/sr1 by-path: /dev/disk/by-path/pci-0000:00:07.1-scsi-1:0:0:0 detected at: Fri 15 May 2009 15:28:06 BST system internal: 0 removable: 1 has media: 1 detects change: 1 detection by polling: 1 detection inhibitable: 1 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation name: presentation icon: size: 17137664 block size: 2048 job underway: no usage: filesystem type: iso9660 version: Joliet\x20Extension uuid: label: APCD_T-Mobile_G1 optical disc: blank: 0 appendable: 0 closed: 1 num tracks: 1 num audio tracks: 0 num sessions: 1 drive: vendor: LITE-ON model: DVDRW SHM-165P6S revision: MS07 serial: ejectable: 0 require eject: 1 media: optical_cd compat: optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_ram optical_dvd_rw optical_mrw optical_mrw_w interface: scsi if speed: (unknown) ATA SMART: not available ========================================================================
Could you please investigate what happens if you in daemon/gvfsbackendcomputer.c on line 474 (before convert_slashes (basename);) adds this: if (basename == NULL) { basename = g_strdup("unknown"); }
I'll try that tomorrow when I get a chance, but I'm pretty sure that will fix it already
Created attachment 136731 [details] Valgrind-Log I'll attach a valgrind log of "gvfsd-computer", see https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/387036
I think it's reasonable that g_drive_get_name() never returns NULL. So I fixed the bug in the volume monitor instead http://git.gnome.org/cgit/gvfs/commit/?id=5d3ab40b5b0a574f207e7177d2f4c3bd329458a4 I'll fix DeviceKit-disks too, to actually set a sensible name.