USB key drive not always mounted

Bug #8477 reported by Ryan Lovett
10
Affects Status Importance Assigned to Milestone
hotplug (Ubuntu)
Invalid
Medium
Martin Pitt

Bug Description

When a USB key drive is inserted, the machine is able to detect the device and
its partitions, but does not consistently create the mount point (/media/sda1)
and mount it. When this is not done, I'm able to successfully create the
mountpoint manually as root and mount the drive as a regular user. Other times
however, the same key drive is mounted just fine.

Revision history for this message
Matt Zimmerman (mdz) wrote :

bugzilla is forcing me to enter a comment to reassign this bug

Revision history for this message
Matt Zimmerman (mdz) wrote :

GRRR. in fact, it was forcing me to enter a comment because it was resolving
the bug when I marked the 'reassign' radio button

Revision history for this message
Lean Fuglsang (lean-ubuntu) wrote :

I can testify this.
I put in my usb Mp3 player - it is detected fine, and a window pops up. I
unmount it from the icon on the desktop.
Whenever I insert the Mp3 player again, it is not mounted.

Revision history for this message
llpamies (llpamies-deactivatedaccount) wrote :

I have the same problem that Lean Fuglsang.
I plug my digital camera, and it is detected and mounted fine. I umount from the
desktop icon, and when I plug again the camera, system don't mount it.

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

Sounds like a problem in my domain, so I'm reassigning to me.

When you mount the USB drive / camera the second time, can you please execute
the following commands:

dmesg > dmesg.txt
lshal > lshal.txt
pidof gnome-volume-manager > gvm.txt

and send me these three files (*.txt), or attach them here? This will help me to
debug the problem.

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

In the meantime there were a lot of hal and gnome-volume-manager upgrades. Can
you please verify that this problem still exist?

If so, I need some additional info to debug the problem. Directly after an
unrecognized plugin, can you please do the following commands

  dmesg > dmesg.txt
  lshal > lshal.txt
  mount > mount.txt

attach the three produced *.txt files here and additionaly check that

  pidof gnome-volume-manager

prints out a number?

Thanks!

Revision history for this message
Matt Zimmerman (mdz) wrote :

Please respond and provide the requested information

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

I did not get any debug output or an answer at all for over one month now and
for me this works fine. I'm closing this bug now.

Ryan, if you have any additional information, please reopen this bug.

Thanks,

Martin

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=843)
dmesg outpup

Because I have the same problem (USB key) and it s replicable, I submit the
required files. The key mounts for the first time, and if unmounted (via gui)
it does not mount again. It seems hal is not working.

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=844)
lshal output

This is lshal output when I insert USB key for the second time. I will submit
lshal output for the first mount shortly.

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=845)
mount output

Revision history for this message
Rafał Próchniak (burlap) wrote :

And - pidof gnome-volume-manager prints out a number.

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=850)
dmesg outpup before mount

I decided to attach also dmesg and lshal output before and after first (clean)
mounts of the USB key. (see dmesg.pre.txt, lshal.pre.txt, dmesg.clean.txt,
lshal.clean.txt, mount.clean.txt).

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=851)
lshal output before mount

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=852)
dmesg output - clean mount

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=853)
lshal output - clean mount

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

Hi Rafael!

Thanks for the attachments. I have two questions:

- "*** [DIE] lshal.c:dump_devices():70 : Couldn't obtain list of devices"
implies that hal is either not running at all any more or is stuck in
uninterruptable sleep (see bug #8628). After you plugged in the device the
second time (when it is not automatically mounted any more), can you please give
me the output of

  ps aux|grep hald

- Is it possible to mount the device manually when it doesn't happen
automatically? Please try with "pmount /dev/sda1" (as normal user). Please also
send me the output of "ls -l /dev/sd*".

Thanks in advance!

Revision history for this message
Rafał Próchniak (burlap) wrote :

Hi!

More outputs...

ps aux:
hal 3935 0.0 0.8 5708 4276 ? Ds 15:27 0:00 /usr/sbin/hald
--drop-privileges

ls -l /dev/sd*:
ls: /dev/sd*: No such file or directory

And not surprisingly:
pmount /dev/sda1:
Error: could not determine real path of the device: No such file or directory

BTW: because I had some problems with the same key under my previous Linux
(Aurox 9.2 with custom 2.4.22 kernel), the "solution" was to reload usb-storage
module, with Ubuntu removing usb-storage brings this process to uninterraptible
sleep.

Revision history for this message
Rafał Próchniak (burlap) wrote :

Created an attachment (id=891)
hal debug (straced)

I've read #1891 and because I do not have an ipod ;), I post straced hal here.
I do not even have to do much - whenever I plug my usb key for the second time,
hal stops.

Revision history for this message
Rafał Próchniak (burlap) wrote :

I've found out while playing with hotplug after I installed backport -
0.0.20040329-16ubuntu2-4.10ubp2 (warty-backports), that my usb key mounts again
if after umount I run:
/etc/hotplug/usb.rc restart
And hal keeps running.
I hope it might help. Do you need some attachments also in this case?

Revision history for this message
Sylvain BERTRAND (sylvain-bertrand) wrote :

Still the same issue... HAL seems to ignore the key when mounted a second time.
Hotplug works fine though.

Revision history for this message
Rafał Próchniak (burlap) wrote :

I have used another USB key and it worked fine - mounting and unmounting without
any problems. It was USB 2.0, while mine is USB 1.1. On the other hand, with
different hardware (and different distro) it works ok.

Revision history for this message
Corey Woodworth (coreywoodworth) wrote :

I'm having this problem as well with a usb2.0 drive and a usb2.0 laptop.
Sometimes it IS mounted on say the 3rd or 4rth try.

Also, I have 2 usb ports. It only EVER gets mounted on one of the ports, The
other never mounts it.

Revision history for this message
GonzO (gonzo) wrote :

I can verify something _like_ this with my RCA Lyra jukebox.

It never mounts on the first go, but mounts on every go after that. My
Thumbdrive seems to work similarly (though it sometimes actually does mount on
the first try).

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

(In reply to comment #18)
> ps aux:
> hal 3935 0.0 0.8 5708 4276 ? Ds 15:27 0:00 /usr/sbin/hald
--drop-privileges

Yes, this indeed looks like #1891, closing as a duplicate.

As a remedy, we will ship hal 0.5 in breezy which separates out USB detection to
separate processes, so the main hal process will not hang any more and the USB
detection process will just time out and die after 100 seconds. This will be
much more robust.

This bug has been marked as a duplicate of bug 8628.

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.