Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

Hyperic HQ

Integration Tests Memory Leaks

Details

  • Type: Developer Developer
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.6.5
  • Fix Version/s: 4.6.5
  • Component/s: Deprecated: Server
  • Environment:
    Developers' & Bamboo builds
  • Case Links:
    none
  • Regression:
    No

Description

Spring's @DirtiesContext annotation does not release the SpringApplicationContext & Hyperic Related Thread resources properly resulting in a memory leak

Activity

Hide
Guy Segev added a comment -
  • Release memory between tests held by:
    • Hyperic Related Threads
    • JMX Server
    • Spring context
    • FileMonitor instances
    • Singletons
    • Hibernate SessionFactoryImpl
    • Hibernate Configuration
    • Maven Surefire's TeeStream
    • emulate shutdownhooks
  • Kill Hyperic related Threads in between test methods marked with @DirtiesContext annotation
  • Remove all hard references to the closed spring context in between tests methods marked with @DirtiesContext annotation
  • shutdown the platform JMX server in between test methods marked with @DirtiesContext annotation
  • Add @DirtiesContext to each test class
  • Increase the test JVM heap size to 2500m as a temporary fix until the application shutdown process is fixed
  • (Not checkedin for this release but source included here under HHQ-5359_out_of_scope.diff) - Introduce proper @PreDestroy methods to each component.

Note The scope of the current checkin includes integration tests affecting code and not serverside code due to the risk factor; Nevertheless the latter is attached here under HHQ-5359_out_of_scope.diff for review.
The current checkin scope shall not eliminate the memory and thread leaks but only somewhat reduce the footprint.
it covers the following tasks:

  • Pruning JMX Server resources between tests
  • Pruning the Spring context between tests
  • Maven Surefire's TeeStream
  • Removal of the CM's spring configuration elements from the component scan so that file monitors would not start on the server and hog spring contexts
Show
Guy Segev added a comment -
  • Release memory between tests held by:
    • Hyperic Related Threads
    • JMX Server
    • Spring context
    • FileMonitor instances
    • Singletons
    • Hibernate SessionFactoryImpl
    • Hibernate Configuration
    • Maven Surefire's TeeStream
    • emulate shutdownhooks
  • Kill Hyperic related Threads in between test methods marked with @DirtiesContext annotation
  • Remove all hard references to the closed spring context in between tests methods marked with @DirtiesContext annotation
  • shutdown the platform JMX server in between test methods marked with @DirtiesContext annotation
  • Add @DirtiesContext to each test class
  • Increase the test JVM heap size to 2500m as a temporary fix until the application shutdown process is fixed
  • (Not checkedin for this release but source included here under HHQ-5359_out_of_scope.diff) - Introduce proper @PreDestroy methods to each component.
Note The scope of the current checkin includes integration tests affecting code and not serverside code due to the risk factor; Nevertheless the latter is attached here under HHQ-5359_out_of_scope.diff for review. The current checkin scope shall not eliminate the memory and thread leaks but only somewhat reduce the footprint. it covers the following tasks:
  • Pruning JMX Server resources between tests
  • Pruning the Spring context between tests
  • Maven Surefire's TeeStream
  • Removal of the CM's spring configuration elements from the component scan so that file monitors would not start on the server and hog spring contexts
Hide
Guy Segev added a comment -

master org/com CI builds are now successful

Show
Guy Segev added a comment - master org/com CI builds are now successful

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    2 years, 12 weeks, 5 days ago