ID:               39991
 User updated by:  mauricebis at gmail dot com
 Reported By:      mauricebis at gmail dot com
-Status:           Feedback
+Status:           Open
-Bug Type:         Filesystem function related
+Bug Type:         Session related
 Operating System: linux
-PHP Version:      4.4.4
+PHP Version:      4.4.3-dev
 New Comment:

I have one process P1 which calls session_start() and then sets some
session variables. 

I've another proces P2 which also calls session_start() at the
beginning and which is blocked due to the locking policy of
session_start() waiting for the lock to be released.

P1 now calls session_write_close(). We would then expect P2 to read the
new values of the session variables. But I experienced a race condition
whereby P2 was allowed to proceed and couldn't read the new values of
the session variables. 

In other words, it seems that in some situations, session_write_close()
releases the lock before the possible updates to session variables are
made visible to other processes.


Previous Comments:
------------------------------------------------------------------------

[2006-12-30 22:37:32] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.




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

[2006-12-30 11:10:35] mauricebis at gmail dot com

Description:
------------
I experienced a race situation with session_write_close where the lock
(acquired in session_start) was released before the updated $_SESSION
variables were visible to other processes. Another process blocked on
session_start was allowed to proceed but could not read the session
variables supposedly written through session_write_close.



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


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

Reply via email to