showrav017 / jain-sip

Automatically exported from code.google.com/p/jain-sip
0 stars 0 forks source link

Retransmission alert memory leak #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. make a call and enableRetransmissionAlerts for INVITE
2. on ACK disableRetransmissionAlerts (don't think this is really necessary as 
I think the JAIN SIP Stack does this itself)
3. terminate the call

What is the expected output? What do you see instead?

The SIPServerTransaction should be cleaned up after all timers have expired, 
however, a reference remains in sipStack.retransmissionAlertTransactions

What version of the product are you using? On what operating system?

latest snapshot (1.2.2169)

Please provide any additional information below.

Problem is that the constructor of RetransmissionAlertTimerTask never assigns 
the dialogId:

        public RetransmissionAlertTimerTask(String dialogId) {

            this.ticks = SIPTransaction.T1;
            this.ticksLeft = this.ticks;
        }

RetransmissionAlertTimerTask.dialogId is never assigned anywhere.  When alerts 
are disabled the check for dialogId is false and the transaction never gets 
cleaned up:

    public void disableRetransmissionAlerts() {
        if (this.retransmissionAlertTimerTask != null && this.retransmissionAlertEnabled) {
               sipStack.getTimer().cancel(retransmissionAlertTimerTask);
            this.retransmissionAlertEnabled = false;

            String dialogId = this.retransmissionAlertTimerTask.dialogId;
            if (dialogId != null) {
                sipStack.retransmissionAlertTransactions.remove(dialogId);
            }
            this.retransmissionAlertTimerTask = null;
        }
    }

I have attached a file with the fixed constructor.

regards, Mitchell Ackerman (mitchell.ackerman@pgi.com)

Original issue reported on code.google.com by mitchell...@gmail.com on 21 Sep 2012 at 6:14

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jean.deruelle on 17 Oct 2012 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by jean.deruelle on 17 Oct 2012 at 8:50

GoogleCodeExporter commented 8 years ago
This issue was updated by revision 63064352a698.

(git-repo)
http://java.net/jira/browse/JSIP-443

Committing patch from mitchell.ackerman@pgi.com, Thanks !
 and adding non regression test

git-svn-id: https://svn.java.net/svn/jsip~svn/trunk@2269 
8e71dc83-d81e-6649-80f2-80b843a9b2be

Original comment by jean.deruelle on 15 Feb 2013 at 2:17

GoogleCodeExporter commented 8 years ago
This issue was updated by revision d70c56ad4057.

Backport to TelScale branch

Committing patch from mitchell.ackerman@pgi.com, Thanks !
 and adding non regression test

git-svn-id: https://svn.java.net/svn/jsip~svn/trunk@2269 
8e71dc83-d81e-6649-80f2-80b843a9b2be
(cherry picked from commit 63064352a698c3c21b9eb596e1c407f9c6657a9b)

Conflicts:
    src/gov/nist/javax/sip/stack/SIPServerTransactionImpl.java
    src/test/unit/gov/nist/javax/sip/stack/ServerTransactionRetransmissionTimerTest.java

Original comment by jean.deruelle on 15 Feb 2013 at 2:34

GoogleCodeExporter commented 8 years ago
Contributions acknowledged at 
http://java.net/projects/jsip/pages/Acknowledgements

Original comment by jean.deruelle on 15 Feb 2013 at 2:37

GoogleCodeExporter commented 8 years ago
This issue was updated by revision d70c56ad4057.

Backport to TelScale branch

Committing patch from mitchell.ackerman@pgi.com, Thanks !
 and adding non regression test

git-svn-id: https://svn.java.net/svn/jsip~svn/trunk@2269 
8e71dc83-d81e-6649-80f2-80b843a9b2be
(cherry picked from commit 63064352a698c3c21b9eb596e1c407f9c6657a9b)

Conflicts:
    src/gov/nist/javax/sip/stack/SIPServerTransactionImpl.java
    src/test/unit/gov/nist/javax/sip/stack/ServerTransactionRetransmissionTimerTest.java

Original comment by jean.der...@telestax.com on 19 Aug 2014 at 4:59