Bug 2404

Summary: hald does not umount -l multiple USB devices pulled out of the system
Product: hal Reporter: Paul Ionescu <i_p_a_u_l>
Component: haldAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: pierre-bugzilla
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: log of hald --daemon=no --verbose=yes
log of hald --daemon=no --verbose=yes
log of hald --daemon=no --verbose=yes
some debugging info from /var/log/debug
lshal before taking the USB hub out
hald debug output, device added, ok
hald debug output, device added, fail
hald debug output, device removed, ok
hald debug output, device removed, fail
log of hald --daemon=no --verbose=yes
log of hald --daemon=no --verbose=yes at plugging
hald debug output
log of hald --daemon=no --verbose=yes at yanking out the hub
here it is. a full output, I just redirected all stderr to this file

Description Paul Ionescu 2005-01-27 15:23:12 UTC
I was pulling out my usb hub, with 3 usb memory-key (usbdisks) attached, and
only one of device was unmounted, the others were left mounted even if they
don't exist any more.
umount -l from a xterm worked just fine on the other 2 devices.


Tested on FC3 with both hal 0.4.6 and 0.4.7. 
kernel-2.6.10-1.741_FC3
udev-050-1
hotplug-2004_04_01-11

I will attach some logs.
Comment 1 Paul Ionescu 2005-01-27 15:33:49 UTC
Created attachment 1763 [details]
log of hald --daemon=no --verbose=yes

this is the log file of hald --daemon=no --verbose=yes when I insert the USB
hub with 3 usb-disks in it.
all 3 get mounted which is OK.
Comment 2 Paul Ionescu 2005-01-27 15:36:48 UTC
Created attachment 1764 [details]
log of hald --daemon=no --verbose=yes

log of hald --daemon=no --verbose=yes when I pulled out the USB hub with the 3
usb-disks in it.
Only one gets umounted -l
a df after pulling out the usb hub still shows

/dev/sdb1		119684	   16486    103198  14% /media/IBM_MEMKEY
/dev/sdc1		249564	    5044    244520   3% /media/IBM_256M

and I can manually umount -l them from a xterm
Comment 3 David Zeuthen (not reading bugmail) 2005-01-27 16:59:24 UTC
Funny enough, many of the 2.6.10 kernels from Fedora Rawhide causes an Ooops for
me when doing this. However, 2.6.9-1.681_FC3 seemed to work. Are you seeing any
Oopses?

Since you are using Fedora, I've built RPM's for FC3 instrumented with more
debug - you may ignore the dbus 0.23 dep; they'll also work with dbus 0.22. You
can find them here

 http://freedesktop.org/~david/testing/

Please give debug output similar to that in comment 2.
Comment 4 Paul Ionescu 2005-01-27 19:00:57 UTC
Created attachment 1767 [details]
log of hald --daemon=no --verbose=yes

Hi David,

Here is the log you wanted, taken with hal-0.4.7.cvs20050127
I put only the log when I pulled out the USB hub & usb-disks.
Comment 5 Paul Ionescu 2005-01-27 19:07:17 UTC
Created attachment 1768 [details]
some debugging info from /var/log/debug

This is a part of relevant /var/log/debug (where I log all debugging info).
As you can see, no Oopses with this kernel.
Comment 6 David Zeuthen (not reading bugmail) 2005-01-27 19:17:14 UTC
Thanks for the traces. What does lshal look like just before yanking out the
sticks? I'm looking at

 volume.is_mounted = false  (bool)

for IBM MEMKEY and I'm curious why that is. I probably have to add some debug
statements in the mount checking, but let me see the lshal first to double check.
Comment 7 Paul Ionescu 2005-01-27 19:57:02 UTC
Created attachment 1769 [details]
lshal before taking the USB hub out

here is the lshal before taking the usb hub out of the system
Comment 8 Pierre Ossman 2005-01-28 07:13:56 UTC
Created attachment 1770 [details]
hald debug output, device added, ok

Output from addition during a run when the device is correctly unmounted.
Comment 9 Pierre Ossman 2005-01-28 07:14:53 UTC
Created attachment 1771 [details]
hald debug output, device added, fail

Output from addition during a run when the device is _not_ correctly unmounted.
Comment 10 Pierre Ossman 2005-01-28 07:15:33 UTC
Created attachment 1772 [details]
hald debug output, device removed, ok

Output from removal during a run when the device is correctly unmounted.
Comment 11 Pierre Ossman 2005-01-28 07:16:06 UTC
Created attachment 1773 [details]
hald debug output, device removed, fail

