Bug #52720 [Opn]: User Session handler Crash [FPM and APC]

From: Date: Sat, 28 Aug 2010 14:43:52 +0000
Subject: Bug #52720 [Opn]: User Session handler Crash [FPM and APC]
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-153875@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52720&edit=1

 ID:                 52720
 Updated by:         rasmus@php.net
 Reported by:        mat999 at gmail dot com
 Summary:            User Session handler Crash [FPM and APC]
 Status:             Open
 Type:               Bug
 Package:            Session related
 Operating System:   Debian Lenny Linux
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

No it isn't.


Previous Comments:
------------------------------------------------------------------------
[2010-08-28 16:42:18] mat999 at gmail dot com

ive tried that but it doesnt propagate to child processes and php-fpm is
multy threaded.

------------------------------------------------------------------------
[2010-08-28 16:40:05] rasmus@php.net

Just attach gdb to a runnning php-fpm process.

gdb /usr/bin/php-fpm 1234

where 1234 is the process id.  Then hit 'c' for continue in gdb and hit
port 80 
until you hit the process you attached to.

------------------------------------------------------------------------
[2010-08-28 16:30:47] mat999 at gmail dot com

its not that easy for php-fpm, and this is php-fpm specific.

------------------------------------------------------------------------
[2010-08-28 12:19:44] pajoye@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

A backtrace would help already, see the instructions on bugs.php.net.

------------------------------------------------------------------------
[2010-08-28 09:47:00] mat999 at gmail dot com

Description:
------------
Registering a user session handler crashes the system.

System:
php 5.3.3-fpm (from dotdeb repo)
APC extension



Test script:
---------------
class Session
    {      
        public static function Init(){
            ini_set('session.save_handler', 'user');

            session_set_save_handler(array('Session', 'open'),
            array('Session', 'close'),
            array('Session', 'read'),
            array('Session', 'write'),
            array('Session', 'destroy'),
            array('Session', 'gc')
            );
            session_start();
        }
        public static function open() {
            return true;
        }
        public static function close() {
            return true;
        }
        public static function read($id) {
            return '';
            //return
apc_exists('ns_'.$id)?(string)apc_fetch('ns_'.$id):'';
        }
        public static function write($id, $data) {
            //return apc_store('ns_'.$id,$data,1200);
        }
        public static function destroy($id) {
            //apc_delete('ns_'.$id);
            return true;
        }
        public static function gc($max) {
            return true;
        }
    }

Expected result:
----------------
Session registration

Actual result:
--------------
Crash, if someone gives me details on how to valgrind php-fpm ill post a
backtrace, ive failed to do so.


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52720&edit=1


Thread (11 messages)

« previous php.bugs (#153875) next »