ID: 21306 User updated by: Xuefer at 21cn dot com Reported By: Xuefer at 21cn dot com -Status: Feedback +Status: Open Bug Type: Session related Operating System: linux PHP Version: 4CVS (2005-09-16) (5CVS, 6CVS) Assigned To: sas New Comment:
fine Index: zend_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_API.c,v retrieving revision 1.315 diff -u -r1.315 zend_API.c --- zend_API.c 1 Sep 2005 10:04:55 -0000 1.315 +++ zend_API.c 19 Sep 2005 15:46:39 -0000 @@ -2335,7 +2335,9 @@ #if 0 zend_printf("%s: Request shutdown\n", module->name); #endif + zend_try { module->request_shutdown_func(module->type, module->module_number TSRMLS_CC); + } zend_end_try(); } return 0; } Index: mod_user.c =================================================================== RCS file: /repository/php-src/ext/session/mod_user.c,v retrieving revision 1.29 diff -u -r1.29 mod_user.c --- mod_user.c 3 Aug 2005 14:07:43 -0000 1.29 +++ mod_user.c 19 Sep 2005 15:48:49 -0000 @@ -145,7 +145,9 @@ SESS_ZVAL_STRING(key, args[0]); SESS_ZVAL_STRINGN(val, vallen, args[1]); + zend_try { retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC); + } zend_end_try(); FINISH; } indent/space change is not included for readablity. any one patch will do Previous Comments: ------------------------------------------------------------------------ [2005-09-19 17:19:56] [EMAIL PROTECTED] Please provide patches (diff -u), I don't get those "put .. around ..." descriptions. ------------------------------------------------------------------------ [2005-09-19 17:16:49] Xuefer at 21cn dot com the fix is quite simple, just put a zend_try to protect it in session module around retval = ps_call_handler(..), or in Zend/zend_API.c module_registry_cleanup() around module->request_shutdown_func(..) > How common is it to run a PHP script like that? > In a normal usage, I still can not reproduce this. do u mean u can't reproduce for my test script or can't in normal usage? strange, "Reproduced: 36 of 37 (97.3%)" so far the error message (not key point) is just what can be seen, which mean the RSHUTDOWN is not completed (key point) if u emphasize "normal usage", yes, no one want to "exit" in session write handler, but anything else that lead to "zend_bailout" will get me same effect. such as: $this->not_existing_method() ;;; mysql_*() or exit() (something like lost connection close by server, not sql statement error) ;;; a execution timeout ;; maybe exception? if it use bailout, etc... i agree, they're just bugs. but, ppl use session write handler mostly for database storage, using a db class api -> more code -> more chance to hit a script bug -> php bailout * some module (mostly a opcode cacher) might rely on the RSHUTDOWN to unlock()/refcount-- something a simple bug in the script from the 3rd party might make php locked do u thnk the reason above is enough? any more i can help? ------------------------------------------------------------------------ [2005-09-19 13:23:37] [EMAIL PROTECTED] How common is it to run a PHP script like that? In a normal usage, I still can not reproduce this. Please explain how this is reproducable? ------------------------------------------------------------------------ [2005-09-19 12:56:01] Xuefer at 21cn dot com verified with php6 Zend/zend_API.c #if 1 <- enable it zend_printf("%s: Request shutdown\n", module->name); #endif #### ./sapi/cgi/php ./test.php Content-type: text/html Set-Cookie: SID=15db16deadc51c47e8878eaec63d5b71; 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 libxml: Request shutdown xcache: Request shutdown tokenizer: Request shutdown standard: Request shutdown SPL: Request shutdown PDO: Request shutdown session: Request shutdown Warning: Unknown: A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 Unknown(0) : Warning - Unknown: A session is active. You cannot change the session module's ini settings at this time. #### echo '<?php echo "1\n";' | ./sapi/cgi/php Content-type: text/html 1 libxml: Request shutdown xcache: Request shutdown tokenizer: Request shutdown standard: Request shutdown SPL: Request shutdown PDO: Request shutdown session: Request shutdown sockets: Request shutdown sk: Request shutdown SQLite: Request shutdown pcntl: Request shutdown mysqli: Request shutdown mysql: Request shutdown memcache: Request shutdown event: Request shutdown date: Request shutdown bcmath: Request shutdown ------------------------------------------------------------------------ [2005-09-16 15:48:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip And provide a script that actually is usable. For that script it's perfectly fine to give an error.. Also: The version string in the 'Version' field in the bug reports MUST start with a number 4,5 or 6. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/21306 -- Edit this bug report at http://bugs.php.net/?id=21306&edit=1