You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/06/28 11:52:14 UTC

[Bug 62501] New: Race condition (?) in session attribute replication

https://bz.apache.org/bugzilla/show_bug.cgi?id=62501

            Bug ID: 62501
           Summary: Race condition (?) in session attribute replication
           Product: Tomcat 9
           Version: 9.0.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Cluster
          Assignee: dev@tomcat.apache.org
          Reporter: antosha86@mail.ru
  Target Milestone: -----

Default cluster configuration from documentation (SimpleTcpCluster). 2 nodes. 
I implemented javax.servlet.Filter to add some data to a session just after
login. And from time to time it does not replicated on stand by server. To
investigate problem i connected to tomcat with remote debug and added some
debug messages. Here is output:

1) session created 0BDAA9C29A23767A928DD59A6AC30F4E
2) receive session id change
SESSION-ID-CHANGED#localhost#/Midlevel#0BDAA9C29A23767A928DD59A6AC30F4E, found
delta session DeltaSession[0BDAA9C29A23767A928DD59A6AC30F4E]
3) execute id change: old id = 0BDAA9C29A23767A928DD59A6AC30F4E new id =
C760E8517DE686E79A1D08DD8A685465
4) handleSESSION_DELTA delta session id = C760E8517DE686E79A1D08DD8A685465
found session = DeltaSession[C760E8517DE686E79A1D08DD8A685465]
5) receive session id change
SESSION-ID-CHANGED#localhost#/Midlevel#C760E8517DE686E79A1D08DD8A685465 delta
session DeltaSession[C760E8517DE686E79A1D08DD8A685465]
6) handleSESSION_DELTA delta session id = 21952C40B449448726888BFEF0263FAD
found session = null
7) execute id change: old id = C760E8517DE686E79A1D08DD8A685465 new id =
21952C40B449448726888BFEF0263FAD

on line 5) standby receive command to change id, but before change id happens
delta message (already with new id) was received and not found session as a
result session attribute was lost.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62501] Race condition (?) in session attribute replication

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62501

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
There is a fix for this in 9.0.9.

The fix isn't perfect but I could reproduce this 100% of the time before the
fix and not at all after the fix. So, while the race is still theoretically
possible, the issue is currently considered resolved.

If you still see the issue, feel free to re-open it and we can take another
look although options for addressing it are fairly limited.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org