Bug 177817 - nautilus gives blank error dialog accessing usb sd/mmc
nautilus gives blank error dialog accessing usb sd/mmc
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gnome-mount (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks: FC6Target
  Show dependency treegraph
 
Reported: 2006-01-14 15:39 EST by Andy Burns
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 16:14:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output from lshal command (127.94 KB, text/plain)
2006-01-23 17:43 EST, Andy Burns
no flags Details

  None (edit)
Description Andy Burns 2006-01-14 15:39:03 EST
Description of problem:

insert Sandisk Cruzer containing either an MMC or an SD card, both v(?)vat
formatted, the Cruzer device show up in top level of nautilus under "computer"
but browsing to it produces a blank error dialog with no text message, just the
red stop icon, and buttons to close or inform the developers.

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

rawhide 2006-01-14

How reproducible:

100%

Steps to Reproduce:
1. inset cruzer with sd/mmc card
2. browse computer with nautilus
3. open cruzer
  
Actual results:

Meaningless blank error dialog 

Expected results:

Files from cruzer are displayed in nautilus window

Additional info:

extract from lsusb
Bus 004 Device 004: ID 0781:8888 SanDisk Corp.

extract from dmesg 
usb 4-1: new full speed USB device using uhci_hcd and address 4
usb 4-1: configuration #1 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
  Vendor: SanDisk   Model: Cruzer            Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdc: 250880 512-byte hdwr sectors (128 MB)
sdc: Write Protect is off
sdc: Mode Sense: 43 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 250880 512-byte hdwr sectors (128 MB)
sdc: Write Protect is off
sdc: Mode Sense: 43 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 6:0:0:0: Attached scsi removable disk sdc
usb-storage: device scan complete

no entry created under /media
no icon created on desktop

If I manually perform
mkdir /mnt/cruzer
mount -t vfat /dev/sdc /mnt/cruzer

it mounts ok
I even did
mkfs.vfat -I /dev/sdc

to ensure there was nothing nautilus didn't like about the filesystem created by
my camera, I can still mount the MMC manually, but nautilus won't mount it,
nautilus is however happy to browse it, after I've manually mounted it.
Comment 1 Andy Burns 2006-01-23 04:24:47 EST
Ahh, yes forgotten about this one, I can't remember when it started, could be
related to the gnome-volume-manager issues, I reinstalled rawhide 2006-01-20
over the weekend, when I've updated it to 2006-01023 I'll double check this one
again ...
Comment 2 David Zeuthen 2006-01-23 09:11:41 EST
You should be getting a dialog from gnome-mount (you need the latest 0.4
snapshot of that package). Try 

 gnome-mount --device /dev/sda1

If that don't give you anything, try 

 gnome-mount --block --no-ui --device /dev/sda1

and post the output. I've too (on some systems only) see Nautilus put up blank
dialogs in addition to the gnome-mount dialogs, that's a bug in N that I thought
you fixed Alex?
Comment 3 David Zeuthen 2006-01-23 09:13:24 EST
Giving back the bug to Alex :-)
Comment 4 Andy Burns 2006-01-23 16:24:05 EST
OK, I'm updated to todays's rawhide 2006-01-23 (well apart from totem)

running gnome-mount-0.4-0.cvs20060117 on x86_64

I plug in my USB Cruzer, and dmesg gives

usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
  Vendor: SanDisk   Model: Cruzer            Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdd: 13280 512-byte hdwr sectors (7 MB)
sdd: Write Protect is off
sdd: Mode Sense: 43 00 00 00
sdd: assuming drive cache: write through
SCSI device sdd: 13280 512-byte hdwr sectors (7 MB)
sdd: Write Protect is off
sdd: Mode Sense: 43 00 00 00
sdd: assuming drive cache: write through
 sdd:
sd 5:0:0:0: Attached scsi removable disk sdd
usb-storage: device scan complete

ps -efa | grep mount shows 
 /usr/sbin/automount

I'm not sure of gnome-mount should be running permanently or just as required.


running gnome-mount --device /dev/sdd (either as root or non-root) showns no
dialog, and no gnome-mount process is visible


running gnome-mount --block --no-ui --device /dev/sdd
gives
** Message: Given device '/dev/sdd' is not a volume or a drive.

the same using /dev/sdd1 (probably expected as my MMC doesn't have a partition
table)

if I run gnome-mount --device /dev/sdc (which is a usb floppy) I get
Unable to mount media. There is probably no media in the drive.

which is true

when I insert a 1.44MB floppy, the following appears from dmesg

SCSI device sdc: 2880 512-byte hdwr sectors (1 MB)
sdc: Write Protect is on
sdc: Mode Sense: 00 46 94 80
sdc: assuming drive cache: write through
SCSI device sdc: 2880 512-byte hdwr sectors (1 MB)
sdc: Write Protect is on
sdc: Mode Sense: 00 46 94 80
sdc: assuming drive cache: write through
 sdc: unknown partition table

