php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33197 sapi_module.treat_data not getting initialized (apache2)
Submitted: 2005-05-31 06:01 UTC Modified: 2005-06-12 01:00 UTC
From: alan at akbkhome dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 5.* (2005-05-31) OS: debian / linux
Private report: No CVE-ID: None
 [2005-05-31 06:01 UTC] alan at akbkhome dot com
Description:
------------
tried HEAD & php-5.0.4

getting segfault at startup with apache2
#1  0x4086a123 in php_hash_environment ()
    at /usr/src/php-5.0.4/main/php_variables.c:625
        p = 0x81ecc39 "GPCS"
        _gpc_flags = "\000\000\000\001"
        dummy_track_vars_array = (zval *) 0x0
        initialized_dummy_track_vars_array = 0 '\0'
        jit_initialization = 0 '\0'
        auto_global_records = {{name = 0x40a0c39b "_POST", name_len = 6,
    long_name = 0x40a236b2 "HTTP_POST_VARS", long_name_len = 15,
    jit_initialization = 0 '\0'}, {name = 0x40a0c3a1 "_GET", name_len = 5,
    long_name = 0x40a236c1 "HTTP_GET_VARS", long_name_len = 14,
    jit_initialization = 0 '\0'}, {name = 0x40a0c393 "_COOKIE", name_len = 8,
    long_name = 0x40a236cf "HTTP_COOKIE_VARS", long_name_len = 17,
    jit_initialization = 0 '\0'}, {name = 0x408c12ab "_SERVER", name_len = 8,
    long_name = 0x40a236e0 "HTTP_SERVER_VARS", long_name_len = 17,
    jit_initialization = 1 '\001'}, {name = 0x40a1683e "_ENV", name_len = 5,
    long_name = 0x40a236f1 "HTTP_ENV_VARS", long_name_len = 14,
    jit_initialization = 1 '\001'}, {name = 0x40a23708 "_FILES", name_len = 7,
    long_name = 0x40a236ff "HTTP_POST_FILES", long_name_len = 16,
    jit_initialization = 0 '\0'}}
        i = 6
#2  0x4085edc4 in php_request_startup () at /usr/src/php-5.0.4/main/main.c:1060
        orig_bailout = {{__jmpbuf = {135586232, 1084715676, -1073743140,
      -1073743112, -1073743568, 1082911454}, __mask_was_saved = 0,
    __saved_mask = {__val = {0 <repeats 32 times>}}}}
        orig_bailout_set = 1 '\001'
        retval = 0
#3  0x408bedfb in php_handler (r=0x8221948)
    at /usr/src/php-5.0.4/sapi/apache2handler/sapi_apache2.c:527
        orig_bailout = {{__jmpbuf = {0, 0, 0, 0, 0, 0}, __mask_was_saved = 0,
    __saved_mask = {__val = {0 <repeats 32 times>}}}}
        ctx = (php_struct *) 0x8223240
        conf = (void *) 0x0
        brigade = (apr_bucket_brigade *) 0x82232b8
        bucket = (apr_bucket *) 0x0
        rv = 0
        parent_req = (request_rec *) 0x0
#4  0x080783d5 in ap_run_handler ()
No symbol table info available.
(gdb) up
#1  0x4086a123 in php_hash_environment ()
    at /usr/src/php-5.0.4/main/php_variables.c:625
625                                             sapi_module.treat_data(PARSE_GET, NULL, NULL TSRMLS_CC);        /* GET Data */
(gdb)  print sapi_module.treat_data
$2 = (void (*)(int, char *, zval *)) 0


build:
 './configure' 
'--prefix=/usr'
 '--with-regex=php'
 '--disable-cgi' 

'--with-config-file-path=/etc/php5/cli' 
'--disable-rpath'
 '--enable-memory-limit' 
'--with-layout=GNU'
 '--with-pear=/usr/share/php'
 '--enable-track-vars'
 '--enable-trans-sid' 
'--enable-bcmath'
 '--with-bz2' 
'--enable-ctype' '
--with-db4' 
'--with-iconv' 
'--enable-exif'
 '--enable-ftp' 
'--with-gettext' 
'--enable-mbstring'
 '--with-pcre-regex=/usr'
 '--enable-shmop'
 '--enable-sockets'
 '--enable-wddx'
 '--disable-xml'
 '--with-expat-dir=/usr'
 '--with-xmlrpc' 
'--enable-yp' 
'--with-zlib' 
'--without-pgsql'
 '--with-kerberos=/usr' 
'--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--with-exec-dir=/usr/lib/php5/libexec' 
'--disable-static'
 '--without-mm'
 '--without-mysql'
 '--without-sybase-ct' 
'--enable-curl'
 '--with-apxs2=/usr/bin/apxs2'
 '--without-sqlite'
 '--without-pdo-sqlite'




Reproduce code:
---------------
 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-31 07:29 UTC] sniper@php.net
Not enough info to reproduce (works fine for me..).
What MPM is used for Apache2? (please tell it's worker? :)
What startup? Request or "apachectl start" ?

 [2005-05-31 07:34 UTC] alan at akbkhome dot com
Server version: Apache/2.0.54
it's the debain apache2-mpm-prefork
 [2005-05-31 07:41 UTC] sniper@php.net
Try this:
# ./configure --disable-all --with-apxs2 

And if above crashes:
# ./configure --disable-all --with-apxs2 --enable-debug 

 [2005-05-31 15:32 UTC] alan_k@php.net
Workaround : main/php_variables.c

add this to php_hash_enviroment()
if (!sapi_module.treat_data) {
       php_startup_sapi_content_types();
}

If no-one else can reproduce this, then it's probably best to suspend it. (eg. leave open for a few days..)

Reference information:
gcc version 3.3.5 (Debian 1:3.3.5-12)
ii  apache2-common 2.0.54-4       
ii  apache2-mpm-prefork 2.0.54-4 
ii  apache2-prefork-dev  2.0.54-4 
ii  libtool        1.5.6-6 
ii  autoconf       2.59a-3 





 [2005-06-04 01:02 UTC] sniper@php.net
Can you check if it's some php.ini setting ? (simply make sure none is loaded, and nothing is set in httpd.conf)

 [2005-06-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC