php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13106 session_set_save_handler is unstable
Submitted: 2001-09-03 07:29 UTC Modified: 2002-01-09 02:07 UTC
From: mats at itboost dot co dot jp Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.6 OS: RedHat Linux 7.1
Private report: No CVE-ID: None
 [2001-09-03 07:29 UTC] mats at itboost dot co dot jp
When I use session_set_save_handler, php core dumped.
It seems simple problem, because php core dumped at
many place in some php source files.

Following is typically core dump.

Thanx.


[root@mats lib]# gdb php     
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run test.php
Starting program: /usr/local/bin/php test.php
X-Powered-By: PHP/4.0.6
Set-Cookie: PHPSESSID=7c37c912b8491005eee1ea24b068c749; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html

added sHoge
added sFoo
<html>
<body>
<a href="test2.php">next</a>
</body>
</html>
<br>
<b>Warning</b>:  MkDir failed (No such file or directory) in <b>/usr/local/apache/htdocs/test/lib/_sessionHandler_fileBase.php</b> on line <b>44</b><br>

Program received signal SIGSEGV, Segmentation fault.
0x080c1d87 in zend_hash_rehash (ht=0x8184d0c) at zend_hash.c:482
482                     nIndex = p->h % ht->nTableSize;
(gdb) bt
#0  0x080c1d87 in zend_hash_rehash (ht=0x8184d0c) at zend_hash.c:482
#1  0x080c1d25 in zend_hash_do_resize (ht=0x8184d0c) at zend_hash.c:463
#2  0x080c170c in zend_hash_add_or_update (ht=0x8184d0c, arKey=0x8187c24 "fp", nKeyLength=3, pData=0xbfffefb8, 
    nDataSize=4, pDest=0xbfffefd4, flag=1) at zend_hash.c:306
#3  0x080e95bd in zend_fetch_var_address (result=0x8189704, op1=0x8189714, op2=0x8189724, Ts=0xbffff010, type=1)
    at ./zend_execute.c:484
#4  0x080eb225 in execute (op_array=0x818a208) at ./zend_execute.c:1140
#5  0x080b872e in call_user_function_ex (function_table=0x8153750, object_pp=0x0, function_name=0x818d5dc, 
    retval_ptr_ptr=0xbffff7f8, param_count=2, params=0x8180f2c, no_separation=1, symbol_table=0x0)
    at zend_execute_API.c:464
#6  0x080b8108 in call_user_function (function_table=0x8153750, object_pp=0x0, function_name=0x818d5dc, 
    retval_ptr=0x817bc44, param_count=2, params=0xbffff870) at zend_execute_API.c:325
#7  0x080785f1 in ps_call_handler (func=0x818d5dc, argc=2, argv=0xbffff870) at mod_user.c:59
#8  0x080789b0 in ps_write_user (mod_data=0x814f830, key=0x818e744 "7c37c912b8491005eee1ea24b068c749", 
    val=0x817bccc "sHoge|s:8:\"hogehoge\";sFoo|s:4:\"fofo\";", vallen=37) at mod_user.c:147
#9  0x08075ebe in php_session_save_current_state () at session.c:547
#10 0x08077ef5 in php_session_flush () at session.c:1377
#11 0x08077f17 in php_rshutdown_session (type=1, module_number=3) at session.c:1392
#12 0x080bf725 in module_registry_cleanup (module=0x8170c60) at zend_API.c:785
#13 0x080c22cb in zend_hash_apply (ht=0x8153680, apply_func=0x80bf6f8 <module_registry_cleanup>) at zend_hash.c:688
#14 0x080beaab in zend_deactivate_modules () at zend.c:526
#15 0x0805e214 in php_request_shutdown (dummy=0x0) at main.c:657
#16 0x0805d583 in main (argc=2, argv=0xbffffa9c) at cgi_main.c:751
#17 0x400dc177 in __libc_start_main (main=0x805cd74 <main>, argc=2, ubp_av=0xbffffa9c, init=0x805b9bc <_init>, 
    fini=0x80f4800 <_fini>, rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffffa8c)
    at ../sysdeps/generic/libc-start.c:129


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-19 22:23 UTC] yohgaki@php.net
Please test with 4.1.0 and latest CVS snapshot.
CVS snapshot source can be found 
http://snaps.php.net/
(No windows binary)

If you don't have problem with latest CVS snapshot,
you can close your bug report by yourself.

Please report the result. When you update your bug
report, do not forget updating PHP version also.

Thank you
-- 
Yasuo


 [2002-01-09 02:07 UTC] lobbin@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 08:01:29 2024 UTC