Okay, I did a `strace login viktor` to find out, where login was hanging. Here's an excerpt:
-----snip----- access("/var/run/utmpx", F_OK) = -1 ENOENT (No such file or directory) open("/var/run/utmp", O_RDWR) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 _llseek(3, 0, [0], SEEK_SET) = 0 alarm(0) = 0 rt_sigaction(SIGALRM, {0x401569e0, [], 0x4000000}, {0x804a3c8, [ALRM], SA_RESTART|0x4000000}, 8) = 0 alarm(1) = 0 fcntl64(3, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0 read(3, "\10\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\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"..., 384) = 384 read(3, "\1\0\0\0003N\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\10\0\0\0\242\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\5\0\0\0%\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0\24\1\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\5\0\0\0\25\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0\25\1\0\0tty2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\7\0\0\0\2\1\0\0:0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\5\0\0\0\31\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0\31\1\0\0tty3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\5\0\0\0B\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0B\1\0\0tty4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\5\0\0\0g\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0g\1\0\0tty5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\5\0\0\0\241\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0\241\1\0\0tty6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\6\0\0\0%\3\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "\7\0\0\0003\3\0\0pts/3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 read(3, "", 384) = 0 fcntl64(3, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0 rt_sigaction(SIGALRM, {0x804a3c8, [ALRM], SA_RESTART|0x4000000}, NULL, 8) = 0 alarm(0) = 1 alarm(0) = 0 rt_sigaction(SIGALRM, {0x401569e0, [], 0x4000000}, {0x804a3c8, [ALRM], SA_RESTART|0x4000000}, 8) = 0 alarm(1) = 0 fcntl64(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = ? ERESTARTSYS (To be restarted) --- SIGALRM (Alarm clock) --- sigreturn() = ? (mask now []) _llseek(3, 0, [7296], SEEK_END) = 0 write(3, "\7\0\0\0^\3\0\0pts/4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 fcntl64(3, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0 rt_sigaction(SIGALRM, {0x804a3c8, [ALRM], SA_RESTART|0x4000000}, NULL, 8) = 0 alarm(0) = 0 close(3) = 0 -----snip----- The program hangs in the line fcntl64(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = ? ERESTARTSYS (To be restarted) After 30 seconds it get's a SIGALRM and continues. I noticed that login checks for /var/run/utmpx. When I touch this file, login works fine (including a fast logout). I also touched /var/log/wtmpx for the same reason. However, the system still needs a minute for the first getty to appear after bootup and more than a minute for the INIT: switching to runlevel 6 upon shutdown. I never had /var/run/utmpx nor /var/log/wtmpx before. I have a system running potato (along with kernel 2.4) and libc5-2.1.3, there the problem does not appear. ANY help is greatly appreciated. Ciao, Viktor Viktor Rosenfeld wrote: > 3) Now comes the mystery. The system needs ages for a user login. > After I have entered the password, I get the motd and the "No Mail" > message, but then I have to wait 30 seconds for a shell. Upon logout > I have to wait 1 minute for a new login prompt. This happens both > for user and for the root account. Also both at the console and when > starting KDE (the startup needs exactly 30 seconds more than usual). > A `su - user` is unaffected, though. I suspect a timeout somewhere, > but my /etc/nsswitch.conf is from January. :( > > The magic SYS-RQ key stopped working. Alt+Printscreen will switch > consoles. :( > > The system needs 8 (eight!) minutes to shutdown. After two minutes > the initial > > INIT: sending processes the TERM signal > > message appears, then nothing happens for six more minutes. Then the > system shuts down. > > No messages in the syslog, too. :( > > This behavior is extremely annoying. Currently I switch the system off > by hitting the big red button. Luckily all file system except the root > are served by NFS, so things could be a lot worse. > > *Any* ideas how to fix this? Any help would be greatly appreciated! -- Viktor Rosenfeld WWW: http://www.informatik.hu-berlin.de/~rosenfel/
pgp5VL3hXTLOY.pgp
Description: PGP signature