Bug 412567

Summary: encfs: all broken, refuses to mount
Product: [openSUSE] openSUSE 11.0 Reporter: Jan Engelhardt <jengelh>
Component: BasesystemAssignee: Philipp Thomas <pth>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Blocker    
Priority: P5 - None CC: dmueller, forgotten_sLJ7K2dvxj, forgotten_UzoFN9Q9Tb, gull, hmuelle, meissner, tiwai, tuukka.pasanen
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: Linux   
Whiteboard: maint:running:21173 maint:released:11.0:21176
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jan Engelhardt 2008-07-28 09:49:19 UTC
encfs 1.4 cannot read its own volumes anymore (neither encfs6, as 1.4 creates, nor encfs5 containers as 1.3 creates, see bug #408791).
Please downgrade to 1.3 and submit this "update".


05:42 linux-84vy:/dev/shm > encfs $PWD/{a,b}
Creating new encrypted volume.
Please choose from one of the following options:
 enter "x" for expert configuration mode,
 enter "p" for pre-configured paranoia mode,
 anything else, or an empty line will select standard mode.
?> p

Paranoia configuration selected.

Configuration finished.  The filesystem to be created has
the following properties:
Filesystem cipher: "ssl/aes", version 2:1:1
Filename encoding: "nameio/block", version 3:0:1
Key Size: 256 bits
Block Size: 1024 bytes, including 8 byte MAC header
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File data IV is chained to filename IV.

-------------------------- WARNING --------------------------
The external initialization-vector chaining option has been
enabled.  This option disables the use of hard links on the
filesystem. Without hard links, some programs may not work.
The programs 'mutt' and 'procmail' are known to fail.  For
more information, please see the encfs mailing list.
If you would like to choose another configuration setting,
please press CTRL-C now to abort and start over.

Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism.  However, the password can be changed
later using encfsctl.

New Encfs Password: 
Verify Encfs Password: 
05:42 linux-84vy:/dev/shm > l
total 6040
drwxrwxrwt  5 root    root      140 2008-07-28 05:42 .
drwxr-xr-x 13 root    root     4380 2008-07-28 05:26 ..
drwxr-xr-x  2 jengelh users      60 2008-07-28 05:42 a
drwxr-xr-x  2 jengelh users      60 2008-07-28 05:42 b
drwxr-xr-x  3 root    root      260 2008-07-28 05:26 sysconfig
05:42 linux-84vy:/dev/shm > fusermount -u b
05:42 linux-84vy:/dev/shm > encfs $PWD/{a,b}
encfs: ./boost/spirit/utility/impl/chset/range_run.ipp:123: void boost::spirit::utility::impl::range_run<CharT>::set(const boost::spirit::utility::impl::range<CharT>&) [with CharT = char]: Assertion `r.is_valid()' failed.
Aborted
Comment 1 Jan Engelhardt 2008-08-14 02:20:40 UTC
I can has comment?
Comment 2 Forgotten User UzoFN9Q9Tb 2008-08-19 07:07:44 UTC
I just came to report the same thing, as it has been reported to me by an end-user.  Strange thing is that encfs 1.4.x has been developed against boost 1.34.1 on Ubuntu, so I'm surprised to get reports of it failing with boost 1.34.1 on OpenSuse.

I installed OpenSuse 11 onto a virtual machine and the behavior is easy to reproduce.

Comment 3 Forgotten User UzoFN9Q9Tb 2008-08-23 13:56:52 UTC
Boost 1.34.1 doesn't appear compatible with gcc 4.3.1.

I built Boost 1.35 on OpenSuse 11 and recompiled encfs and it works as expected.  Encfs also works with 1.34.1 and gcc 4.2.3.  Likely that other programs which use boost on OpenSuse 11 will also be broken.  I'm informing users that this is a Suse issue, not encfs..
Comment 4 Forgotten User UzoFN9Q9Tb 2008-08-23 14:08:45 UTC
How to build with boost 1.35:

1. Download boost:
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=587936

2. can save time by only building filesystem and serialization libraries:
  ./configure --with-libraries=filesystem,serialization
  make
  sudo make install
(installs to /usr/local by default)

3. build encfs, point to boost installation
  ./configure --with-boost=/usr/local
  make
Comment 5 David Brodbeck 2008-08-25 04:44:17 UTC
I think it's actually a specific problem with the OpenSuSE build of boost 1.34.1, not a gcc 4.3 problem.  I built boost 1.34.1 and added it to LD_LIBRARY_PATH, and was able to get OpenSuSE's encfs binary to work without rebuilding.
Comment 6 Forgotten User sLJ7K2dvxj 2008-08-25 08:31:08 UTC
So it looks like a problem with the boost package, as opposed to boost itself.

Philipp, do you have any ide what could be causing this?
Comment 7 Philipp Thomas 2008-08-25 10:33:46 UTC
No, at the moment I'm at a loss. But I have a hunch :) @David: I assume you did compile boost from the source tarball and not from our .src.rpm, right? Then I guess there is a problem with boost as we override the compiler options to get the standard SUSE compiler flags used. I will test it but probabbly not this week.
Comment 8 Philipp Thomas 2008-08-25 10:36:01 UTC
I'll take over the bug at least until I've verified my suspicions.
Comment 9 David Brodbeck 2008-08-25 17:59:46 UTC
Yes, I compiled from the 1.34.1 source tarball.  I haven't tried doing it from the source RPM.

BTW, this only affects encfs 1.4.x filesystems -- ones with a .encfs6 configuration file.  Filesystems created with encfs 1.3.x, with an .encfs5 config file, work fine.  I think this is because they use different config file formats.
Comment 10 Tuukka Pasanen 2008-09-09 06:18:31 UTC
*** Bug 424342 has been marked as a duplicate of this bug. ***
Comment 11 Takashi Iwai 2008-09-30 15:17:17 UTC
The bug is still present on openSUSE 11.1-beta1.
Comment 12 Takashi Iwai 2008-09-30 16:17:47 UTC
FYI, I rebuilt SUSE boost package but with BJAM_TARGET=release instead of =rpm, and this works fine with the existing SUSE encfs.rpm.
Comment 13 Takashi Iwai 2008-09-30 17:08:11 UTC
More info: it seems that compiling with -DNDEBUG as release fixes the problem.
So, it can be either a bogus assert() check or the code works just coincidentally.
Comment 14 Takashi Iwai 2008-09-30 17:10:31 UTC
That is, I did something like:

--- boost-use_rpm_optflags.patch    2008-01-15 18:44:05.000000000 +0100
+++ boost-use_rpm_optflags.patch        2008-09-30 18:57:58.000000000 +0200
@@ -22,7 +22,7 @@  variant release : <optimization>speed <debug-symbols>off <inlining>full
                    <runtime-debugging>off <define>NDEBUG ;
  variant profile : release : <profiling>on <debug-symbols>on ;
-+variant rpm : <optimization>rpm <debug-symbols>rpm <inlining>full <runtime-debugging>off ;
++variant rpm : <optimization>rpm <debug-symbols>rpm <inlining>full <runtime-debugging>off <define>NDEBUG ;

  class searched-lib-target : abstract-file-target
  {
Comment 15 Philipp Thomas 2008-10-08 11:16:23 UTC
OK, I'll check this again when I move boost 1.36 from beta to stable. 
Comment 16 Jan Engelhardt 2008-10-08 12:56:59 UTC
So 10.3 is not gonna get fixed?
Comment 17 Takashi Iwai 2008-10-08 13:56:04 UTC
For 11.0?  Try boost package on OBS home:iwai repo.
Comment 18 Miguel de Icaza 2008-10-08 17:34:06 UTC
Just to echo the comments above: rebuilding Boost did fix my encfs issue.

I thought I had commented on this bug before, but I was mistaken.
Comment 19 Jan Engelhardt 2008-10-08 18:25:11 UTC
Yeah I 11.0 not 10.3...
works fine, please push to updates.
Comment 20 Takashi Iwai 2008-10-09 05:44:47 UTC
Correction: it's home:tiwai repo.
    http://download.opensuse.org/repositories/home:/tiwai/
Comment 21 Philipp Thomas 2008-10-13 14:53:33 UTC
boost 1.36 has been checked into STABLE on the weekend. This should then fix the issue. As soon as the new boost is available please check and mark as verified or reopen the bug.

Comment 22 Jim Henderson 2008-10-13 17:15:23 UTC
I can confirm that the bug is fixed using the version in the home:tiwai repo.

How soon will this go to the update mirrors?
Comment 23 Jan Engelhardt 2008-10-23 13:03:04 UTC
ping
Comment 24 Takashi Iwai 2008-11-03 13:10:29 UTC
The issue isn't FIXED at all.

- No official update package for 11.0 boost
- 11.1-beta4 boost breaks encfs totally
Comment 25 Takashi Iwai 2008-11-03 13:26:37 UTC
OK, encfs seems getting built, and working with boost-1.36, as far as I built locally.  So, 11.1 rc1 will be likely OK.

But, please keep this opening at least it's certainly fixed on 11.1-rc1.
Comment 26 Jan Engelhardt 2008-11-05 15:01:30 UTC
>- No official update package for 11.0 boost                                     

So make one. It's amazing how many bugs like this remain and are either only fixed in the next release or entirely shoveled into the future.
Comment 27 Miguel de Icaza 2008-11-05 20:45:39 UTC
I agree;   This is a killer feature and it means that effectively it is useless in OpenSUSE 11.

Upgrading to 11.1 is not an option for many (specially since it has not been released yet).
Comment 28 Philipp Thomas 2008-11-06 10:51:14 UTC
It's up to project management to decide whether a fixed boost package should be released for 11.0. Coolo, should we do it?
Comment 30 Dirk Mueller 2008-11-06 13:12:32 UTC
has anyone actually investigated what the real problem is? It's nice that -DNDEBUG fixes this particular application but it might break a completely different one. 

it should be pretty easy to figure out which codepath that is #ifdef'ed by NDEBUG is causing the problem
Comment 31 Philipp Thomas 2008-11-07 13:57:02 UTC
We might not! -DNDEBUG is the default for for boost and it's only missing in out boost because we use an own build target and that lacks the definition.
Comment 37 Philipp Thomas 2008-12-09 17:16:45 UTC
Boost packages compiled with -NDEBUG were submitted. This should fix the issue with encfs once they're released.
Comment 41 Marcus Meissner 2008-12-10 22:37:06 UTC
update is now in the testrepo and seems to work fine.

please also test.
(test repo is additional repo:
http://download.opensuse.org/update/11.0-test/
)
Comment 42 Swamp Workflow Management 2008-12-17 15:49:19 UTC
Update released for: 
openSUSE 11.0 (debug, i386, ppc, ppc64, x86_64)
Comment 43 Jan Engelhardt 2008-12-20 16:23:09 UTC
But this change has not been pushed to 11.1, or is boost 1.36 not affected?
Comment 44 Takashi Iwai 2008-12-20 22:55:44 UTC
boost-1.36 works fine as is.
Comment 45 Philipp Thomas 2009-01-07 12:03:38 UTC
I changed the way boost 1.36 is configured at build time so it automatically uses the standard compiler options :) Compare the .spec files for both boost versions and you'll see.