Output from removal during a run when the device is _not_ correctly unmounted.
Comment 12 David Zeuthen (not reading bugmail) 2005-01-28 07:36:23 UTC
I've built some RPMS with more info and put them here

 http://freedesktop.org/~david/testing/2/

Pierre, if you're not running Fedora, I've also left a patch against 0.4.7.

I need debug output similar to that in comment 2.

Thanks,
David 
Comment 13 Paul Ionescu 2005-01-28 11:01:13 UTC
Created attachment 1777 [details]
log of hald --daemon=no --verbose=yes


New log of hald --daemon=no --verbose=yes
with the hal-0.4.7.cvs20050128-1.i386.rpm
Comment 14 David Zeuthen (not reading bugmail) 2005-01-28 11:44:41 UTC
Comment 13: What does it look like when you plug the devices in? Please append
both the relevant hald output and also the output of 'cat /etc/mtab'. It looks
very strange, but I'm sure we can get to the bottom of this.
Comment 15 Paul Ionescu 2005-01-28 12:54:55 UTC
Created attachment 1778 [details]
log of hald --daemon=no --verbose=yes   at plugging

Here is the log.

cat /etc/mtab 
/dev/hda2 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/hda1 /media/idedisk ntfs rw,nosuid,nodev 0 0
/dev/hda5 /media/Filme ext3 rw,nosuid,nodev 0 0
/dev/hda6 /media/Kits ext3 rw,nosuid,nodev 0 0
/dev/sda /media/USB-STICK vfat rw,nosuid,nodev,sync,noatime,iocharset=utf8 0 0
/dev/sdb1 /media/IBM_MEMKEY vfat rw,nosuid,nodev,sync,noatime,iocharset=utf8 0
0
/dev/sdc1 /media/IBM_256M vfat rw,nosuid,nodev,sync,noatime,iocharset=utf8 0 0

cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ 		/			ext3	defaults	1 1
none			/dev/pts		devpts	gid=5,mode=620	0 0
none			/dev/shm		tmpfs	defaults	0 0
none			/proc			proc	defaults	0 0
none			/sys			sysfs	defaults	0 0
/dev/hda3		swap			swap	defaults	0 0
/dev/hda6		/media/Kits		ext3   
pamconsole,exec,noauto,managed 0 0
/dev/hda5		/media/Filme		ext3   
pamconsole,exec,noauto,managed 0 0
/dev/hda1		/media/idedisk		ntfs   
pamconsole,exec,noauto,managed 0 0
/dev/hdc		/media/cdrecorder	auto   
pamconsole,exec,noauto,managed 0 0
/dev/sda		/media/USB-STICK	vfat   
pamconsole,exec,noauto,iocharset=utf8,noatime,sync,managed 0 0
/dev/sdb1		/media/IBM_MEMKEY	vfat   
pamconsole,exec,noauto,iocharset=utf8,noatime,sync,managed 0 0
/dev/sdc1		/media/IBM_256M 	vfat   
pamconsole,exec,noauto,iocharset=utf8,noatime,sync,managed 0 0
Comment 16 Pierre Ossman 2005-01-28 13:16:00 UTC
Created attachment 1779 [details]
hald debug output

Debug output from provided version.
Comment 17 David Zeuthen (not reading bugmail) 2005-01-28 14:34:46 UTC
Getting closer; new packages here

 http://freedesktop.org/~david/testing/3/

Please include debug when pulling out the hub.

Thanks,
David
Comment 18 Paul Ionescu 2005-01-28 15:12:37 UTC
Created attachment 1781 [details]
log of hald --daemon=no --verbose=yes at yanking out the hub
Comment 19 David Zeuthen (not reading bugmail) 2005-01-28 19:50:31 UTC
Argh, I've forgot to add some debugging; next set of packages are here

 http://freedesktop.org/~david/testing/4/

Thanks again. David
Comment 20 Paul Ionescu 2005-01-29 01:11:25 UTC
Created attachment 1784 [details]
here it is. a full output, I just redirected all stderr to this file
Comment 21 Paul Ionescu 2005-01-29 10:03:05 UTC
Hi David,

Tomorrow evening I will leave for a week.
I don't know for sure if I will have net access.
If you need more info, I can still provide till tomorrow evening my timezone
(GMT +2).

Thanks,
Comment 22 David Zeuthen (not reading bugmail) 2006-08-02 17:01:18 UTC
(bug triaging) please reopen if this bug still exist in HEAD - I went through
this code just last week and I couldn't reproduce.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.