Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#30129 closed enhancement (fixed)

encfs 1.74 Mac OS X Lion

Reported by: tristan.klocke@… Owned by: Markus.Ueberall@…
Priority: Normal Milestone:
Component: ports Version: 1.9.99
Keywords: lion Cc: anatol (Anatol Pomozov), drkp (Dan Ports), chris.platts@…, joscha@…, bonoba@…, psyki.be@…, kvanrhee@…, mni@…
Port: encfs

Description

Something seems to be broken in the latest Mac OS X Lion (10.7) release. Building encfs with Xcode 4.2 and MacPorts 1.9.9 is possible when disabling the macfuse dependency. Instead installing the unoffical MacFuse Core package guruantee compatibility. Also see for further information: http://groups.google.com/group/macfuse/msg/b719be671de8f84e

Creating an encrypted volume and mounting it from commandline is possible but writing files to the decrypted volume causes a finder error which prohibit storing files in it. I think it has something to do with the permissions.

By the way: There is now a new project called fuse4x, which supports more recent changes to the Mac OS: http://fuse4x.org/

Attachments (1)

Locum_2011-07-25-141442_localhost.crash (23.5 KB) - added by anatol (Anatol Pomozov) 13 years ago.
Locus crash dump

Download all attachments as: .zip

Change History (54)

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to Markus.Ueberall@…

Please remember to cc the maintainer.

comment:2 in reply to:  description Changed 13 years ago by tristan.klocke@…

Here's the error which pops up when trying to write files to the encfs volume:

"The operation can’t be completed because an unexpected error occurred (error code -8003)."

comment:3 Changed 13 years ago by tristan.klocke@…

Sorry for reply again, but I just discovered that copying files with the terminal into the encfs volume works flawless. So there must be something wrong with the finder.

comment:4 Changed 13 years ago by anatol (Anatol Pomozov)

Cc: anatol.pomozov@… added

Cc Me!

comment:5 Changed 13 years ago by anatol (Anatol Pomozov)

@tristan - macports team is working on replacing macports with fuse4x #29917

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 13 years ago by anatol (Anatol Pomozov)

I confirm that the problem exist on Lion.

If I copy files using Terminal - everything works fine, but if I use Finder - it failed with the error alert. I checked system.log and see following message:

Jul 25 14:14:41 Anatols-Mac-mini ReportCrash[94636]: DebugSymbols was unable to start a spotlight query: spotlight is not responding or disabled.
Jul 25 14:14:42 Anatols-Mac-mini com.apple.launchd[1] (com.apple.locum.078A852B-5B4B-4FE1-8991-5B145AECDB89[94635]): Job appears to have crashed: Floating point exception: 8
Jul 25 14:14:42 Anatols-Mac-mini ReportCrash[94636]: Saved crash report for Locum[94635] version ??? (???) to /Library/Logs/DiagnosticReports/Locum_2011-07-25-141442_localhost.crash
Jul 25 14:14:45 Anatols-Mac-mini com.apple.launchd[1] (com.apple.locum.078A852B-5B4B-4FE1-8991-5B145AECDB89): Throttling respawn: Will start in 6 seconds

See crash report in the attached file.

This makes me think that it is a bug in Locus binary.

Changed 13 years ago by anatol (Anatol Pomozov)

Locus crash dump

comment:7 Changed 13 years ago by anatol (Anatol Pomozov)

I just filed an issue to Apple - let's see what they respond.

comment:8 Changed 13 years ago by drkp (Dan Ports)

Cc: dports@… added

Cc Me!

comment:9 Changed 13 years ago by drkp (Dan Ports)

Does using the allow_root or allow_others option help?

comment:10 in reply to:  9 Changed 13 years ago by chris.platts@…

Replying to dports@…:

Does using the allow_root or allow_others option help?

I've been trying to get encfs running on Lion also.

Adding allow_others does indeed allow Finder to write to the volume. However, under heavy use, the volume spontaneously unmounts. The console log (which I don't have handy right now, unfortunately) mentions that fuse timed out waiting for the filesystem and killed the volume.

encfs 1.74 with both unofficial MacFuse releases, as well as fuse4x and OSXFUSE.

comment:11 Changed 13 years ago by chris.platts@…

Cc: chris.platts@… added

Cc Me!

comment:12 Changed 13 years ago by anatol (Anatol Pomozov)

fuse timed out waiting for the filesystem and killed the volume

It sounds like EncFS fuse daemon dies under heavy load. Do you have a repro case for it? Maybe a shell/ruby script that generates that heavy load (e.g. by copying/creating files).

comment:13 Changed 13 years ago by anatol (Anatol Pomozov)

Here is the response from Apple:

Hello Anatol,

After further investigation it has been determined that this is a known issue, which is currently being investigated by engineering. This issue has been filed in our bug database under the original Bug ID# 7367542.

Thank you for submitting this bug report.

comment:14 Changed 13 years ago by joscha@…

Cc: joscha@… added

Cc Me!

comment:15 Changed 13 years ago by bonoba@…

Cc: bonoba@… added

Cc Me!

comment:16 in reply to:  12 Changed 13 years ago by chris.platts@…

Replying to anatol.pomozov@…:

fuse timed out waiting for the filesystem and killed the volume

It sounds like EncFS fuse daemon dies under heavy load. Do you have a repro case for it? Maybe a shell/ruby script that generates that heavy load (e.g. by copying/creating files).

Not had a chance to make a synthetic test, but I've done some more experimentation...

I keep most of my user data on an encfs volume. Almost everything works without a problem. However, opening my iPhoto library on the volume always triggers the symptoms described. 'Sequential' accesses (e.g. copying files from the volume, deleting files on the volume and creating many files one-after-another) are fine. But it seems that iPhoto opens a whole bunch of files at once with lots of two-way I/O (or keeps many open at once) seems to kill it.

I'll see if I can get anything useful out of encfs -vf ...'s output.

comment:17 Changed 13 years ago by psyki.be@…

Cc: psyki.be@… added

Cc Me!

comment:18 Changed 13 years ago by psyki.be@…

Hello,

I'm not 100% sure this is the same bug, but I also saw the problem where the EncFS fuse daemon timed out and killed the volume. This only happens on heavy load, and ONLY on 64 bit machines (both Snow Leopard and Lion tested) 32 bit machines (both Leopard and Snow Leopard tested) are not affected..

However, I did not see any FInder errors. (note that I reproduced 90% of the time using Terminal, not UI).

I reported the bug here: http://code.google.com/p/encfs/issues/detail?id=112 and here: http://groups.google.com/group/macfuse/browse_thread/thread/217a91cb665dfab5

Note that I did not use Macports (I manually compiled it, and then afterwards tried Homebrew as well), but it seems like the same issue.

comment:19 Changed 13 years ago by joscha@…

There is also a discussion about this here: http://groups.google.com/group/macfuse/tree/browse_frm/thread/217a91cb665dfab5/0135096397e737b0 and a script to reproduce this can be found here: http://pastebin.com/4vq7eetU

comment:20 Changed 13 years ago by kvanrhee@…

CC me

comment:21 Changed 13 years ago by kvanrhee@…

Cc: kvanrhee@… added

Cc Me!

comment:22 Changed 13 years ago by kvanrhee@…

Using sudo and --public helps to a certain extend. I can now copy files from within the finder. But something strange happens.

Only files with extended attributes are being copied. So when I would drag both IMG_0418.jpg and IMG_0419.jpg into the mounted encfs volume. Only IMG_0418.jpg would be copied...

$ ls -la@
-rwxr-xr-x@  1 volsk  staff  1955935 12 aug 10:44 IMG_0418.jpg
	com.apple.FinderInfo	     32 
-rwxr-xr-x   1 volsk  staff  1994790 12 aug 10:44 IMG_0419.JPG

Note: from the command line everything works like a charm.

comment:23 Changed 13 years ago by anatol (Anatol Pomozov)

Here is a *possible* solution suggested by Peter. I applied the fix to Fuse4X HEAD and compiled fuse4x package http://dl.dropbox.com/u/3842605/Fuse4X-0.8.10.pkg

It fixes the Finder permission issue on Lion for me. Could anyone please confirm it as well?

PS Note: you need to compile encfs agains standalone version of Fuse4X or use precompiled EncFS from here http://www.lisanet.de/blog/dnl/Encfs-1.7.4.dmg

comment:24 Changed 13 years ago by drkp (Dan Ports)

fuse4x 0.8.10 (r82677) should fix it. Can anyone confirm that works?

comment:25 Changed 13 years ago by anatol (Anatol Pomozov)

The ticket consists of 2 issues: 1) Permissions issue on Lion when one uses Finder 2) Deadlock on 64bits kernels