the disk is autodetected and mounted, 

/dev/sdc on /media/disk-1 type vfat (ro,noexec,nosuid,nodev,shortname=winnt,uid=500)

I get an icon on the desktop, and in nautilus the contents of "1.4MB removable
volume" are shown.

so it seems my machine just doesn't like autodetecting my cruzer + MMC
previosuly I got the blank dialog, now I don't even get a dialog

I can manually mount /dev/sdd /media/disk
and ls /media/disk without any problems

What other tests can I do?

Comment 5 David Zeuthen 2006-01-23 16:46:35 EST
Try adding --use-syslog to the haldaemon initscript then reboot without the
device. Post the hald lines that appear in /var/log/messages when inserting the
device. Thanks.
Comment 6 David Zeuthen 2006-01-23 16:47:43 EST
Also, after having attached the device please post the contents of lshal
Comment 7 David Zeuthen 2006-01-23 16:51:40 EST
Reassigning to gnome-mount package owner
Comment 8 John (J5) Palmieri 2006-01-23 16:57:55 EST
Reassigning to Ray.  Putting on FC5Blocker because this is a regression.  
Comment 9 David Zeuthen 2006-01-23 17:01:39 EST
Eh, hold it there john - since it works with the floppy it looks more like the
case of broken hardware or a broken usb-storage driver. I just want to be certain.
Comment 10 Andy Burns 2006-01-23 17:12:18 EST
Does the fact that manual mounting works fine rule out a hardware or driver issue?
Comment 11 David Zeuthen 2006-01-23 17:15:32 EST
No, not necessarily. You see.. we need to poll the drive for media (mostly
because USB is a host-initiated protocol, e.g. the client cannot initiate
requests) and this may mess up the drive.
Comment 12 Andy Burns 2006-01-23 17:30:06 EST
Ok, just rebooted to test the --use-syslog, if things point at a hardware issue
I don't have another flash memory drive as such, but my phone has a sony
memorystick socket that is visible when plugged via USB, and my printer has
CF/SD/MMC sockets likewise ... though the cruzer worked with FC4 (can't swear to
it but perhaps rawhide shortly after the FC5T1 period)
Comment 13 Andy Burns 2006-01-23 17:41:39 EST
Did a reboot to bring the --use-syslog into effect

I presume this was only meant to assist in debugging, rather than make an actal
difference? 

I tried it with various cards inserted into the cruzer, 128MB SD with partition
table, and 8MB SD without partition table, 64MB MMC with partition table, they
all work, mounted and shown in nautilus

Jan 23 22:39:58 htpc kernel: usb 4-1: new full speed USB device using uhci_hcd
and address 5
Jan 23 22:39:58 htpc kernel: usb 4-1: configuration #1 chosen from 1 choice
Jan 23 22:39:58 htpc kernel: scsi7 : SCSI emulation for USB Mass Storage devices
Jan 23 22:40:03 htpc kernel:   Vendor: SanDisk   Model: Cruzer            Rev: 2.00
Jan 23 22:40:03 htpc kernel:   Type:   Direct-Access                      ANSI
SCSI revision: 00
Jan 23 22:40:03 htpc kernel: SCSI device sdc: 13280 512-byte hdwr sectors (7 MB)
Jan 23 22:40:03 htpc kernel: sdc: Write Protect is off
Jan 23 22:40:03 htpc kernel: sdc: assuming drive cache: write through
Jan 23 22:40:03 htpc kernel: SCSI device sdc: 13280 512-byte hdwr sectors (7 MB)
Jan 23 22:40:03 htpc kernel: sdc: Write Protect is off
Jan 23 22:40:03 htpc kernel: sdc: assuming drive cache: write through
Jan 23 22:40:03 htpc kernel:  sdc:
Jan 23 22:40:03 htpc kernel: sd 7:0:0:0: Attached scsi removable disk sdc
Jan 23 22:40:03 htpc scsi_id[3664]: 7:0:0:0: page 0 not available.
Jan 23 22:40:03 htpc scsi_id[3665]: 7:0:0:0: page 0 not available.
Jan 23 22:40:04 htpc kernel: audit(1138056004.266:106): user pid=2712 uid=81
auid=4294967295 msg='avc:  denied  { send_msg } for msgtype=method_call
interface=org.freedesktop.DBus member=Hello dest=org.freedesktop.DBus spid=3686
scontext=user_u:system_r:unconfined_t tcontext=system_u:system_r:initrc_t
tclass=dbus
Jan 23 22:40:04 htpc kernel: : exe="?" (sauid=81, hostname=?, addr=?, terminal=?)'
Jan 23 22:40:04 htpc kernel: audit(1138056004.270:107): user pid=2712 uid=81
auid=4294967295 msg='avc:  denied  { send_msg } for msgtype=method_call
interface=org.freedesktop.DBus member=NameHasOwner dest=org.freedesktop.DBus
spid=3686 scontext=user_u:system_r:unconfined_t
tcontext=system_u:system_r:initrc_t tclass=dbus
Jan 23 22:40:04 htpc kernel: : exe="?" (sauid=81, hostname=?, addr=?, terminal=?)'
Jan 23 22:40:04 htpc kernel: audit(1138056004.270:108): user pid=2712 uid=81
auid=4294967295 msg='avc:  denied  { send_msg } for msgtype=method_call
interface=org.freedesktop.DBus member=AddMatch dest=org.freedesktop.DBus
spid=3686 scontext=user_u:system_r:unconfined_t
tcontext=system_u:system_r:initrc_t tclass=dbus
Jan 23 22:40:04 htpc kernel: : exe="?" (sauid=81, hostname=?, addr=?, terminal=?)'
Jan 23 22:40:04 htpc kernel: SELinux: initialized (dev sdc, type vfat), uses
genfs_contexts
Comment 14 Andy Burns 2006-01-23 17:43:06 EST
Created attachment 123595 [details]
Output from lshal command
Comment 15 Andy Burns 2006-01-23 17:48:57 EST
I wonder if selinx was involved in the tests earlier tonight? 

