[QFJ-645] Deadlock between message sending and reset due to message reception on Session and senderMsgSeqNumLock Created: 27/Oct/11 Updated: 08/Apr/14 Resolved: 31/Jul/12
|Affects Version/s:||1.5.0, 1.5.1|
|Reporter:||marc sperisen||Assignee:||Christoph John|
Deadlock arises between the following threads:
-> Thread1 is sending a message: it first acquires the lock senderMsgSeqNumLock and then tries to acquire a lock on the session instance
-> Thread2: while processing an incoming message, the engine notices that it is in a new session time interval (StartTime/EndTime) and therefore a MsqSeqNum reset is started.
|Comment by Peter Clarke [ 12/Jan/12 ]|
My solution to this was to remove the synchronized keyword from the Session.reset function.
I've also attached a unit test we have to check for the issue.
|Comment by John [ 17/Jan/12 ]|
had this one too, but I haven't changed the library so I synchronized on the "Session" (=> so locks are taken in the same order).
|Comment by John [ 02/Feb/12 ]|
Erratum on the preceding comment.
Peter's was solution was the best one from the beggining and my workarround is not that good ;o)
I just put the code I used for the "reset" method :
|Comment by Christoph John [ 31/Jul/12 ]|
Peter and John,