Gentoo Archives: gentoo-user

From: Nilesh Govindrajan <me@××××××××.com>
To: Gentoo User Mailing List <gentoo-user@l.g.o>
Subject: [gentoo-user] Re: su hangs
Date: Mon, 11 Aug 2014 19:29:20
Message-Id: CAHgBc-vaw0=e4TfCrS_bWu9UcuAfL_btAUYFY4=u6n7Y0X74Kg@mail.gmail.com
In Reply to: [gentoo-user] su hangs by Nilesh Govindrajan
1 On Mon, Aug 11, 2014 at 9:14 PM, Nilesh Govindrajan <me@××××××××.com> wrote:
2 > I have pam_pgsql and libnss-pgsql installed. On one server su works
3 > perfectly, but on the other one when I try to su (both, with and
4 > without -l) it hangs.
5 >
6 > Both are using systemd and the same kernel (they are same config
7 > except # of HDDs).
8 >
9 > Here's the strace -
10 >
11 > fstat(4, {st_mode=S_IFREG|0644, st_size=10523, ...}) = 0
12 > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
13 > 0) = 0x2afda592000
14 > read(4, "#\n# /etc/login.defs - Configurat"..., 4096) = 4096
15 > read(4, "ogin configuration initializatio"..., 4096) = 4096
16 > read(4, "\n#ENCRYPT_METHOD DES\n\n#\n# Only w"..., 4096) = 2331
17 > read(4, "", 4096) = 0
18 > close(4) = 0
19 > munmap(0x2afda592000, 4096) = 0
20 > access("/var/run/utmpx", F_OK) = -1 ENOENT (No such file or directory)
21 > open("/var/run/utmp", O_RDONLY|O_CLOEXEC) = 4
22 > lseek(4, 0, SEEK_SET) = 0
23 > alarm(0) = 0
24 > rt_sigaction(SIGALRM, {0x2afd9cdf070, [], SA_RESTORER, 0x2afd9bf5850},
25 > {SIG_DFL, [], SA_RESTORER, 0x2afd9bf5850}, 8) = 0
26 > alarm(10) = 0
27 > fcntl(4, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
28 > read(4, "\2\0\0\0\0\0\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
29 > 384) = 384
30 > read(4, "\6\0\0\0P\n\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
31 > 384) = 384
32 > read(4, "\10\0\0\0%\23\0\0pts/0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
33 > 384) = 384
34 > read(4, "\10\0\0\0E\23\0\0pts/1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
35 > 384) = 384
36 > read(4, "\7\0\0\0I\"\0\0pts/2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
37 > 384) = 384
38 > fcntl(4, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
39 > alarm(0) = 10
40 > rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x2afd9bf5850}, NULL, 8) = 0
41 > close(4) = 0
42 > getuid() = 0
43 > sendto(3, "<86>Aug 11 17:42:30 su[8791]: pa"..., 96, MSG_NOSIGNAL, NULL, 0) = 96
44 > clone(child_stack=0,
45 > flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
46 > child_tidptr=0x2afda58f9d0) = 8793
47 > rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], NULL, 8) = 0
48 > rt_sigaction(SIGTERM, {0x403830, [], SA_RESTORER, 0x2afd9bf5850}, NULL, 8) = 0
49 > rt_sigprocmask(SIG_UNBLOCK, [ALRM TERM], NULL, 8) = 0
50 > wait4(-1,
51 >
52 > Any ideas what is it waiting on?
53
54 Looks like it was because of nscd being disabled. I forgot to enable
55 it after transitioning to systemd.