php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10099 Segfault in Apache 1.3.19 + PHP4.0.x DSO
Submitted: 2001-04-01 12:18 UTC Modified: 2001-10-20 23:08 UTC
From: oliverh at matrixmagician dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.4pl1 OS: Linux-mipsel (Cobalt Linux 5.0)
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 + 2 = ?
Subscribe to this entry?

 
 [2001-04-01 12:18 UTC] oliverh at matrixmagician dot com
I have a Cobalt Qube2 (64-Bit MIPS little-endian).
I have compiled PHP 4.0.4 and any release after that including 4.0.5RC2.

PHP 4.0.x is configured like this:

./configure \
--with-apxs=/usr/sbin/apxs \
--enable-versioning \
--with-mysql=/usr/local/mysql \
--enable-track-vars \
--with-imap=/usr/local/imap-2000c \
--enable-ftp \
--with-mm=/usr/local/mm-1.1.3 \
--with-zlib

(every interation of PHP after 4.0.4 was compiled with the options seen above)

My GDB backtrace looks like this:

#0  0x2aff60f8 in ?? ()
(gdb) bt
#0  0x2aff60f8 in ?? ()
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x2aff602c

That's all I have found.  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-01 13:12 UTC] sniper@php.net
1. delete config.cache
2. add --enable-debug into your configure line
3. after configure 'make clean ; make ; make install'

Now you might get better backtrace of the problem.

Do you have PHP 3 installed into the apache?
If not, you don't need --enable-versioning argument.

--Jani


 [2001-04-01 14:10 UTC] oliverh at matrixmagician dot com
Sniper,
Thanks for the quick response.  Here is the new debugged core dump:

Starting program: /usr/sbin/httpd -X

Program received signal SIGFPE, Arithmetic exception.
0x2b0b1da0 in php_minit_crypt (type=1, module_number=3) at crypt.c:105
105             php_srand(time(0) * getpid() * (php_combined_lcg() * 10000.0));
(gdb) bt
#0  0x2b0b1da0 in php_minit_crypt (type=1, module_number=3) at crypt.c:105
#1  0x2b0a3968 in php_minit_basic (type=1, module_number=3)
    at basic_functions.c:748
#2  0x2aff2068 in zend_startup_module (module=0x2b253b44) at zend_API.c:624
#3  0x2b01ac30 in php_startup_extensions (ptr=0x2b24e288, count=10)
    at main.c:701
#4  0x2b01ccb4 in php_startup_internal_extensions () at internal_functions.c:62
#5  0x2b01b390 in php_module_startup (sf=0x2b24d290) at main.c:861
#6  0x2b014ca4 in php_apache_startup (sapi_module=0x2b24d290) at mod_php4.c:259
#7  0x2b016820 in php_init_handler (s=0x10122cc8, p=0x10122ca0)
    at mod_php4.c:729
#8  0x4836b0 in ap_init_modules ()
#9  0x499dd4 in main ()

I believe there is a work-around for this.
See Bug #9827 by Matti Weissmueller.
He uses similar hardware.

Thanks for your help.
 [2001-04-03 12:03 UTC] oliverh at matrixmagician dot com
Ok, I have made the changes to the crypt.c file on line 105, based on Matti Weissmueller's idea.
And PHP4 compiles cleanly and runs just as well seemingly.  Could someone advise on any potential issues, that this change could have ?
 [2001-10-20 23:08 UTC] sniper@php.net
The fix is committed into CVS. 

--Jani

 [2002-05-16 18:20 UTC] cdwilde at yahoo dot com
Hello, 
 
I thought I'd let everyone know that I encountered the 
same bug on a FreeBSD box that I'm testing on.  The box is 
an i386 running FreeBSD 4.5.  I have compiled Apache 
2.0.36, mod_perl 2.0, and php 4.2.1.  I built php as a DSO 
and ran the defacto <?phpinfo()?> test page and received 
the error.  I used the fix in 9827 changing the 10000.0 in 
line 109 of crypt.c to 1.0 and rebuilt php.  Everything is 
working fine now.  Just FYI.  Thanks, 
 
Dave
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC