Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 133 by [email protected]: JSR-309 driver leaks memory
http://code.google.com/p/mediaserver/issues/detail?id=133

What steps will reproduce the problem?
1. Use a SIP servlet application to play announcements via the JSR-309 driver.
2. Make some calls.
3. The MediaSession object and all it's descendants remain in memory and are not garbage collected.

What is the expected output? What do you see instead?
MediaSessions that have been released should be de-referenced and eventually garbage collected.
They are held by references in two places:
  1) Through the Player and Recorder FSM threads - which are not cancelled.
  2) Through the Driver requestListeners hash map - which is not cleared up.

What version of the product are you using? On what operating system?
Seen with 3.0.0.Final. Reproduced and patched in 3.0.1-SNAPSHOT from git.

Please provide any additional information below.

I've done a local patch, which seems to fix the problem for me. This involves:
  1) RecorderImpl
    Add a RELEASE signal and an INVALID state.
    Add a release method to send the RELEASE signal.

    PlayerImpl
    Add a release method to send the RELEASE signal.

    MediaGroupImpl
    Call player.release() and recorder.release() from release method

  2) DriverImpl
In the processMgcpCommandEvent method, if a match is found in requestListeners, remove it once the handler has been called.

I don't know if this patch will have wider implications. I will prepare a patch file and attach it.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to