Edit report at https://bugs.php.net/bug.php?id=60627&edit=1

 ID:                 60627
 Updated by:         larue...@php.net
 Reported by:        fedora at famillecollet dot com
 Summary:            httpd.worker segfault on startup
-Status:             Open
+Status:             Analyzed
 Type:               Bug
 Package:            Apache2 related
 Operating System:   GNU/Linux (Fedora 16)
 PHP Version:        5.4SVN-2011-12-30 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

hmm, the problem is when the real_value_hnd is called, the signal_startup has 
not 
been called yet...


Previous Comments:
------------------------------------------------------------------------
[2012-01-01 19:22:16] public at wernig dot net

Just tried with 5.3.9RC4, and the problem does not occur. Seems to be something 
in 5.4

------------------------------------------------------------------------
[2012-01-01 19:05:57] public at wernig dot net

I have the same problem on Solaris 11 (express) i86pc. I'm not sure about ZTS 
mode (I have NOT set --enable-maintainer-zts)

I have compiled php-5.4 (various versions, the latest one being 5.4.0RC4) with 
the following configure flags:
--with-apxs2=/usr/local/apache2/bin/apxs --with-openssl=/usr/local/ssl 
--with-openssl-dir=/usr/local/ssl --with-zlib --enable-sockets 
--enable-shared=yes --enable-static=yes --prefix=/usr/local/apache2/php 
--enable-calendar --disable-ftp --with-mysql=/usr/local/mysql 
--with-imap=/usr/local/imap --with-imap-ssl=/usr/local/ssl --enable-flatfile 
--without-recode --disable-ipv6 --with-mysql-sock=/var/run/mysql/mysql.sock 
--with-gettext=/opt/csw --enable-libxml --with-db4=/usr/local/BerkeleyDB

Builds and installs fine.

But during apache (2.2.21) startup, it segfaults and dumps core:
# /usr/local/svc/init.d/apache2 restart
Restarting Apache2 httpd ... 
/usr/local/apache2/bin/apachectl: line 80: 17568: Memory fault(coredump)

In fact, uncommenting all php_admin_value lines from apache config file, apache 
starts normally.

When compiling and installing 5.3.6 with the same configure options, the 
problem does not occur.

------------------------------------------------------------------------
[2011-12-31 07:21:41] fedora at famillecollet dot com

segfault occurs during apache config analyse.

If config doesnt have any php_flag, php_value,... apache starts and works as 
expected.

------------------------------------------------------------------------
[2011-12-30 19:10:16] fedora at famillecollet dot com

Description:
------------
With PHP build in ZTS mode, apache in worker mode segfault during launch

Test script:
---------------
$ gdb /usr/sbin/httpd.worker 
(gdb) run -X



Expected result:
----------------
no error

Actual result:
--------------
(gdb) run -X
...
Program received signal SIGSEGV, Segmentation fault.
0x00007fffec8ca897 in _zend_hash_add_or_update (ht=0x55555585a2e8, 
arKey=<optimized out>, nKeyLength=17, pData=0x7fffffffde70, nDataSize=24, 
pDest=0x0, flag=1)
    at /usr/src/debug/php5.4-201112300630/Zend/zend_hash.c:268
268             HANDLE_BLOCK_INTERRUPTIONS();

(gdb) bt
#0  0x00007fffec8ca897 in _zend_hash_add_or_update
    (ht=0x55555585a2e8, arKey=<optimized out>, nKeyLength=17,
    pData=0x7fffffffde70, nDataSize=24, pDest=0x0, flag=1)
    at /usr/src/debug/php5.4-201112300630/Zend/zend_hash.c:268
#1  0x00007fffec979217 in real_value_hnd
    (cmd=0x7fffffffe1a0, dummy=0x55555585a2e8, name=0x5555558c40b8
    "register_globals", value=0x7fffffffded0 "0", status=4)
    at /usr/src/debug/php5.4-201112300630/sapi/apache2handler/apache_config.c:73
#2  0x00007fffec9792ae in real_flag_hnd
    (cmd=0x7fffffffe1a0, dummy=0x55555585a2e8, arg1=0x5555558c40b8
    "register_globals", arg2=0x5555558c40d0 "off", status=<optimized out>)
    at /usr/src/debug/php5.4-201112300630/sapi/apache2handler/apache_config.c:98
#3  0x0000555555580483 in invoke_cmd
    (cmd=0x7fffecc918f8, parms=0x7fffffffe1a0, mconfig=0x55555585a2e8,
    args=0x55555582f224 "")
    at /usr/src/debug/httpd-2.2.21/server/config.c:810
#4  0x00005555555826fa in ap_walk_config_sub (section_vector=0x5555557dc798,
    parms=0x7fffffffe1a0, current=0x55555582f1d0)
    at /usr/src/debug/httpd-2.2.21/server/config.c:1163
#5  ap_walk_config (current=0x55555582f1d0, parms=0x7fffffffe1a0,
    section_vector=0x5555557dc798)
    at /usr/src/debug/httpd-2.2.21/server/config.c:1196
#6  0x0000555555583612 in ap_process_config_tree (s=<optimized out>, 
    conftree=<optimized out>, p=0x5555557b7158, ptemp=<optimized out>)
    at /usr/src/debug/httpd-2.2.21/server/config.c:1765
#7  0x000055555556c314 in main (argc=2, argv=0x7fffffffe418) 
    at /usr/src/debug/httpd-2.2.21/server/main.c:644



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60627&edit=1

Reply via email to