← Back to team overview

ecryptfs team mailing list archive

[Bug 460476] Re: ecryptfs: disabling auto-mount diables gdm login

 

Well, I did an strace, and also a gdb backtrace of the problem at hand.

The strace fragment takes up right after login has succeeded ((visually
there's never any sign of a logged-in session -- the screen just blanks,
and Xorg restarts, it all happens very quickly).

At the end of this fragment notice that SIGPIPE is raised twice, on socket
fd's 25 and 26. I believe these are both /tmp/.X11-unix/X0.

The gdb backtrace reflects this as well, I think.

Now admittedly, this is taking me a bit far from the original problem,
getting ecryptfs to not auto-mount, and testing that by: umounting the
ecryptfs, removinf the file auto-mount, and then logging out and back into
the X server (not a reboot).
But the thing is, this dying of Xorg happens /only/ under exactly these
circumstances. Normally logging out and back in worked, and still works,
without any problem.

OK, here are the two traces:

strace:
(22932 = Xorg)
...
23246 13:03:23.308453 read(13, "\2"..., 1) = 1
23246 13:03:23.308508 read(13, "d"..., 1) = 1
23246 13:03:23.308556 read(13, "e"..., 1) = 1
23246 13:03:23.308603 read(13, "f"..., 1) = 1
23246 13:03:23.308650 read(13, "a"..., 1) = 1
23246 13:03:23.308698 read(13, "u"..., 1) = 1
23246 13:03:23.308746 read(13, "l"..., 1) = 1
23246 13:03:23.308793 read(13, "t"..., 1) = 1
23246 13:03:23.308840 read(13, "."..., 1) = 1
23246 13:03:23.308889 read(13, "d"..., 1) = 1
23246 13:03:23.308936 read(13, "e"..., 1) = 1
23246 13:03:23.308983 read(13, "s"..., 1) = 1
23246 13:03:23.309030 read(13, "k"..., 1) = 1
23246 13:03:23.309077 read(13, "t"..., 1) = 1
23246 13:03:23.309124 read(13, "o"..., 1) = 1
23246 13:03:23.309172 read(13, "p"..., 1) = 1
23246 13:03:23.309219 read(13, "\n"..., 1) = 1
23246 13:03:23.309270 gettimeofday({1256558603, 309287}, {4294967236, 0}) = 0
23246 13:03:23.309345 write(12, "\2&\n"..., 3) = 3
23246 13:03:23.309483 sched_yield()     = 0
23246 13:03:23.309532 read(13, "\2"..., 1) = 1
23246 13:03:23.309585 read(13, "\n"..., 1) = 1
23246 13:03:23.309633 gettimeofday({1256558603, 309650}, {4294967236, 0}) = 0
23246 13:03:23.309695 write(12, "\2C\n"..., 3) = 3
23246 13:03:23.309782 sched_yield()     = 0
23246 13:03:23.309829 read(13, "\2"..., 1) = 1
23246 13:03:23.309880 read(13, "\n"..., 1) = 1
23246 13:03:23.309929 gettimeofday({1256558603, 309946}, {4294967236, 0}) = 0
23246 13:03:23.309983 write(12, "\2R\n"..., 3) = 3
23246 13:03:23.310064 sched_yield()     = 0
23246 13:03:23.310110 read(13, "\2"..., 1) = 1
23246 13:03:23.310162 read(13, "\n"..., 1) = 1
23246 13:03:23.310210 gettimeofday({1256558603, 310226}, {4294967236, 0}) = 0
23246 13:03:23.310277 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
23246 13:03:23.310342 write(12, "\2P\n"..., 3) = 3
23246 13:03:23.310458 sched_yield()     = 0
23246 13:03:23.310506 read(13,  <unfinished ...>
22932 13:03:23.310532 <... select resumed> ) = 1 (in [25], left {97, 520820})
22932 13:03:23.310599 setitimer(ITIMER_REAL, {it_interval={0, 20000}, it_value={0, 20000}}, NULL) = 0
22932 13:03:23.310661 clock_gettime(CLOCK_MONOTONIC, {11883, 774747739}) = 0
22932 13:03:23.310718 read(25, "+\30\1\0"..., 4096) = 4
22932 13:03:23.310791 read(25, 0x8b58998, 4096) = -1 EAGAIN (Resource temporarily unavailable)
22932 13:03:23.310847 writev(25, [{"\1\0u\f\0\0\0\0\1\0\0\0\0\0\0\0\4\0\0\0a\0\0\0000D\257\10\0\0\0\0"..., 32}], 1 <unfinished ...>
23246 13:03:23.315077 <... read resumed> "\2"..., 1) = 1
23246 13:03:23.315199 read(13, "\n"..., 1) = 1
23246 13:03:23.315252 gettimeofday({1256558603, 315270}, {4294967236, 0}) = 0
23246 13:03:23.315318 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
23246 13:03:23.315407 select(5, [4], NULL, NULL, NULL) = 1 (in [4])
23246 13:03:23.315470 read(4, "!"..., 1) = 1
23246 13:03:23.315521 select(5, [4], NULL, NULL, NULL <unfinished ...>
22932 13:03:23.315553 <... writev resumed> ) = 32
22932 13:03:23.315594 clock_gettime(CLOCK_MONOTONIC, {11883, 779682134}) = 0
22932 13:03:23.315652 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
22932 13:03:23.315726 select(256, [1 3 5 7 11 12 13 19 24 25 26], NULL, NULL, {97, 516000}) = 2 (in [25 26], left {97, 515983})
22932 13:03:23.315840 setitimer(ITIMER_REAL, {it_interval={0, 20000}, it_value={0, 20000}}, NULL) = 0
22932 13:03:23.315898 clock_gettime(CLOCK_MONOTONIC, {11883, 779985014}) = 0
22932 13:03:23.315975 read(25, "\2\30\4\0\30\1@\0\1\0\0\0\0\0\0\0\2\4\4\0!\1@\0\1\0\0\0\0\0\0\0\n\0\2\0#\1@\0\2\2\4\0\30\1@\0\2\0\0\0\23\23\23\0\2\1\4\0!\1@\0\2"..., 4096) = 324
22932 13:03:23.316180 mmap2(NULL, 5246976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6119000
22932 13:03:23.335951 --- SIGALRM (Alarm clock) @ 0 (0) ---
22932 13:03:23.336089 sigreturn()       = ? (mask now [])
22932 13:03:23.338420 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
22932 13:03:23.338547 select(256, [1 3 5 7 11 12 13 19 24 26], NULL, NULL, {0, 0}) = 1 (in [26], left {0, 0})
22932 13:03:23.338663 setitimer(ITIMER_REAL, {it_interval={0, 20000}, it_value={0, 20000}}, NULL) = 0
22932 13:03:23.338724 clock_gettime(CLOCK_MONOTONIC, {11883, 802812793}) = 0
22932 13:03:23.338806 munmap(0xb6119000, 5246976) = 0
22932 13:03:23.339839 read(25, ""..., 4096) = 0
22932 13:03:23.339913 writev(25, [{"\22Bx\f#\1@\0#\1@\0\0\0\0\0\310\310\267\277\332\37\t\10\354\310\267\277#\1@\0\f\37x\f!\1@\0\0\0\0\0\346\0\26\0\0\0\0\0\3249\37\10\0\0\0\0\0\0\0\0\22"..., 128}], 1) = -1 EPIPE (Broken pipe)
22932 13:03:23.340054 --- SIGPIPE (Broken pipe) @ 0 (0) ---
22932 13:03:23.340161 shutdown(25, 2 /* send and receive */) = 0
22932 13:03:23.340216 close(25)         = 0
22932 13:03:23.340432 clock_gettime(CLOCK_MONOTONIC, {11883, 804533149}) = 0
22932 13:03:23.340586 shmdt(0xb60b9000) = 0
22932 13:03:23.340859 clock_gettime(CLOCK_MONOTONIC, {11883, 804958718}) = 0
22932 13:03:23.341034 writev(26, [{"\21\310I\0\244\0\0\0\1\0@\0\270\32\256\10\260\32\256\10\364_\36\10\270\32\256\0107\0\0\0\22\34I\0\244\0\0\0\376\0@\0\0\0\0\0\30\310\267\277\30\320\f\267(#\257\0108\204\r\267\21"..., 96}], 1) = -1 EPIPE (Broken pipe)
22932 13:03:23.341199 --- SIGPIPE (Broken pipe) @ 0 (0) ---
22932 13:03:23.341300 shutdown(26, 2 /* send and receive */) = 0
22932 13:03:23.341356 close(26)         = 0
22932 13:03:23.341422 clock_gettime(CLOCK_MONOTONIC, {11883, 805510707}) = 0
...

gdb:
...
(gdb) cont
Continuing.

Program received signal SIGUSR1, User defined signal 1.
[Switching to Thread 0xb78966d0 (LWP 6123)]
0xb7ef0430 in __kernel_vsyscall ()
(gdb) cont
Continuing.

Program received signal SIGPIPE, Broken pipe.
0xb7ef0430 in __kernel_vsyscall ()
(gdb) backtrace full
#0  0xb7ef0430 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7b871fc in writev () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2  0x0813c29e in ?? ()
No symbol table info available.
#3  0x0813b2df in _XSERVTransWritev ()
No symbol table info available.
#4  0x08137282 in FlushClient ()
No symbol table info available.
#5  0x08135b17 in CloseDownConnection ()
No symbol table info available.
#6  0x080876ad in CloseDownClient ()
No symbol table info available.
#7  0x0808d418 in Dispatch ()
No symbol table info available.
#8  0x080722ed in main ()
No symbol table info available.
(gdb) quit

-- 
ecryptfs: disabling auto-mount diables gdm login
https://bugs.launchpad.net/bugs/460476
You received this bug notification because you are a member of eCryptfs,
which is subscribed to ecryptfs-utils in ubuntu.

Status in “ecryptfs-utils” package in Ubuntu: New

Bug description:
Binary package hint: ecryptfs-utils

ubuntu: Jaunty Jackalope 9.04
uname: Linux bjd-desktop 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:24 UTC 2009 i686 GNU/Linux
source package: ecryptfs-utils_73-0ubuntu6.1_i386.deb (installed the common way through apt)

Is the ecryptfs 'disable auto-mount' feature supposed to work with this version (73)?
Judging from the manual and binaries' options it should.

Here's the bottom line:
Succesfully created an ecryptfs directory, with the command 'ecryptfs-setup-private --noautomount'.
Running this command, among others, one of the reported messages is
'INFO: /home/bjd/Private will not be mounted on login'.
Log out. Try to log in again.
In the gdm box, enter name, enter password. Now after hitting RETURN after entering the password,
gdm seems to hang for ~25s. Login does not succeed. Instead gdm seems to die after those ~25s,
and to immediately restart, presenting me again with the login box.

To remedy this situation, login at a VT, touch ~/.ecryptfs/auto-mount, return to the gdm login screen,
and succesfully login. Of course, at this time the ecryptfs is mounted, but the conclusion is: disabling
auto-mount apparently doesn't seem to allow me to login for some reason.

Additonal information:
- All ecryptfs directories and supporting setup seem to be in place correctly, I have ~/Private, ~/.Private,
~/.ecryptfs, and their content files, and the PAM configuration files all look good: in /etc/pam.d, the files
common-auth, common-password and common-session have their respective ecryptfs modifications:
common-auth:        auth           optional pam_ecryptfs.so unwrap
common-password: password   optional pam_ecryptfs.so 
common-session:    session     optional pam_ecryptfs.so unwrap

- Again retrying several times, manually unmounting ~/Private, removing ~/.ecryptfs/auto-mount and
then login, failed in the same way as described above.

Glad to provide any additional info.

bjd



References