Daniel Jacobowitz <[EMAIL PROTECTED]> writes:

> On Fri, Sep 12, 2003 at 01:07:34PM +0200, Juergen Kreileder wrote:
>> Colin Watson <[EMAIL PROTECTED]> writes:
>>
>>> On Fri, Sep 12, 2003 at 10:06:41AM +0200, Anders Bostr?m wrote:
>>>> I tired and uppgraded to 2.3.2-6, as I hoped that the problems
>>>> was fixed (and I needed latest alsa, depending on 2.3.2). But it
>>>> still breaks ssh to my machine. ssh to localhost on my computer
>>>> works, but not from other hosts.
>>>
>>> I don't think anybody was aware that ssh was affected by this
>>> bug. It certainly works fine for me. Could you debug further, for
>>> instance by running sshd with the -ddd flag?
>>
>> I see the sshd problem too.  Just like with the mountd problem,
>> LD_PRELOAD=libpthread.so.0 works around it.

[...]

>> After "PAM setting tty..." it hangs.
>>
>>
>> When running with preloaded libpthread.so.0, the log continues
>> with:
>>
>> ,----
>> | debug1: PAM establishing creds
>> | debug2: fd 4 setting TCP_NODELAY
>> | debug1: channel 0: rfd 10 isatty
>> | debug1: Setting controlling tty using TIOCSCTTY.
>> | debug1: fd 10 setting O_NONBLOCK
>> | debug2: fd 9 is O_NONBLOCK
>> `----
>>
>> And the login succeeds.
>
> PAM does quite a lot n there.  Have you got anything special in your
> PAM config?

No, stock config.

> However, this is more likely to be related to syslogd; I see that it
> does write to /dev/log.  If you can reproduce this, strace -f sshd
> -ddd, and see where it gets stuck?

,----
| [pid  3191] write(2, "debug1: PAM setting tty to \"/dev"..., 42debug1: PAM setting 
tty to "/dev/pts/13"
| ) = 42
| [pid  3191] getuid32()                  = 1000
| [pid  3191] getuid32()                  = 1000
| [pid  3191] ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
| [pid  3191] readlink("/proc/self/fd/0", 0x80a0c30, 4095) = -1 EACCES (Permission 
denied)
| [pid  3191] fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0
| [pid  3191] stat64("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
| [pid  3191] open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a 
directory)
| [pid  3191] open("/dev/pts", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 11
| [pid  3191] fstat64(11, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
| [pid  3191] fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
| [pid  3191] getdents64(11, /* 17 entries */, 1024) = 408
| [pid  3191] stat64("/dev/pts/8", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), 
...}) = 0
| [pid  3191] close(11)                   = 0
| [pid  3191] access("/var/run/utmpx", F_OK) = -1 ENOENT (No such file or directory)
| [pid  3191] open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
| [pid  3191] open("/var/run/utmp", O_RDONLY) = 11
| [pid  3191] fcntl64(11, F_GETFD)        = 0
| [pid  3191] fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
| [pid  3191] _llseek(11, 0, [0], SEEK_SET) = 0
| [pid  3191] alarm(0)                    = 0
| [pid  3191] rt_sigaction(SIGALRM, {0x401ce600, [], SA_RESTORER, 0x40081568}, 
{0x401ce600, [ALRM], SA_RESTORER|SA_RESTART, 0x40081568}, 8) = 0
| [pid  3191] alarm(1)                    = 0
| [pid  3191] fcntl64(11, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
| [pid  3191] read(11,
| 
| [...]
| 
| [pid  3191] fcntl64(11, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
| [pid  3191] alarm(0)                    = 1
| [pid  3191] rt_sigaction(SIGALRM, {0x401ce600, [ALRM], SA_RESTORER|SA_RESTART, 
0x40081568}, NULL, 8) = 0
| [pid  3191] close(11)                   = 0
| [pid  3191] ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
| [pid  3191] readlink("/proc/self/fd/0", 0x80a0c30, 4095) = -1 EACCES (Permission 
denied)
| [pid  3191] fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0
| [pid  3191] stat64("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
| [pid  3191] open("/dev/pts", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 11
| [pid  3191] fstat64(11, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
| [pid  3191] fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
| [pid  3191] getdents64(11, /* 17 entries */, 1024) = 408
| [pid  3191] stat64("/dev/pts/8", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), 
...}) = 0
| [pid  3191] close(11)                   = 0
| [pid  3191] access("/var/run/utmpx", F_OK) = -1 ENOENT (No such file or directory)
| [pid  3191] open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
| [pid  3191] open("/var/run/utmp", O_RDONLY) = 11
| [pid  3191] fcntl64(11, F_GETFD)        = 0
| [pid  3191] fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
| [pid  3191] _llseek(11, 0, [0], SEEK_SET) = 0
| [pid  3191] alarm(0)                    = 0
| [pid  3191] rt_sigaction(SIGALRM, {0x401ce600, [], SA_RESTORER, 0x40081568}, 
{0x401ce600, [ALRM], SA_RESTORER|SA_RESTART, 0x40081568}, 8) = 0
| [pid  3191] alarm(1)                    = 0
| [pid  3191] fcntl64(11, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
| [pid  3191] read(11,
| 
| [...]
| 
| [pid  3191] fcntl64(11, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
| [pid  3191] alarm(0)                    = 1
| [pid  3191] rt_sigaction(SIGALRM, {0x401ce600, [ALRM], SA_RESTORER|SA_RESTART, 
0x40081568}, NULL, 8) = 0
| [pid  3191] close(11)                   = 0
| [pid  3191] time([1063379494])          = 1063379494
| [pid  3191] open("/etc/localtime", O_RDONLY) = 11
| [pid  3191] fstat64(11, {st_mode=S_IFREG|0644, st_size=837, ...}) = 0
| [pid  3191] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x40016000
| [pid  3191] read(11, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10"..., 
4096) = 837
| [pid  3191] close(11)                   = 0
| [pid  3191] munmap(0x40016000, 4096)    = 0
| [pid  3191] getpid()                    = 3191
| [pid  3191] rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
| [pid  3191] rt_sigsuspend([]
`----

