-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MemoryLeaks] Transactions didn't remove from Cache if it is in LOCAL mode #12
Comments
I suggest to add new condition:
Then Transaction removed from Cache. |
Perhaps we don't need Cache in LOCAL mode. |
I agree add/remove conditions needs to be consistent, so the "same" condition must be used for add and remove, regardless any environment configuration. We cant allow those leaks to happen in any situation... |
@jaimecasero is it necessary to set wrappedTransaction to null, and eventFiringAddress to null for clearing? wdyt? https://github.com/RestComm/jain-slee.sip/blob/master/resources/sip11/ra/src/main/java/org/mobicents/slee/resource/sip11/wrappers/ClientTransactionWrapper.java#L215 |
Hi, Regards On Fri, Jun 24, 2016 at 10:43 AM, SergeyLee notifications@github.com
|
These Memory Leaks appeared after Performance Tests with SIP UAS Example with JBoss DEFAULT profile.
Here ClusteredSipStackImpl created Transactions:
https://github.com/RestComm/jain-sip.ha/blob/master/core/src/main/java/org/mobicents/ha/javax/sip/ClusteredSipStackImpl.java#L561-L576
If sipCache.inLocalMode() or transactionFactory == null we got jSIP-Ext SipStackImpl
https://github.com/RestComm/jain-sip.ext/blob/master/src/main/java/org/mobicents/ext/javax/sip/SipStackImpl.java#L156-L171
In our case we have created transactionFactory as MobicentsHATransactionFactory, because replicationStrategy == ReplicationStrategy.EarlyDialog
https://github.com/RestComm/jain-sip.ha/blob/master/core/src/main/java/org/mobicents/ha/javax/sip/ClusteredSipStackImpl.java#L110-L118
So transactionFactory != null and we created Transactions with MobicentsHATransactionFactory and they added to Cache:
https://github.com/RestComm/jain-sip.ha/blob/master/core/src/main/java/gov/nist/javax/sip/stack/MobicentsHASIPClientTransaction.java#L125
https://github.com/RestComm/jain-sip.ha/blob/master/core/src/main/java/gov/nist/javax/sip/stack/MobicentsHASIPServerTransaction.java#L130
When ClusteredSipStackImpl removed Transaction in LOCAL mode it didn't remove Transaction from Cache:
https://github.com/RestComm/jain-sip.ha/blob/master/core/src/main/java/org/mobicents/ha/javax/sip/ClusteredSipStackImpl.java#L474-L476
and here:
https://github.com/RestComm/jain-sip.ha/blob/master/core/src/main/java/org/mobicents/ha/javax/sip/ClusteredSipStackImpl.java#L499-L501
The text was updated successfully, but these errors were encountered: