php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26599 segfault in php_session_initialize
Submitted: 2003-12-12 05:52 UTC Modified: 2004-01-01 20:51 UTC
From: chris at widexs dot nl Assigned:
Status: No Feedback Package: Session related
PHP Version: 4CVS-2003-12-12 (stable) OS: linux 2.4.23
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: chris at widexs dot nl
New email:
PHP Version: OS:

 

 [2003-12-12 05:52 UTC] chris at widexs dot nl
Description:
------------
Getting segmentation fault in php_session_initialize

-apache 2.0.48
-php4-STABLE-200312120830
-gcc 3.3.2
-glibc 2.3.2
-zend optimizer 2.1.0

php compile options:
--with-apxs2=/usr/local/apache2/bin/apxs \
--disable-cgi \
--enable-safe-mode \
--with-openssl=/usr/local/ssl \
--with-pear \
--with-zlib \
--enable-bcmath \
--enable-calendar \
--with-curl=/usr/local/curl \
--enable-dba \
--enable-dbase \
--with-dom=/usr/local \
--with-dom-xslt=/usr/local \
--with-dom-exslt=/usr/local \
--enable-ftp \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-ttf=/usr \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--with-imap=../imap \
--with-imap-ssl=/usr/local/ssl \
--with-ldap \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr/local/mysql \
--with-pdflib \
--with-swf=../swf/dist/ \
--enable-wddx \
--enable-xslt \
--with-xslt-sablot=/usr/local \
--with-expat-dir=/usr/local \
--enable-exif \
--enable-memory-limit






Reproduce code:
---------------
n/a

Expected result:
----------------
n/a

Actual result:
--------------
#0  0x404ed36c in php_session_initialize (tsrm_ls=0x851c990) at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
598             if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name) TSRMLS_CC) == FAILURE) {
(gdb) bt
#0  0x404ed36c in php_session_initialize (tsrm_ls=0x851c990) at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
#1  0x404eeb6b in php_session_start (tsrm_ls=0x851c990) at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1047
#2  0x404f07b5 in zif_session_start (ht=0, return_value=0x8ecdc8c, this_ptr=0x0, return_value_used=0, tsrm_ls=0x8bad198)
    at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1486
#3  0x40e34e33 in zend_assign_to_variable_reference () from /usr/local/Zend/lib/Optimizer_TS/php-4.3.x/ZendOptimizer.so


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-12 05:56 UTC] derick@php.net
Please try without ZendOptimizer.

Derick
 [2003-12-12 07:15 UTC] chris at widexs dot nl
ZendOptimizer commented out in php.ini.
I get the next segfault:

#0  0x404ed36c in php_session_initialize (tsrm_ls=0x853e130) at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
598             if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name) TSRMLS_CC) == FAILURE) {
(gdb) bt
#0  0x404ed36c in php_session_initialize (tsrm_ls=0x853e130) at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
#1  0x404eeb6b in php_session_start (tsrm_ls=0x853e130) at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1047
#2  0x404f07b5 in zif_session_start (ht=0, return_value=0x8e2a944, this_ptr=0x0, return_value_used=0, tsrm_ls=0x85e5e78)
    at /root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1486
#3  0x405adb8f in execute (op_array=0x8dca804, tsrm_ls=0x853e130) at /root/apache2.new/php4-STABLE-200312120830/Zend/zend_execute.c:1616
#4  0x4059e1fd in zend_execute_scripts (type=8, tsrm_ls=0x853e130, retval=0x0, file_count=3) at /root/apache2.new/php4-STABLE-200312120830/Zend/zend.c:884
#5  0x4056bd76 in php_execute_script (primary_file=0xbefff89c, tsrm_ls=0x853e130) at /root/apache2.new/php4-STABLE-200312120830/main/main.c:1729
#6  0x405b3472 in php_handler (r=0x8a57d18) at /root/apache2.new/php4-STABLE-200312120830/sapi/apache2handler/sapi_apache2.c:537
#7  0x080ac3d5 in ap_run_handler (r=0x8a57d18) at config.c:195
#8  0x080ac9ef in ap_invoke_handler (r=0x8a57d18) at config.c:401
#9  0x0808b236 in ap_process_request (r=0x8a57d18) at http_request.c:288
#10 0x0808681c in ap_process_http_connection (c=0x8a551d0) at http_core.c:293
#11 0x080b7515 in ap_run_process_connection (c=0x8a551d0) at connection.c:85
#12 0x080a8a8c in process_socket (p=0x8a550a8, sock=0x8a550e0, my_child_num=29, my_thread_num=139732752, bucket_alloc=0x85e5e78) at worker.c:632
#13 0x080a921a in worker_thread (thd=0x85e5e78, dummy=0x85e5e78) at worker.c:946
#14 0x401ceda6 in dummy_worker (opaque=0x85e5e78) at thread.c:127
#15 0x4025bda0 in pthread_start_thread (arg=0xbefffbe0) at manager.c:300
#16 0x40387447 in __clone () from /lib/libc.so.6
 [2003-12-12 07:20 UTC] derick@php.net
Can you put your php.ini online (with all the commented out lines removed please). I think it has to do with a wrong setting of the session module.
 [2003-12-12 07:27 UTC] chris at widexs dot nl
[PHP]

safe_mode               =       On
safe_mode_exec_dir      =       .
safe_mode_include_dir   =       "/usr/local/lib/php"
upload_tmp_dir          =       "/var/spool/php"
session.save_path       =       "/var/spool/php"
asp_tags                =       On
register_globals        =       On
upload_max_filesize     =       26214400
post_max_size           =       26214400
magic_quotes_gpc        =       Off

max_execution_time      = 60            ; Maximum execution time of each script, in seconds
memory_limit            = 26214400      ; Maximum amount of memory a script may consume (25MB)
 [2003-12-14 20:49 UTC] sniper@php.net
Can you please try compiling Apache2 with the non-threaded MPM. (prefork) 
Also grab the latest stable PHP snapshot.


 [2003-12-15 09:17 UTC] chris at widexs dot nl
This seems to solve the problem.
But, this means, that i cannot use threaded MPM.. ?

Thx for the quick response.
 [2003-12-16 12:26 UTC] iliaa@php.net
Does the problem occur if you disable all extensions other then session and not use zend optimizer?

Some of the extensions you are using such as GD are not thread-safe and may result in undefined behaviour.
 [2004-01-01 20:51 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-02-23 09:46 UTC] jtacon at azinteractive dot com
Same problem to me ..
Red Hat 7.3, PHP 4.3.4, Apache 1.3.29 ..
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 05:01:30 2024 UTC