Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2909

Testcase infra structure for MemoryLeaks

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • JBossAS-4.2.0.GA
    • None
    • Test Suite
    • None
    • High
    • 0
    • 0% 0%

    Description

      We could modify JBossTestCase::deploy to introspect every package being deployed and write details to a list. (say the name of the loaded classes, the name of the package and the name of the test).

      Later before stopping the server on the testsuite, we should introspect loaded classes on the server and compare to the list. The intersection should be zero.
      Also before doing such comparisson is a good idea to force an OutOfMemoryError, forcing eventual SoftReferences being released (e.g. JavaSerialization or any other Reflection cache)

      To load the list we could use -XX:PrintClassHIstogram with a kill -3 on the server, or JVMTIInterface from JBossProfiler could also give you such list (by using a couple of methods for that).

      This is an example of how to list loaded classes using JVMTIInterface from JBossProfiler:

      jvmtiInterface.forceReleaseOfGC();
      Class[] classes = jvmtiInterface.getLoadedClasses();

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            csuconic@redhat.com Clebert Suconic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: