Bug 440483 - fuse-encfs: issues with flocks
Summary: fuse-encfs: issues with flocks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fuse-encfs
Version: 8
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-03 18:38 UTC by Tomas Hoger
Modified: 2008-05-17 22:25 UTC (History)
1 user (show)

Fixed In Version: 1.4.2-2.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-17 22:24:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
encfs-flock.c - encfs flock problem reproducer (361 bytes, text/plain)
2008-04-03 18:38 UTC, Tomas Hoger
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 200685 0 None None None Never

Description Tomas Hoger 2008-04-03 18:38:17 UTC
Description of problem:

fuse-encfs does not seem to implement flocks properly.  It allows multiple
processes to acquire LOCK_EX flocks on the same file.  Additionally, multiple
locks can cause encfs mount to "freeze" - all processes attempting an IO on any
file in encfs filesystem are blocked and uninterruptible.


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

$ rpm -q fuse fuse-encfs
fuse-2.7.3-2.fc8
fuse-encfs-1.4.1.1-1.fc8


Steps to Reproduce:
1. Create encfs filesystem / mount.
2. Compile attached program.
3. Run it inside encfs mount as: ./encfs-flock & ./encfs-flock & ./encfs-flock
4. Try e.g. ls encfsdir
5. Do: killall encfs-flock ; killall ulockmgr_server  to bring encfs mount back
to life.


Actual results:
Multiple locks acquired, encfs mount IO blocked.


Expected results:
No blocked IO, no multiple locks.


Additional info:

Previous F8 fuse-encfs version was not affected by this problem.

Tested also with fuse-sshfs-1.9-2.fc8, problem does not occur there, which may
imply this is encfs issue rather than fuse issue.

This problem was spotted when running autotools inside encfs mount.  You should
be able to reproduce with rpmbuild rebuild of any SRPM that calls autoconf /
autoreconf in %prep (e.g. openssh, cups).

Comment 1 Tomas Hoger 2008-04-03 18:38:17 UTC
Created attachment 300300 [details]
encfs-flock.c - encfs flock problem reproducer

Comment 2 vgough 2008-04-10 05:38:29 UTC
See https://bugs.launchpad.net/encfs/+bug/200685  for comments.

Comment 3 vgough 2008-04-14 01:17:11 UTC
fixed in 1.4.2 release

Comment 4 Fedora Update System 2008-05-06 05:41:34 UTC
fuse-encfs-1.4.2-2.fc8 has been submitted as an update for Fedora 8

Comment 5 Fedora Update System 2008-05-06 05:42:30 UTC
fuse-encfs-1.4.2-2.fc9 has been submitted as an update for Fedora 9

Comment 6 Fedora Update System 2008-05-10 13:56:24 UTC
fuse-encfs-1.4.2-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fuse-encfs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-3555

Comment 7 Fedora Update System 2008-05-17 22:24:11 UTC
fuse-encfs-1.4.2-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2008-05-17 22:25:04 UTC
fuse-encfs-1.4.2-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.


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