Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-687

Session save race conditions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Problem:

      Currently reproducible under Windows with IE only, I don't know if here are the requests to the server more parallel as under other browsers.
      The error leads to strange and different behaviours, depending on which of the requests was running into the issue. Sometimes the user is just logged out, because the request before destroyed the session and in the next request the session was deleted then.

      Possible Reason (should be fixed with https://jira.translate5.net/browse/TRANSLATE-702; check again):

      Zend_Session_SaveHandler_DbTable::write does not make a INSERT INTO ON DUPLICATE KEY but makes a select to count the available session entries with the same ID and depending on the result it makes an update or insert statement then. This leads to the described race conditions. Since the trace of the logged errors seams to come from an internal PHP trigger the tracing is complicated:
      PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'in1e1l0hlcv7agqbgufoll36h2-zfExtended' for key 'PRIMARY'' in /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Statement/Pdo.php:228
      Stack trace:
      #0 /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
      #1 /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array)
      #2 /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
      #3 /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `se...', Array)
      #4 /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Adapter/Abstract.php(576): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `se...', Array)
      #5 /m in /mnt/mittagqi/www/icorrect/ZendFramework-1.12.9-minimal/library/Zend/Db/Statement/Pdo.php on line 235

      Attachments

        Issue Links

          Activity

            People

              tlauria Thomas Lauria
              tlauria Thomas Lauria
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: