php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38107 Apache segfaults on startup
Submitted: 2006-07-14 21:35 UTC Modified: 2006-07-20 06:31 UTC
From: lynette at umn dot edu Assigned:
Status: Not a bug Package: Apache related
PHP Version: 5.1.4 OS: Solaris 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lynette at umn dot edu
New email:
PHP Version: OS:

 

 [2006-07-14 21:35 UTC] lynette at umn dot edu
Description:
------------
Apache segfaults on startup. 
All libraries except ssl were compiled with gcc 3.4.2. ssl was compiled with forte 6 (solaris + gcc != shared lib)

php compiled as follows:
#! /bin/sh
#
# Created by configure
                                                                                
CC='gcc' \
'./configure' \
'--with-apache=/home/src/apache/apache_1.3.36/sparc-2.9-php' \
'--prefix=/usr/local/apache' \
'--with-mysql=/usr/local/mysql' \
'--with-gd=/usr/local' \
'--with-jpeg-dir=/usr/local' \
'--with-png-dir=/usr/local' \
'--with-xpm-dir=/usr/local' \
'--with-freetype-dir=/usr/local' \
'--with-libxml-dir=/usr/local' \
'--with-zlib-dir=/usr/local' \
'--enable-calendar' \
'--enable-trans-sid' \
'--enable-session' \
'--enable-sockets' \
'--enable-wddx' \
'--enable-inline-optimization' \
'--enable-bcmath' \
'--enable-ftp' \
'--with-curl' \
"$@"


apache 1.3.36 was compiled as follows:
CC="gcc" \
SSL_BASE="/usr" \
./configure \
"--with-layout=Apache" \
"--prefix=/usr/local/apache" \
"--disable-rule=EXPAT" \
"--enable-module=ssl" \
"--activate-module=src/modules/php5/libphp5.a" \
"--enable-module=php5" \
"--enable-module=proxy" \
"--enable-module=headers" \
"--enable-module=rewrite" \
"$@"



Reproduce code:
---------------
No php code involved.

Expected result:
----------------
apache should run

Actual result:
--------------
Apache segfaults:
/usr/local/apache/bin/apachectl startssl

Segmentation Fault - core dumped
/usr/local/apache/bin/apachectl startssl: httpd could not be started

Core was generated by `/usr/local/apache/bin/httpd -DSSL'.
Program terminated with signal 11, Segmentation fault.
#0  0xfeafe9c4 in BN_num_bits () from /usr/lib/libcrypto.so.0.9.8
(gdb) bt
#0  0xfeafe9c4 in BN_num_bits () from /usr/lib/libcrypto.so.0.9.8
#1  0xfeb58518 in bn_i2c () from /usr/lib/libcrypto.so.0.9.8
#2  0xfeb626f0 in asn1_ex_i2c () from /usr/lib/libcrypto.so.0.9.8
#3  0xfeb61b44 in ASN1_item_ex_i2d () from /usr/lib/libcrypto.so.0.9.8
#4  0xfeb62404 in asn1_template_ex_i2d () from /usr/lib/libcrypto.so.0.9.8
#5  0xfeb61fb8 in ASN1_item_ex_i2d () from /usr/lib/libcrypto.so.0.9.8
#6  0xfeb61a6c in ASN1_item_i2d () from /usr/lib/libcrypto.so.0.9.8
#7  0x002e1850 in ssl_init_TmpKeysHandle ()
#8  0x002e1348 in ssl_init_Module ()
#9  0x0030a8f0 in ap_init_modules ()
#10 0x0031cb24 in main ()
(gdb)

While these appear to point at ssl, compilation without php yields a normally running apache.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-14 21:44 UTC] tony2001@php.net
What if you try to configure PHP without MySQL and/or cURL ?
 [2006-07-19 16:15 UTC] lynette at umn dot edu
Compiled without curl; still segfaults on start. Compiled without either curl or mysql; it runs.

Of course my application requires mysql... what next?
 [2006-07-19 16:27 UTC] tony2001@php.net
Since the segfault is clearly not related to PHP itself and the backtrace points to the SSL, I'd consider it an SSL problem and apparently we cannot fix it.
Please reopen the report if you have any additional information.
 [2006-07-19 16:33 UTC] lynette at umn dot edu
Apache mod_ssl works just fine. Php works fine without mysql compiled in. It's clearly not as simple as an ssl issue.
 [2006-07-19 16:53 UTC] lynette at umn dot edu
I recompiled using the libraries from mysql-4.0.15-sun-solaris2.8-sparc, and it works (previously used mysql 5.0.21). Do I take this up with the mysql people or is it the php/mysql library interaction that php developers should look at?
 [2006-07-19 19:45 UTC] lynette at umn dot edu
mysql 4.1 also works. The 5.0.x libs appear to not interact well with php. I am happy to step through gdb as directed to help solve this issue.
 [2006-07-19 22:41 UTC] sniper@php.net
I guess it's a problem with the SSL libs used. Did you compile  the mysql5 libs yourself and were they linked with the SAME ssl libs as PHP is? 
 [2006-07-20 06:31 UTC] tony2001@php.net
Yes, please report it to MySQL people.
In MySQL 5.0.22 (AFAIK) they changed OpenSSL to YaSSL, which causes a lot of troubles for people using PHP (and probably others too).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 21:01:29 2024 UTC