symfony/symfony — pull request #4668 by yanoosh (2012-06-26 20:11:30+00:00)
Title: [HttpFoundation][Sessions] Losing session in case of many concurrent requests.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

When symfony handling many request of one session many instances try read and write session file. The first phase of writing the file is empty and then write session data. If script load an empty file then session will be incorrect. Easiest way to prevent this behaviour is use flock function which allows to control file usage.