php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15168 (mm save handler) PHP segfaults saving sessions-vars
Submitted: 2002-01-22 12:37 UTC Modified: 2002-10-14 19:26 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: bugsphpnet at freecharts dot de Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.1.1 OS: SuSE 7.3 /2.4.10
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: bugsphpnet at freecharts dot de
New email:
PHP Version: OS:

 

 [2002-01-22 12:37 UTC] bugsphpnet at freecharts dot de
Changing session variables that are hashes as part of an object ($auth->auth[] from phplib) results in a segfault most of the time. 

It was still there switching back to php 4.1.0 . 

Backtrace: 

Program received signal SIGSEGV, Segmentation fault.
0x405ebdc6 in _zend_is_inconsistent (ht=0x36, file=0x406ea8e4 "zend_hash.c", line=975) at zend_hash.c:84
84              if (ht->inconsistent==HT_OK) {
(gdb) bt
#0  0x405ebdc6 in _zend_is_inconsistent (ht=0x36, file=0x406ea8e4 "zend_hash.c", line=975) at zend_hash.c:84
#1  0x405ee95d in zend_hash_internal_pointer_reset_ex (ht=0x36, pos=0xbfffee30) at zend_hash.c:975
#2  0x40643e48 in php_session_save_current_state () at session.c:544
#3  0x40646db4 in php_session_flush () at session.c:1381
#4  0x40646e08 in zm_deactivate_session (type=1, module_number=7) at session.c:1393
#5  0x405eabcc in module_registry_cleanup (module=0x85c65f0) at zend_API.c:1165
#6  0x405edc5f in zend_hash_apply (ht=0x40720ea0, apply_func=0x405eab80 <module_registry_cleanup>) at zend_hash.c:669
#7  0x405e6c11 in zend_deactivate_modules () at zend.c:585
#8  0x405f94b9 in php_request_shutdown (dummy=0x0) at main.c:723
#9  0x405f5518 in apache_php_module_main (r=0x80a2ca0, display_source_mode=0) at sapi_apache.c:96
#10 0x405f6420 in send_php (r=0x80a2ca0, display_source_mode=0, filename=0x80a4a20 "/home/pages/mydomain/start.php") at mod_php4.c:575
#11 0x405f64a3 in send_parsed_php (r=0x80a2ca0) at mod_php4.c:590
#12 0x8055260 in ap_invoke_handler ()
#13 0x806799c in ap_some_auth_required ()
#14 0x8067a13 in ap_process_request ()
#15 0x805fe27 in ap_child_terminate ()
#16 0x805ffd5 in ap_child_terminate ()
#17 0x8060109 in ap_child_terminate ()
#18 0x8060718 in ap_child_terminate ()
#19 0x8060f95 in main ()


Configure: 

'./configure' \
'--prefix=/usr' \
'--with-config-file-path=/etc' \
'--with-exec-dir=%{libdir}/php/bin' \
'--with-mysql=/usr' \
'--with-gd=yes' \
'--with-tiff-dir=/usr' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-zlib=yes' \
'--with-bz2' \
'--with-ttf' \
'--with-ftp' \
'--with-gettext' \
'--with-mm' \
'--enable-bcmath' \
'--enable-trans-sid' \
'--enable-inline-optimization' \
'--enable-track-vars' \
'--enable-magic-quotes' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-shmop' \
'--enable-ftp' \
'--enable-dbase' \
'--enable-debug' \
'--enable-gd-imgstrttf' \
'--with-apxs=/usr/sbin/apxs'


Regards, 

Johann Hartmann

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-22 17:58 UTC] yohgaki@php.net
Which save handler are you using?
I guess you are using mm save handler, right? I got the same segfault with it. :)
 [2002-01-23 02:21 UTC] hartmann@php.net
Yepp, i just gave file a try, and this works. 

Thanks for your hint. 

Nevertheless it would be nice to use mm again, someday :-) 


 [2002-01-23 02:54 UTC] bugsphpnet at freecharts dot de
Seems that i get no segfaults with file, but i am loosing some of its data. 

while $obj->ary(key=>value,key=>value); seems to survive, 
$obj->ary(key=>ary(key=>value)) seems to leave under certain circumstances. will try to get this into a small example. 

Regards, 
Johann-Peter Hartmann
 [2002-01-23 04:38 UTC] yohgaki@php.net
It's not a solution, but a workaround.
You can try user, msession or session_pgsql save handler module.

User is compile in by default.
--with-msession for msession (And you need lib and daemon for it. Refer to manual)
session_pgsql is under PEAR CVS (/pear/PECL).

user/msession/session_pgsql works fine for me. (msession/session_pgsql are experimental modules)

 [2002-02-02 22:21 UTC] yohgaki@php.net
Changed summay (Added "mm save handler")
 [2002-02-03 20:01 UTC] yohgaki@php.net
Will be fixed soon.
 [2002-02-05 11:40 UTC] hartmann@php.net
This bug has been fixed in CVS.
 [2002-05-14 10:54 UTC] aral at aralbalkan dot com
I am getting zend_hash_internal_pointer_reset_ex -- Apache crashes while trying to load the custom session handlers (I am saving out to MySQL using Manuel Lemos' Metabase.)

Everything was working perfectly under PHP 4.0.5, Apache 1.3.19.

Crashes every time on PHP 4.1.1, Apache 1.3.22.

Win32 - PIII 600. 128mb ram.
 [2002-09-23 22:58 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-14 19:26 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, 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: Fri Apr 19 18:01:28 2024 UTC