[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#43913: libc6: some strange interaction between libc6, libpam, apache and php



Package: libc6
Version: 2.1.2-0pre12
Severity: normal

Hello,

The default configure script for php3 checks for libpam available and links
it in, though nothing uses it. It still creates some big problems, more
specifically it gets a SIGSEGV. Here is the trace.

(gdb) bt
#0  0x40278fe4 in _pam_add_handler (pamh=0xbffff798, must_fail=1075294628,
    other=135167872, type=1024, actions=0x40179280, mod_path=0xbffff768 "",
    argc=3750201, argv=0x4014e26e, argvlen=1075283672) at pam_handlers.c:510
#1  0x4014e70d in gethostbyname_r () from /lib/libc.so.6
#2  0x4014d692 in gethostbyname () from /lib/libc.so.6
#3  0x806562d in ap_get_local_host ()
#4  0x8062ecc in ap_fini_vhost_config ()
#5  0x8055703 in ap_read_config ()
#6  0x805cb24 in ap_child_terminate ()
#7  0x805d2ad in main ()
#8  0x400b9282 in __libc_start_main () from /lib/libc.so.6

This was after I ran with debugging pam libraries... Then I decided to link
with debugging libc libraries to see what happens here... it no longer
crashes with SIGSEGV, but libc kills the process itself internally:

(gdb) bt
#0  0x400ba101 in __kill () from /usr/lib/libc_debug/libc.so.6
#1  0x400b9de8 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x400bb441 in abort () at ../sysdeps/generic/abort.c:88
#3  0x400e601b in Letext () at ../sysdeps/posix/libc_fatal.c:56
#4  0x401460bc in __nss_next (ni=0xbffff6d4,
    fct_name=0x4016d276 "gethostbyname_r", fctp=0xbffff6d8, status=5,
    all_values=0) at nsswitch.c:175
#5  0x40149742 in __gethostbyname_r (name=0xbffff778 "ìhunderchild",
    resbuf=0x401761a4, buffer=0x80e8018 "ÁáW\030", buflen=1024,
    result=0xbffff744, h_errnop=0xbffff748) at ../nss/getXXbyYY_r.c:197
#6  0x40148692 in gethostbyname (name=0xbffff778 "ìhunderchild")
    at ../nss/getXXbyYY.c:137
#7  0x806562d in ap_get_local_host () from /usr/lib/libucdsnmp.so.3.6
#8  0x8062ecc in ap_fini_vhost_config () from /usr/lib/libucdsnmp.so.3.6
#9  0x8055703 in ap_read_config () from /usr/lib/libucdsnmp.so.3.6
#10 0x805cb24 in ap_child_terminate () from /usr/lib/libucdsnmp.so.3.6
#11 0x805d2ad in main () from /usr/lib/libucdsnmp.so.3.6
#12 0x400b4282 in __libc_start_main (main=0x805cfcc <main>, argc=2,
    argv=0xbffffd34, init=0x804f018 <_init>, fini=0x807fe4c <_fini>,
    rtld_fini=0x40009c30 <_dl_fini>, stack_end=0xbffffd2c)
    at ../sysdeps/generic/libc-start.c:90

The problem here is the status parameter in the __nss_next call, which has
an illegal value. The interesting thing that this happens only if libpam is
linked (thru an apache dso, php3). I'd very much like to find the cause of
this error, and I'm willing to help if you provide some instructions what to
debug.

Btw I just noticed another problem... the parameter passed to gethostbyname
is not thunderchild, the first character is changed, I don't know why.

-- System Information
Debian Release: potato
Kernel Version: Linux thunderchild 2.2.10 #1 Wed Jun 30 12:13:09 CEST 1999 i586 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.11-2       The Linux dynamic linker, library and utilit


Reply to: