I tried PHP 5.2.3RC1 today and the SunONE webserver using the NSAPI plugin
crashed in module startups with a segfault.

This happens because rasmus changed tsrm_virtual_cwd.c to use
get_request_time instead of time() (see changelog of that file). During
module startup the extension browscap tries to open the browscap.ini file
and uses the TSRM functions to do that (because TSRM is used in NSAPI). At
module startup there is unfortunately no request running so the call to the
SAPI routine sapi_nsapi_get_request_time() core dumps because of a missing
server_context.

I think that should be fixed because it affects all multithreaded webserver
SAPIs that supply a get_request_time-function.

Here the core dump:

#0  0xfc939712 in sapi_nsapi_get_request_time (tsrm_ls=0x0) at
/pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:721
721             return REQ_TIME( ((nsapi_request_context
*)SG(server_context))->rq );
(gdb) where
#0  0xfc939712 in sapi_nsapi_get_request_time (tsrm_ls=0x0) at
/pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:721
#1  0xfc8782b2 in sapi_get_request_time (tsrm_ls=0x86bd388) at
/pangaea/install/php-5.2.3RC1/main/SAPI.c:990
#2  0xfc86ceb2 in virtual_file_ex (state=0x80476f8, path=0x827d7f0
"/pangaea/webserver70/browscap.ini", verify_path=0, use_realpath=1)
    at /pangaea/install/php-5.2.3RC1/TSRM/tsrm_virtual_cwd.c:522
#3  0xfc86d1b6 in virtual_fopen (path=0x827d7f0
"/pangaea/webserver70/browscap.ini", mode=0xfcb4370c "r", tsrm_ls=0x86bd388)
    at /pangaea/install/php-5.2.3RC1/TSRM/tsrm_virtual_cwd.c:819
#4  0xfc7edaad in zm_startup_browscap (type=1, module_number=12,
tsrm_ls=0x86bd388)
    at /pangaea/install/php-5.2.3RC1/ext/standard/browscap.c:165
#5  0xfc7e69a2 in zm_startup_basic (type=1, module_number=12,
tsrm_ls=0x86bd388)
    at /pangaea/install/php-5.2.3RC1/ext/standard/basic_functions.c:4026
#6  0xfc8b7bc6 in zend_startup_module_ex (module=0x8722618,
tsrm_ls=0x86bd388) at /pangaea/install/php-5.2.3RC1/Zend/zend_API.c:1464
#7  0xfc8bece0 in zend_hash_apply (ht=0xfcbc5fe0, apply_func=0xfc8b7b30
<zend_startup_module_ex>, tsrm_ls=0x86bd388)
    at /pangaea/install/php-5.2.3RC1/Zend/zend_hash.c:673
#8  0xfc8b7df4 in zend_startup_modules (tsrm_ls=0x86bd388) at
/pangaea/install/php-5.2.3RC1/Zend/zend_API.c:1511
#9  0xfc870804 in php_module_startup (sf=0xfcbb2120,
additional_modules=0xfcbb2020, num_additional_modules=1)
    at /pangaea/install/php-5.2.3RC1/main/main.c:1621
#10 0xfc93973f in php_nsapi_startup (sapi_module=0xfcbb2120) at
/pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:726
#11 0xfc939866 in php5_init (pb=0x8098290, sn=0x0, rq=0x0) at
/pangaea/install/php-5.2.3RC1/sapi/nsapi/nsapi.c:859
#12 0xfecde67a in func_exec_str () from
/pangaea/webserver70/lib/libns-httpd40.so
#13 0xfecde8e6 in INTfunc_exec () from
/pangaea/webserver70/lib/libns-httpd40.so
#14 0xfecdc45f in __1cSrun_init_functions6Fi_nIPRStatus__ () from
/pangaea/webserver70/lib/libns-httpd40.so
#15 0xfecdc598 in
__1cbCconf_run_late_init_functions6FpnNConfiguration__nIPRStatus__ () from
/pangaea/webserver70/lib/libns-httpd40.so
#16 0xfed5f237 in __1cJWebServerDRun6F_nIPRStatus__ () from
/pangaea/webserver70/lib/libns-httpd40.so
#17 0x08050b18 in main ()
-----
Uwe Schindler
[EMAIL PROTECTED] - http://www.php.net
NSAPI SAPI developer
Bremen, Germany

> Sent: Friday, May 25, 2007 2:33 AM
> To: php-dev List
> Subject: [PHP-DEV] PHP 5.2.3RC1 Released
> 
> The first release candidate of PHP 5.2.3 is now available for testing
> and can be downloaded here:
> 
> http://downloads.php.net/ilia/php-5.2.3RC1.tar.bz2 (md5sum:
> 343785b0558f5696c14607d62f084d4c)
> 
> The release comes a bit sooner then anticipated as it is needed to
> address a regression introduced by 5.2.2 in relation to
> RAW_HTTP_POST_DATA handling. I'd like to keep the release cycle as
> short as possible so we can get this version out ASAP. I'd like to
> ask everyone to try this release against their code and/or test suits
> and report any new problems if there are any. If there are no new
> issues I will move to the final release within 1 week.
> 
> I'd also like to ask all developers to refrain from making major
> commits or non-bug-fix commits for the next week to the 5.2 branch.
> 
> 
> Ilia Alshanetsky
> 5.2 Release Master
> 
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to