I had previously been booting with SELINUX=0 due to some apparently bad security
 contexts, during the reboot I realised and took off the SELINUX=0, so selinx
did a relabel of the whoel filesystem, and now gnome-mount seems to be working,
or could the --use-syslog be making a difference somehow?

Comment 16 David Zeuthen 2006-01-23 18:20:47 EST
As for comment 13, yes this was to get more debug but you didn't post any -
maybe because I forgot to tell you to add --verbose too, e.g. add "--use-syslog
--verbose". It would look like this

20:17:38.913 [D] hald_dbus.c:1192: udi=/org/freedesktop/Hal/devices/temp/146,
key=volume.size
15764: 20:17:38.915: volume_id_probe_linux_raid: probing at offset 0x0, size
0x4e69600
15764: 20:17:38.915: volume_id_get_buffer: get buffer off 0x4e50000(82116608),
len 0x800
15764: 20:17:38.916: volume_id_get_buffer: read seekbuf off:0x4e50000 len:0x800
15764: 20:17:38.935: volume_id_get_buffer: got 0x800 (2048) bytes
15764: 20:17:38.935: volume_id_probe_intel_software_raid: probing at offset 0x0,
size 0x4e69600
15764: 20:17:38.935: volume_id_get_buffer: get buffer off 0x4e69200(82219520),
len 0x200

Try removing (for good measure) the --use-syslog and see if selinux=0 vs. not is
the culprit. It may very well be. Let us know. Thanks
Comment 17 David Zeuthen 2006-01-23 18:22:48 EST
Btw the lshal log suggests that you have the filesystem on a partitioned disk
(e.g. block.device = '/dev/sdd1').. is this the case?
Comment 18 David Zeuthen 2006-01-23 18:30:46 EST
Btw, this bug may be about garbage left on the SD/MMC card because (earlier,
possibly current too) mkfs.* don't clear out parts from older file systems thus
making it virtually impossible to probe for media. 

If you can reproduce the bug.. please try to clear out the start card with e.g.

 dd if=/dev/zero of=/dev/sdd bs=512 count=1000

where /dev/sdd is the main block device for the card. Then partition with fdisk
and make a file system on /dev/sdd1. Or make a file system on /dev/sdd. HAL
should be able to detect both fwiw...

But first let us know whether this is selinux related. Thanks.
Comment 19 Andy Burns 2006-01-31 12:10:14 EST
Re #17 one of the SD cards I have has a filesystem directly on the device, but
most are partitioned.

My system seems to be happy "selinxwise" now, I don't particularly think that
was the issue, but can't be user after the fact.

Nautilus is happy with SD and MMC cards in the Cruzer, and with MemorySticks in
my SonyEricsson K750i phone via USB, it sees the removable drives as they are
plugged in, it doesn't mount them automatically, I can right click them and
mount, before I had to mount them from bash, I'm happy with this behaviour,
though in the past I think it mounted automatically too.

I'll leave it for someone else to decide whether to close the bug ...

If the lack of automounting is a problem, I'm happy to continue to diagnose it,
I do get a "no entry" emblem briefly displayed in nautiluse when the drive is
plugged in, perhaps this is it trying anf failing to mount? This is when logged
in as root BTW.
Comment 20 Matthias Clasen 2006-02-21 13:24:28 EST
David, do you consider this fixed, or is automounting supposed to work on these
thingies ? Anyway, moving off blocker since it seems to work acceptably now.
Comment 21 David Zeuthen 2006-02-21 16:14:23 EST
Yea, I actually routinely test this stuff with all kinds of weird media and when
it breaks for people it's normally due to the kernel being silly. That does gets
fixed from time to other but sometimes it keeps breaking again. 

I'm going to close this bug.

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