Fuse4X 0.8.10 fixes the first issue. It probably makes sense to move 2 to a separate ticket.

comment:26 Changed 13 years ago by mni@…

Cc: mni@… added

Cc Me!

comment:27 Changed 13 years ago by tristan.klocke@…

This is what I get when I try to mount a encfs volume with 0.8.10 from MacPorts with the binaries from the precompiled EncFS.

dyld: Library not loaded: /usr/local/lib/libfuse4x.2.dylib
  Referenced from: /usr/local/bin/encfs
  Reason: image not found
Trace/BPT trap: 5
Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:28 Changed 13 years ago by drkp (Dan Ports)

The precompiled encfs links against the standalone installation of fuse4x. You'll need to use the encfs port.

comment:29 Changed 13 years ago by anatol (Anatol Pomozov)

Ok, I think I know how to fix the other, "deadlock" issue with EncFS. The next release of Fuse4X will have a fix for it and you finally be able to use your encfs after "port install fuse4x encfs". Stay tuned.

comment:30 in reply to:  29 Changed 13 years ago by drkp (Dan Ports)

Replying to anatol.pomozov@…:

Ok, I think I know how to fix the other, "deadlock" issue with EncFS. The next release of Fuse4X will have a fix for it and you finally be able to use your encfs after "port install fuse4x encfs". Stay tuned.

Now available in r82966; please confirm whether it solves this problem or not.

comment:31 Changed 13 years ago by tristan.klocke@…

This doesnt solve the problem for me. Copying files inside a encfs-volume will be aborted with a Finder Error which says there isnt enought space availalbe even though it is. Deleting a file will be aborted with Finder Error -8072.

comment:32 Changed 13 years ago by anatol (Anatol Pomozov)

Hi, Tristan.

Show me output of the following commands

$ uname -a
$ which encfs
$ sysctl vfs.generic.fuse4x.

comment:33 Changed 13 years ago by tristan.klocke@…

  • Darwin tk-mbp-macosx-wlan.fritz.box 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64
  • /opt/local/bin/encfs
  • second level name generic in vfs.generic.fuse4x. is invalid

What does the last command mean exactly?

comment:34 Changed 13 years ago by anatol (Anatol Pomozov)

second level name generic in vfs.generic.fuse4x. is invalid

It says that fuse4x kernel extension is not loaded yet. Please mount a encfs folder and then run the "sysctl ..." once again.

Show me also "sysctl -a | grep fuse" and "mount | grep fuse".

comment:35 Changed 13 years ago by tristan.klocke@…

$ mount | grep fuse
encfs@fuse0 on /Users/tristank/Downloads/decrypt (fusefs, nodev, nosuid, synchronous, mounted by tristank)

$ sysctl -a | grep fuse
vfs.fusefs has 1 mounted instance
macfuse.control.kill: -1
macfuse.control.print_vnodes: -1
macfuse.counters.filehandle_reuse: 59323
macfuse.counters.filehandle_upcalls: 135
macfuse.counters.lookup_cache_hits: 11
macfuse.counters.lookup_cache_misses: 127
macfuse.counters.lookup_cache_overrides: 0
macfuse.counters.memory_reallocs: 6
macfuse.resourceusage.filehandles: 0
macfuse.resourceusage.filehandles_zombies: 0
macfuse.resourceusage.ipc_iovs: 2
macfuse.resourceusage.ipc_tickets: 1
macfuse.resourceusage.memory_bytes: 3112
macfuse.resourceusage.mounts: 1
macfuse.resourceusage.vnodes: 2
macfuse.tunables.admin_group: 80
macfuse.tunables.allow_other: 0
macfuse.tunables.iov_credit: 16
macfuse.tunables.iov_permanent_bufsize: 524288
macfuse.tunables.max_freetickets: 1024
macfuse.tunables.max_tickets: 0
macfuse.tunables.userkernel_bufsize: 16777216
macfuse.version.api_major: 7
macfuse.version.api_minor: 8
macfuse.version.number: 2.2.1
macfuse.version.string: 2.2.1, Jul 22 2011, 13:57:20

$ sysctl vfs.generic.fuse4x.
second level name generic in vfs.generic.fuse4x. is invalid

I also do have the latest MacFuse (Tuxera) 2.2.1 installed.

comment:36 Changed 13 years ago by anatol (Anatol Pomozov)

