ltspfsd hang while removing usb key without LDM

Bug #378495 reported by Francis Giraldeau
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ltspfsd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When using a usb key on a thin-client with rdesktop, the content is accessible as usual. If you access the content and immediately remove the key, umount happens as usual. But if you wait few seconds then remove the key, the whole RDP session hang for 2 minutes.

This behavior doesn't seems to be present while using LDM. Some traces are joint, that shows udev events and ltspfsd in debug mode. It seems that an mount and unmount is happening at the same time, and hang until a timeout occur.

This is confirmed on intrepid, and will be tested on jaunty soon.

Related branches

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :
Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :
Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :
Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :
summary: - ltspfsd hang while removing usb key with rdesktop
+ ltspfsd hang while removing usb key without LDM
Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

I did inspect the code, and saw more closely where the problem seems to be.

An unknown client do some file system access, then ltspfsd tries to mount the device, because the device is still listed in /var/run/ltsp_fstab. Then, the script /usr/sbin/ltspfs_mount detect this condition, and call /lib/udev/ltspfs_entry remove, to clean the mount point from fstab.

At the same moment, udev triggers the remove event, and also call the script /lib/udev/ltspfs_entry remove.

Both script instances hang on "lbmount --umount".

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

Ok, simple fix, prevent to mount the device while unmounting by simply remove it from ltspfs_fstab before calling ltspfsmounter.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Fix has been uploaded in Karmic, backport for Jaunty is available in my PPA.

Changed in ltspfsd (Ubuntu):
status: New → Fix Released
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.