Bug 440483

Summary: fuse-encfs: issues with flocks
Product: [Fedora] Fedora Reporter: Tomas Hoger <thoger>
Component: fuse-encfsAssignee: Peter Lemenkov <lemenkov>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 8CC: vgough
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4.2-2.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-17 22:24:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
encfs-flock.c - encfs flock problem reproducer none

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.