Ok, so you use macfuse. If you run "port installed | grep fuse" it most likely return macfuse.

The issue is not fixed there, it fixed in fuse4x only. You need to replace macfuse with fuse4x

$ sudo port -f uninstall macfuse
$ sudo port install fuse4x

comment:37 Changed 13 years ago by tristan.klocke@…

I dont use MacFuse from MacPorts I rather use the Precompiled Binary from http://www.macupdate.com/app/mac/23729/macfuse. I thought this two Fuse Version could coexist together.

comment:38 Changed 13 years ago by anatol (Anatol Pomozov)

Don't know what exactly happend there but encfs that you use is compiled against macfuse, not fuse4x. If you have macfuse port installed - uninstall and replace it with fuse4x.

comment:39 Changed 13 years ago by tristan.klocke@…

Thats really strange because there is no way encfs could know about MacFuse. Or am I wrong?

$ port installed | grep fuse
  ext2fuse @0.8.1_0 (active)
  fuse4x @0.8.8_0
  fuse4x @0.8.8_1
  fuse4x @0.8.9_0
  fuse4x @0.8.10_0
  fuse4x @0.8.11_0 (active)
  fuse4x-kext @0.8.8_0+universal
  fuse4x-kext @0.8.9_0+universal
  fuse4x-kext @0.8.10_0+universal
  fuse4x-kext @0.8.11_0+universal (active)

Anyway I deinstalled the precompiled MacFuse from Tuxera and now I'm getting this error:

$ encfs ~/Downloads/encrypt/ ~/Downloads/decrypt/
dyld: Library not loaded: /usr/local/lib/libfuse_ino64.2.dylib
  Referenced from: /opt/local/bin/encfs
  Reason: image not found
Trace/BPT trap: 5

comment:40 Changed 13 years ago by anatol (Anatol Pomozov)

So the encfs was linked against standalone macfuse (I believe this bug has been fixed recently in encfs port).

The last step is to reinstall encfs :)

$ sudo port uninstall encfs
$ sudo port install encfs

comment:41 Changed 13 years ago by tristan.klocke@…

Now it's working. I uninstalled encfs and installed it again. Somehow it was build against the precompiled MacFuse Binaries even though this shouldnt be possible.

comment:42 Changed 13 years ago by anatol (Anatol Pomozov)

Great!

Could you please test that fuse4x fixes two issues above?

comment:43 Changed 13 years ago by tristan.klocke@…

Great! Thanks for your efforts. I really appreciate your support. Which was the other issue? How do I reproduce it?

comment:44 Changed 13 years ago by anatol (Anatol Pomozov)

The other issue is an encfs deadlock. comment:19 contains a script that reproduces the problem.

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:45 Changed 13 years ago by tristan.klocke@…

I can confirm that this issue is also fixed. I run the script for about a 30 Seconds without any problem. It stopped it by "Creating file no 2183".

comment:46 Changed 13 years ago by anatol (Anatol Pomozov)

Great! Dan, could you please close the ticket?

comment:47 Changed 13 years ago by drkp (Dan Ports)

Resolution: fixed
Status: newclosed

And there was much rejoicing.

comment:48 Changed 13 years ago by chris.platts@…

FYI, I'm still getting occasional hard-lockups on apps which access the encfs volume, even with the latest fuse4x/encfs versions.

There's absolutely no console output to identify what's happening, but it appears to happen under heavy load once again. It occurred when running an rm -rf on a folder with several thousand files and folders. Terminal became unresponsive, quickly followed by the Finder.

I recovered the system by force-quitting encfs, then Terminal and Finder.

I'll see if I can re-create this, then open another ticket.

comment:49 in reply to:  description Changed 13 years ago by tristan.klocke@…

Resolution: fixed
Status: closedreopened

It's not over. I'm still getting a finder error "-42" when copying large amount of files.

comment:50 Changed 13 years ago by anatol (Anatol Pomozov)

I need more information.

Please provide step-by-step reproduce case (including all relevant information such as exact version of MacOSX, exact version of fuse4x, encfs, ....).

comment:51 Changed 13 years ago by anatol (Anatol Pomozov)

Tristan,

any news? Do you have a repro case for your problem? I tested encfs on 10.7 and everything looks fine.

comment:52 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: reopenedclosed

Re-closing; no response to requests for further information.

comment:53 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: 10.7 removed
Note: See TracTickets for help on using tickets.