php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34271 cli produces segmentation fault during install
Submitted: 2005-08-26 20:46 UTC Modified: 2005-08-29 17:48 UTC
From: wim at godden dot net Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.1.0RC1 OS: RedHat Linux
Private report: No CVE-ID: None
 [2005-08-26 20:46 UTC] wim at godden dot net
Description:
------------
When doing a 'make install', the result is :
Installing PHP SAPI module:       apache
[activating module `php5' in /usr/local/apache/conf/httpd.conf]
cp libs/libphp5.so /usr/local/apache/libexec/libphp5.so
chmod 755 /usr/local/apache/libexec/libphp5.so
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak
cp /usr/local/apache/conf/httpd.conf.new /usr/local/apache/conf/httpd.conf
rm /usr/local/apache/conf/httpd.conf.new
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/man/man1/
Installing PEAR environment:      /usr/local/lib/php/
make[1]: *** [install-pear-installer] Segmentation fault (core dumped)
make: *** [install-pear] Error 2



When running sapi/cli/php the same result occurs.


Actual result:
--------------
Doing gdb trace :
>gdb sapi/cli/php core
GNU gdb 6.3
Copyright 2004 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `sapi/cli/php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/local/lib/libmm.so.12...done.
Loaded symbols for /usr/local/lib/libmm.so.12
Reading symbols from /usr/local/mysql/lib/mysql/libmysqlclient.so.14...done.
Loaded symbols for /usr/local/mysql//lib/mysql/libmysqlclient.so.14
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /usr/local/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.4
Reading symbols from /usr/lib/libltdl.so.0...done.
Loaded symbols for /usr/lib/libltdl.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/local/lib/libt1.so.5...done.
Loaded symbols for /usr/local/lib/libt1.so.5
Reading symbols from /usr/lib/libttf.so.2...done.
Loaded symbols for /usr/lib/libttf.so.2
Reading symbols from /usr/local/lib/libpng.so.3...done.
Loaded symbols for /usr/local/lib/libpng.so.3
Reading symbols from /usr/local/ssl/lib/libssl.so.0.9.8...done.
Loaded symbols for /usr/local/ssl/lib/libssl.so.0.9.8
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/local/lib/libcurl.so.2...done.
Loaded symbols for /usr/local/lib/libcurl.so.2
Reading symbols from /usr/local/lib/libnetsnmp.so.5...done.
Loaded symbols for /usr/local/lib/libnetsnmp.so.5
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /lib/i686/libpthread.so.0...done.
Loaded symbols for /lib/i686/libpthread.so.0
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /usr/local/ssl/lib/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/local/ssl/lib/libcrypto.so.0.9.8
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  0x4207fa78 in strcmp () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4207fa78 in strcmp () from /lib/i686/libc.so.6
#1  0x0838f32d in obj_name_cmp ()
#2  0x08773f40 in ?? ()
#3  0x08773ce8 in ?? ()
#4  0x0838d74f in getrn ()
#5  0x08773f28 in ?? ()
#6  0x08773f50 in ?? ()
#7  0x084a1394 in ?? ()
#8  0x08773ce8 in ?? ()
#9  0x00000002 in ?? ()
#10 0x08773f50 in ?? ()
#11 0x0838f2c0 in OBJ_NAME_new_index ()
#12 0xbffff538 in ?? ()
#13 0x084a1394 in ?? ()
#14 0x00000000 in ?? ()
#15 0x00000002 in ?? ()
#16 0xbffff598 in ?? ()
#17 0x00000002 in ?? ()
#18 0x0838f49d in OBJ_NAME_add ()
#19 0x40585ca0 in r4_40_cipher () from /usr/local/ssl/lib/libcrypto.so.0.9.8
#20 0x08297540 in add_property_zval_ex () at /root/install/php-5.1.0RC1/Zend/zend_API.c:1241
Previous frame inner to this frame (corrupt stack?)
(gdb)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-26 20:57 UTC] johannes@php.net
Can you try with --enable-debug and give the  
configure-line with as few parameters as possible, or was  
this already just ./configure?  
 [2005-08-26 21:44 UTC] wim at godden dot net
Just ./configure works fine.

It seems once --with-openssl is added, the problem occurs.
Running OpenSSL 0.9.8, compiled from scratch using option 'shared' (no package install possible).
 [2005-08-28 01:00 UTC] sniper@php.net
What is the full configure line you used?

 [2005-08-28 20:06 UTC] wim at godden dot net
./configure --with-apxs=/usr/local/apache/bin/apxs --with-openssl=/usr/local/ssl --with-xmlrpc

(--with-xmlrpc required for PEAR, when using --without-pear the error ofcourse doesn't occur).
 [2005-08-28 23:43 UTC] sniper@php.net
I can not reproduce this. What libxml2 versin do you have installed?

 [2005-08-29 13:46 UTC] wim at godden dot net
libxml2.6.19 being used, compiled with no parameters.

I see this during configure :
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
...
checking for OpenSSL version... >= 0.9.6
...
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for XMLReader support... no
checking for XMLRPC-EPI support... yes
checking libexpat dir for XMLRPC-EPI... no
checking iconv dir for XMLRPC-EPI... no
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
 [2005-08-29 13:55 UTC] sniper@php.net
Try compile with --enable-debug and run the make line in question under gdb:

# gdb sapi/cli/php
(gdb) run -n -dshort_open_tag=0 -dsafe_mode=0 \
 pear/install-pear.php -d /tmp/test/  \
 -b /tmp/test/bin/ pear/package-*.xml

 [2005-08-29 14:04 UTC] wim at godden dot net
(gdb) run -n -dshort_open_tag=0 -dsafe_mode=0 \
 pear/install-pear.php -d /tmp/test/  \
 -b /tmp/test/bin/ pear/package-*.xml
Starting program: /root/install/php-5.1.0RC1/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0  pear/install-pear.php -d /tmp/test/   -b /tmp/test/bin/ pear/package-*.xml
[Thread debugging using libthread_db enabled]
[New Thread 1024 (LWP 30351)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 30351)]
0x08321869 in CRYPTO_get_ex_new_index ()
(gdb)
 [2005-08-29 14:07 UTC] sniper@php.net
Can you provide the rest of that backtrace..?

 [2005-08-29 14:08 UTC] wim at godden dot net
That's all being shown.
 [2005-08-29 14:09 UTC] sniper@php.net
(gdb) bt

 [2005-08-29 14:15 UTC] wim at godden dot net
I knew bt... but this is all bt gives :
#0  0x08321869 in CRYPTO_get_ex_new_index ()
 [2005-08-29 16:50 UTC] sniper@php.net
Apparently there's something very wrong within your system. I'm unable to reproduce this and nobody else has reported this so it's not PHP bug (yet).

 [2005-08-29 17:48 UTC] wim at godden dot net
Any suggestions on how to try to find a solution to this ?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 13:01:35 2025 UTC