USB flash drive does not mount automatically

Bug #479206 reported by Giulio Malventi
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: udev

Opened as requested on bug #452768.

ProblemType: Bug
Architecture: i386
CustomUdevRuleFiles: 50-virtualbox-ose.rules 025_logitechmouse.rules 45-libmtp7.rules 10-vboxdrv.rules 65-libmtp.rules 45-libnjb5.rules
DKDisksMonitorLog: Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
Date: Mon Nov 9 15:46:14 2009
DistroRelease: Ubuntu 9.10
HotplugNewDevices: /dev/sdc
HotplugNewMounts:

MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: udev 147~-6.1
ProcCmdLine: root=UUID=3767d5af-bd16-4fe2-b6af-62d2f4bb970e ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.49-generic
SourcePackage: udev
Symptom: storage
Uname: Linux 2.6.31-15-generic i686
dmi.bios.date: 03/25/2008
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: ASUS P5VD2-VM ACPI BIOS Revision 1302
dmi.board.name: P5VD2-VM
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.XX
dmi.chassis.asset.tag: 123456789000
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: 1111
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvrASUSP5VD2-VMACPIBIOSRevision1302:bd03/25/2008:svnSystemmanufacturer:pnSystemProductName:pvr:rvnASUSTeKComputerINC.:rnP5VD2-VM:rvr1.XX:cvnChassisManufacture:ct3:cvr1111:
dmi.product.name: System Product Name
dmi.sys.vendor: System manufacturer

Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

There is no bug here, the udev db has sdc1 in it with the relevant details - the problem must be further up the stack (for which you already have a bug open)

Changed in udev (Ubuntu):
status: New → Invalid
Revision history for this message
Giulio Malventi (giulio-people) wrote :

Ok, thanks.

Revision history for this message
Martin Pitt (pitti) wrote :

There does seem to be an udev problem here:

  HotplugNewDevices: /dev/sdc

That means that /dev/sdc was created by udev, but not /dev/sdc1. The udev monitor log does not even have sdc. (The kernel detects an sdc1). The udev _database_ does have both, though, but it seems it is not sending events to devkit-disks (see the empty monitor log).

Please do the following in a Terminal:

  pull out the USB drive
  sudo stop udev
  sudo udevd --debug > /tmp/udev-debug.log 2>&1
  plug in the drive
  wait for a couple of seconds
  press Control-C
  sudo start udev

and then attach /tmp/udev-debug.log here.

Thanks!

Changed in udev (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 479206] Re: USB flash drive does not mount automatically

On Mon, 2009-11-09 at 18:36 +0000, Martin Pitt wrote:

> There does seem to be an udev problem here:
>
> HotplugNewDevices: /dev/sdc
>
> That means that /dev/sdc was created by udev, but not /dev/sdc1. The
> udev monitor log does not even have sdc. (The kernel detects an sdc1).
> The udev _database_ does have both, though, but it seems it is not
> sending events to devkit-disks (see the empty monitor log).
>
There is no relevant monitor log attached to this bug.

Are you sure you're not confusing this with a different report?

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

@Scott:

> There is no relevant monitor log attached to this bug.

There is a field "DKDisksMonitorLog" in the description; it's shown inline because it's < 5 lines. Also, the "HotplugNewDevices:" shows which /dev/sd* have appeared for the new device which was plugged in, and it's blatantly missing /dev/sdc1.

Revision history for this message
Martin Pitt (pitti) wrote :

@Scott: Oh, and there's an UdevMonitorLog.txt attachment which shows that neither sdc nor sdc1 are sent out as events.

@Giulio,

I don't see errors in the udev log, but /dev/sdc1 simply doesn't appear. May it be that those devices are re-routed to VirtualBox somehow? Some rules match there. Do you have virtualbox running on this machine when trying this? Can you please attach /etc/udev/rules.d/50-virtualbox-ose.rules here?

I also wonder why you still have /etc/udev/rules.d/45-libmtp7.rules, this was moved to /lib/udev/rules.d/ long ago; except if you modified it?

Since the udev debug log isn't enlightening, we need to do that differently:

 - Reboot with the USB drive not plugged in.
 - Open a Terminal and do:

   sudo -i
   for p in `pidof udevd`; do (strace -vvfs 1024 -o /tmp/udev.$p.log -p $p &); done

 - Plug in the drive, wait 10 seconds
 - killall strace

And then attach /tmp/udev.*.log here (should be three files).

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Tue, 2009-11-10 at 07:47 +0000, Martin Pitt wrote:

> > There is no relevant monitor log attached to this bug.
>
> There is a field "DKDisksMonitorLog" in the description; it's shown
> inline because it's < 5 lines. Also, the "HotplugNewDevices:" shows
> which /dev/sd* have appeared for the new device which was plugged in,
> and it's blatantly missing /dev/sdc1.
>
So?

This can simply be a bug in whatever you do to get that information
(e.g. the user doesn't unplug and replug the key while the monitor is
running)

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Giulio Malventi (giulio-people) wrote :

Hello, Virtualbox was not running during the tests. There is the possibility inside the application to reroute a specific device to the virtual machine, but I did not do it permanently for this device. I tried right now to attach the device to the virtual machine: I can see the device name, and when I click I see USB activity, but I get no result. Before karmic it worked.

Don't know for /etc/udev/rules.d/45-libmtp7.rules. Maybe I could have touched it when I tried to get working a Palm device, but that was years ago, surely before jaunty, and surely it does not contain any valuable edit. Should I delete it?

Thanks for your help.

Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. The strace shows that udev both received and sent the events for /dev/sdc1, and also mknod()ed /dev/sdc1 successfully. So either the problem only happens sometimes, or something went wrong when you inserted the device while reporting the bug initially. So I don't believe the original UdevMonitorLog.txt and DKDisksMonitorLog attachments any more.

Can you please unplug the drive, then open a terminal, and do

  devkit-disks --monitor-detail > /tmp/dkd.log 2>&1 &
  udevadm monitor -e --udev > /tmp/udev.log 2>&1 &
  gvfs-mount -oi > /tmp/gvfs.log 2>&1

then plug in the drive, wait for 20 seconds. Close the terminal, and then attach /tmp/dkd.log, /tmp/udev.log, and /tmp/gvfs.log here.

Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Giulio Malventi (giulio-people) wrote :
Revision history for this message
Giulio Malventi (giulio-people) wrote :
affects: udev (Ubuntu) → gvfs (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

> gvfs-mount: command not found

ah, too bad. Can you please do "sudo apt-get install gvfs-bin" and do the procedure with gvfs-mount -oi again?

devkit-disks log looks fine, reassigning to gvfs.

Revision history for this message
Giulio Malventi (giulio-people) wrote :

Sorry, I did not think I could be useful, so I did not even look at them.

Revision history for this message
Martin Pitt (pitti) wrote :

(gvfs-mount:3579): GVFS-RemoteVolumeMonitor-WARNING **: invoking IsSupported() failed for remote volume monitor with dbus name org.gtk.Private.GduVolumeMonitor: org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process /usr/lib/gvfs/gvfs-gdu-volume-monitor received signal 6

Ah, in plain English that means that gvfs has crashed with an assertion. It is likely that this was already reported in bug 435136, but to be sure, can you please do:

killall gvfs-gdu-volume-monitor
/usr/lib/gvfs/gvfs-gdu-volume-monitor

then plug in the USB stick. This should crash the program and leave some screen output. Could you please copy&paste this?

Thanks!

Revision history for this message
Giulio Malventi (giulio-people) wrote :

gvfs-gdu-volume-monitor was not running, and I got an error when I tried to start it.

giulio@contraire:~$ killall gvfs-gdu-volume-monitor
gvfs-gdu-volume-monitor: no process found
giulio@contraire:~$ /usr/lib/gvfs/gvfs-gdu-volume-monitor
**
libgdu:ERROR:gdu-pool.c:1253:device_recurse: assertion failed: (depth < 100)
Aborted

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.