php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39991 session_write_close
Submitted: 2006-12-30 11:10 UTC Modified: 2007-01-19 01:00 UTC
From: mauricebis at gmail dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.4.3-dev OS: linux
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: mauricebis at gmail dot com
New email:
PHP Version: OS:

 

 [2006-12-30 11:10 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-30 22:37 UTC] tony2001@php.net
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.



 [2007-01-01 09:46 UTC] mauricebis at gmail dot com
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.
 [2007-01-11 09:54 UTC] tony2001@php.net
Please try using this CVS snapshot:

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


 [2007-01-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, 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: Mon May 06 00:01:31 2024 UTC