With LD_PRELOAD=libpthread.so.0 it goes on connecting to /dev/log:

,----
| [...]
| 
| [pid  3259] getpid()                    = 3259
| [pid  3259] rt_sigaction(SIGPIPE, {0x40032600, [], SA_RESTORER, 0x400d1568}, 
{SIG_IGN}, 8) = 0
| [pid  3259] socket(PF_UNIX, SOCK_DGRAM, 0) = 11
| [pid  3259] fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
| [pid  3259] connect(11, {sa_family=AF_UNIX, path="/dev/log"}, 16) = 0
| [pid  3259] send(11, "<38>Sep 12 17:17:31 ssh(pam_unix"..., 83, 0) = 83
| [pid  3259] rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
| [pid  3259] close(11)                   = 0
| [pid  3259] open("/etc/motd", O_RDONLY) = 11
| [pid  3259] fstat64(11, {st_mode=S_IFREG|0644, st_size=363, ...}) = 0
| [pid  3259] read(11, "Linux fry 2.6.0-test5-mm1 #1 SMP"..., 363) = 363
| [pid  3259] close(11)                   = 0
| [pid  3259] stat64("/var/mail/jk", {st_mode=S_IFREG|0660, st_size=0, ...}) = 0
| [pid  3259] open("/etc/passwd", O_RDONLY) = 11
| [pid  3259] fcntl64(11, F_GETFD)        = 0
| [pid  3259] fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
| [pid  3259] _llseek(11, 0, [0], SEEK_CUR) = 0
| [pid  3259] fstat64(11, {st_mode=S_IFREG|0644, st_size=1204, ...}) = 0
| [pid  3259] mmap2(NULL, 1204, PROT_READ, MAP_SHARED, 11, 0) = 0x40016000
| [pid  3259] _llseek(11, 1204, [1204], SEEK_SET) = 0
| [pid  3259] munmap(0x40016000, 1204)    = 0
| [pid  3259] close(11)                   = 0
| 
| [...]
`----


Here's a gdb stack trace:

,----
| $ LD_LIBRARY_PATH=/usr/lib/debug gdb sshd
| GNU gdb 5.3.90_2003-08-24-cvs-debian
| Copyright 2003 Free Software Foundation, Inc.
| GDB is free software, covered by the GNU General Public License, and you are
| welcome to change it and/or distribute copies of it under certain conditions.
| Type "show copying" to see the conditions.
| There is absolutely no warranty for GDB.  Type "show warranty" for details.
| This GDB was configured as "i386-linux"...(no debugging symbols found)...
| (gdb) run -ddd
| 
| [...]
| 
| Program received signal SIGINT, Interrupt.
| [Switching to Thread 16384 (LWP 3479)]
| 0x401228a8 in read () at regexec.c:3982
| 3982    regexec.c: No such file or directory.
|         in regexec.c
| (gdb) bt f
| #0  0x401228a8 in read () at regexec.c:3982
|         __evoke_link_warning_re_max_failures = 
"\177ELF\001\001\001\000\000\000\000\000\000\000\000\000\003\000\003\000\001\000\000\000p^\001\0004\000\000\000Üd\"\001\000\000\000\0004\000
 \000\a\000(\000F\000C\000\006\000\000\0004\000\000\0004"
|         __elf_set___libc_subfreeres_element_free_mem__ = (const void *) 0x40163da0
|         empty_set = {alloc = 0, nelem = 0, elems = 0x0}
|         re_comp_buf = {buffer = 0x0, allocated = 0, used = 0, syntax = 0, fastmap = 
0x0, translate = 0x0, re_nsub = 0, can_be_null = 0, regs_allocated = 0, 
fastmap_accurate = 0, no_sub = 0, not_bol = 0, 
|   not_eol = 0, newline_anchor = 0}
|         re_syntax_options = 0
|         __re_error_msgid = "Success\000No match\000Invalid regular 
expression\000Invalid collation character\000Invalid character class name\000Trailing 
backslash\000Invalid back reference\000Unmatched [ or [^\000Unmatched ( or 
\\(\000Unmatched \\{\000Invalid "...
|         __re_error_msgid_idx = {0, 8, 17, 44, 72, 101, 120, 143, 161, 179, 192, 216, 
234, 251, 288, 324, 351}
|         re_max_failures = 2000
| #1  0x08086360 in deny_severity ()
| No symbol table info available.
| #2  0x0806e9d3 in error ()
| No symbol table info available.
| #3  0x0805d97c in ?? ()
| No symbol table info available.
| #4  0x0804bfe8 in ?? ()
| No symbol table info available.
| #5  0x0000000b in ?? ()
| No symbol table info available.
| #6  0xbffff1f8 in ?? ()
| No symbol table info available.
| #7  0x00000004 in ?? ()
| No symbol table info available.
| #8  0x0807cee3 in _IO_stdin_used ()
| No symbol table info available.
| #9  0x0807d4d8 in _IO_stdin_used ()
| No symbol table info available.
| #10 0xbffff208 in ?? ()
| No symbol table info available.
| #11 0x0806292b in ?? ()
| No symbol table info available.
| #12 0x00001000 in ?? ()
| No symbol table info available.
| #13 0x08099d00 in ?? ()
| No symbol table info available.
| #14 0x00001000 in ?? ()
| No symbol table info available.
| #15 0x08086360 in deny_severity ()
| No symbol table info available.
| #16 0x08093df0 in ?? ()
| No symbol table info available.
| #17 0x0000000b in ?? ()
| No symbol table info available.
| #18 0xbffff248 in ?? ()
| No symbol table info available.
| #19 0x0805b567 in ?? ()
| No symbol table info available.
| #20 0x0000000b in ?? ()
| No symbol table info available.
| #21 0xbffff220 in ?? ()
| No symbol table info available.
| #22 0x00000001 in ?? ()
| No symbol table info available.
| #23 0x00000001 in ?? ()
| No symbol table info available.
| #24 0x08099d00 in ?? ()
| No symbol table info available.
| #25 0x00001000 in ?? ()
| No symbol table info available.
| (gdb) 
`----


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to