Bug #18104 Updated: imap_open() results in apache child pid exit segfaul sig (11)
| From: | lnxgeek at us dot ibm dot com | Date: | Thu, 04 Jul 2002 03:47:26 +0000 |
| Subject: | Bug #18104 Updated: imap_open() results in apache child pid exit segfaul sig (11) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13069@lists.php.net to get a copy of this message | ||
ID: 18104
Updated by: lnxgeek@us.ibm.com
Reported By: lnxgeek@us.ibm.com
-Status: Feedback
+Status: Open
Bug Type: IMAP related
Operating System: Red Hat Linux 7.3
PHP Version: 4.2.1
New Comment:
Building php4-latest.tgz fails on Red Hat 7.3 with an odd problem about
not finding mysqlclient when clearly it should be able to find it. php
4.2.1 stable does not have this issue.
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
[root@ogg php4-200207031800]# /sbin/ldconfig -v | grep mysql
/usr/lib/mysql:
libmysqlclient.so.10 -> libmysqlclient.so.10.0.0
[root@ogg php4-200207031800]#
I used the following ./configure line:
'./configure' \
'i386-redhat-linux' \
'--prefix=/usr' \
'--exec-prefix=/usr' \
'--bindir=/usr/bin' \
'--sbindir=/usr/sbin' \
'--sysconfdir=/etc' \
'--datadir=/usr/share' \
'--includedir=/usr/include' \
'--libdir=/usr/lib' \
'--libexecdir=/usr/libexec' \
'--localstatedir=/var' \
'--sharedstatedir=/usr/com' \
'--mandir=/usr/share/man' \
'--infodir=/usr/share/info' \
'--prefix=/usr' \
'--with-config-file-path=/etc' \
'--enable-force-cgi-redirect' \
'--enable-debug' \
'--enable-dbg=shared' \
'--with-dbg-profiler' \
'--enable-pic' \
'--disable-rpath' \
'--enable-inline-optimization' \
'--with-bz2' \
'--with-db3' \
'--with-curl' \
'--with-dom=/usr' \
'--with-exec-dir=/usr/bin' \
'--with-freetype-dir=/usr' \
'--with-png-dir=/usr' \
'--with-gd' \
'--enable-gd-native-ttf' \
'--with-ttf' \
'--with-gdbm' \
'--with-gettext' \
'--with-ncurses' \
'--with-gmp' \
'--with-iconv' \
'--with-jpeg-dir=/usr' \
'--with-mm' \
'--with-openssl' \
'--with-png' \
'--with-pspell' \
'--with-regex=system' \
'--with-xml' \
'--with-expat-dir=/usr' \
'--with-zlib' \
'--with-layout=GNU' \
'--enable-bcmath' \
'--enable-debugger' \
'--enable-exif' \
'--enable-ftp' \
'--enable-magic-quotes' \
'--enable-safe-mode' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-discard-path' \
'--enable-track-vars' \
'--enable-trans-sid' \
'--enable-yp' \
'--enable-wddx' \
'--without-oci8' \
'--with-imap=shared' \
'--with-imap-ssl' \
'--with-kerberos=/usr/kerberos' \
'--with-ldap=shared' \
'--with-mysql=shared,/usr' \
'--with-pgsql=shared' \
'--with-snmp=shared,/usr' \
'--with-snmp=shared' \
'--enable-ucd-snmp-hack' \
'--with-unixODBC=shared' \
'--enable-memory-limit' \
'--enable-bcmath' \
'--enable-shmop' \
'--enable-versioning' \
'--enable-calendar' \
'--enable-dbx' \
'--enable-dio' \
'--enable-mcal' \
'--enable-mbstring' \
'--enable-mbstr-enc-trans' \
'--with-apxs=/usr/sbin/apxs' \
'--without-cyrus'
Previous Comments:
------------------------------------------------------------------------
[2002-07-03 20:24:17] sniper@php.net
Using the imap-2002.DEV.SNAP-0206241612.tar.Z c-client lib
with PHP and the imapd from that same package does not
cause any crash. Neither did it crash with the imap-2001a
c-client..
Try this PHP snapshot:
http://snaps.php.net/php4-latest.tar.gz
It would also help a bit if you could provide an account
for your server to test this.
That gdb backtrace does suggest that this crash happens in c-client,
NOT in PHP. But please try that snapshot.
------------------------------------------------------------------------
[2002-07-03 00:42:42] lnxgeek@us.ibm.com
#0 0x42080c14 in strnlen () from /lib/i686/libc.so.6
#1 0x42051e42 in vfprintf () from /lib/i686/libc.so.6
#2 0x4206dbf3 in vsprintf () from /lib/i686/libc.so.6
#3 0x4205a257 in sprintf () from /lib/i686/libc.so.6
#4 0x4096f751 in auth_md5_client (challenger=0x4098aa10
<imap_challenge>, responder=0x4098aab0 <imap_response>,
service=0x409f4cad "imap", mb=0xbfffcdb0, stream=0x8190be8,
trial=0xbfffcd18, user=0xbfffd150 "lnxgeek") at auth_md5.c:107
#5 0x4098a690 in imap_auth (stream=0x8190be8, mb=0xbfffcdb0,
tmp=0xbfffd550 "00000001 AUTHENTICATE CRAM-MD5",
usr=0xbfffd150 "lnxgeek") at imap4r1.c:884
#6 0x40989b58 in imap_open (stream=0x8190be8) at imap4r1.c:666
#7 0x40962226 in mail_open (stream=0x0, name=0x8190bb4
"{ogg.raleigh.ibm.com:143/imap/notls}", options=0) at mail.c:1058
#8 0x4094f1c0 in php_imap_do_open (ht=4, return_value=0x819317c,
this_ptr=0x0, return_value_used=1, persistent=0) at php_imap.c:844
#9 0x4094f2cc in zif_imap_open (ht=4, return_value=0x819317c,
this_ptr=0x0, return_value_used=1) at php_imap.c:874
#10 0x4043aef1 in abuf.0 () from /etc/httpd/modules/libphp4.so
#11 0x4044bb24 in abuf.0 () from /etc/httpd/modules/libphp4.so
#12 0x4045e402 in abuf.0 () from /etc/httpd/modules/libphp4.so
#13 0x40458d92 in abuf.0 () from /etc/httpd/modules/libphp4.so
#14 0x40459c00 in abuf.0 () from /etc/httpd/modules/libphp4.so
#15 0x40459c7a in abuf.0 () from /etc/httpd/modules/libphp4.so
#16 0x0805475d in ap_invoke_handler ()
#17 0x080671fc in process_request_internal ()
#18 0x08067273 in ap_process_request ()
#19 0x0805f4f7 in child_main ()
#20 0x0805f69a in make_child ()
#21 0x0805f7dd in startup_children ()
#22 0x0805fe30 in standalone_main ()
#23 0x08060723 in main ()
#24 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6
------------------------------------------------------------------------
[2002-07-02 23:59:46] sniper@php.net
Keep this at 'feedback' until you can get us that GDB backtrace..
------------------------------------------------------------------------
[2002-07-02 23:54:17] lnxgeek@us.ibm.com
Yup, I understand you don't want the core file. I know that _I_ want
the core file so I can give you a bt. I'll try again. And yes, I
already tried _both_ sets of directions. Neither one did me good.
That said, I've narrowed the problem down to issues with php 4.2.1 /
4.1.2 imap module. The segfault will ONLY happen when trying to use
CRAM-MD5 mech for authentication. If the imapd does not advertise
CRAM-MD5 then PLAIN is used and everything works as expected.
That said, I check out the mtest tool provided with imap-2001a and
verified that mtest will correctly login to an imap server with
CRAM-MD5. PHP however continues to segfault when trying to do the same
login with CRAM-MD5.
I'm fairly certain this narrows the issue down to somethig having to do
with MD5 auth in php4/ext/imap/imap.c and NOT the imap-2001a c-client
libs.
For a simple test case I recomend the script posted in this bug report
and to verify it works against an imapd server that advertises
MD5-CRAM. I'm using Cyrus IMAPd 2.1.5 with SASL 2.1.5 for my tests.
------------------------------------------------------------------------
[2002-07-02 13:16:39] sniper@php.net
Open this page: http://bugs.php.net/bugs-generating-backtrace.php
And look under the topic 'If you can't get a core file'
for the instructions how to get a backtrace.
We _do_not_ want any core file, we want the GDB backtrace..
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/18104
--
Edit this bug report at http://bugs.php.net/?id=18104&edit=1