JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-6151

DefaultMuleMessage hard reference to thread and CXF ClientImpl weak reference: results in OOM

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 3.1.2
  • Fix Version/s: None
  • Component/s: Core: Concurrency / Threading, Modules: CXF
  • Labels:
    None
  • User impact:
    High
  • Similar Issues:
    None

Description

The field org.apache.cxf.endpoint.ClientImpl#responseContext is a WeakHashMap that contains a weak reference to the Thread that is handling a Mule message (key of the map). The value of the map contains among a lot of other things also the DefaultMuleMessage (contained in DefaultMuleEvent).
Since Mule 3 the DefaultMuleMessage also contains a hard reference to the thread handling the Mule message: org.mule.DefaultMuleMessage#ownerThread.

This means that the WeakHashMap org.apache.cxf.endpoint.ClientImpl#responseContext contains references to the Thread object in its key and value. As a result of this the Thread and the corresponding responseContext are never removed from the responseContext map.

Under a continuous load this is not an issue since the thread pool that is used to handle messages is constant. This responseContext map will only grow when the pool first shrinks and then grows again. When shrinking Threads are removed from the pool and the corresponding responseContext objects should be removed as well. When the pool grows again new Thread objects are created and added to the responseContext map.
In our case the map became 1.4GB after 6 days.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Jeroen Verellen added a comment - 03/Apr/12 06:44 AM

Our current workaround is to set the threading profile maxThreadsActive and maxThreadsIdle to the same number so that the pool is constant and no new threads are created.

Show
Jeroen Verellen added a comment - 03/Apr/12 06:44 AM Our current workaround is to set the threading profile maxThreadsActive and maxThreadsIdle to the same number so that the pool is constant and no new threads are created.

People

  • Assignee:
    Unassigned
    Reporter:
    Jeroen Verellen
Vote (2)
Watch (3)

Dates

  • Created:
    03/Apr/12 06:39 AM
    Updated:
    04/Apr/12 01:09 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.