EncFS idle feature not working

Bug #268557 reported by Emanuele Santanche
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Nautilus
New
Undecided
Unassigned
encfs (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: encfs

I'm trying to use the idle feature of encfs but it doesn't work.

encfs version:
encfs versione 1.3.2
uname -a
Linux pico 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux
cat /etc/issue
Ubuntu 8.04.1 \n \l

Running encfs foreground and looking at the source, I find that the idle thread
stops at the following call of the pthread_cond_timedwait function:
00514 pthread_cond_timedwait( &ctx->wakeupCond,
00515 &ctx->wakeupMutex, &wakeupTime );
(these are lines of main.cpp source of encfs package I found here:
http://encfs.sourcearchive.com/documentation/1.3.2-1/main_8cpp-source.html)
The function doesn't exit after the timeout I gived by command line options.
Maybe it stops while sleeping (__libc_nanosleep) or can't lock the mutex before exiting.
I think it's a glibc problem or a lower level one.
Now I'm trying to wait two hours to see if it's a timezone problem (UTC vs. GMT+2).

Revision history for this message
Stephen Crowley (crow-crowlogic) wrote :

I believe the problem is that 'idle cycle count' is reset due to some loop problem where encfs itself acceses the filesystem repeatedly without end, thus causing the usage to reset once a second or more.

user@machine:~$ cat bug268557.log | grep -i idle
12:05:13 (main.cpp:437) starting idle monitoring thread
12:05:13 (main.cpp:704) idle cycle count: 1, timeout after 60
12:05:23 (main.cpp:704) idle cycle count: 0, timeout after 60
12:05:33 (main.cpp:704) idle cycle count: 0, timeout after 60
12:05:43 (main.cpp:704) idle cycle count: 0, timeout after 60
12:05:48 (main.cpp:471) joining with idle monitoring thread
12:05:48 (main.cpp:717) Idle monitoring thread exiting

It loops like this ad infinitum

12:05:45 (Context.cpp:119) no node found for /
12:05:45 (MACFileIO.cpp:68) fs block size = 1024, macBytes = 8, randBytes = 0
12:05:45 (FileNode.cpp:140) calling setIV on (null)
12:05:45 (DirNode.cpp:736) created FileNode for /home/user/.encdir/
12:05:45 (encfs.cpp:133) getattr /home/user/.encdir/
12:05:46 (encfs.cpp:684) doing statfs of /home/user/.encdir
12:05:46 (encfs.cpp:684) doing statfs of /home/user/.encdir

Revision history for this message
Jesse (sbjesse) wrote :

Doing a "encfs -vfi 1", my guess is that Nautilus is issuing a statfs every 2.5 seconds. I don't have a system at the moment where I can start a bare X session, would love to try encfs at the absence of nautilus otherwise. Maybe they could use some better notification mechanism instead of probing the FS themselves? Or maybe encfs can ignore statfs as "activity" ?

Revision history for this message
Jesse (sbjesse) wrote :

I've just tried mounting encfs sans gnome, and it worked just as expected. I can't be sure whether it's Nautilus or any other part of Gnome that probes the FS so frequently. But I guess it'll be easier for EncFS to change? (wishing I could contribute code but time doesn't permit at the moment, what a shame)

Revision history for this message
C Michal (michal-physics) wrote :

For me, it is the gnome system monitor applet (with disk monitoring enabled) that causes the problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in encfs (Ubuntu):
status: New → Confirmed
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.