Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      JDK 1.5

      Description

      I've got the following memory allocation information from hprof:

      percent live alloc'ed stack class
      rank self accum bytes objs bytes objs trace name
      1 45.62% 45.62% 33554448 1 67107056 15 330165 byte[]
      2 40.70% 86.33% 29936640 1 29936640 1 330166 byte[]

      TRACE 330165:
      java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
      org.apache.cactus.integration.ant.deployment.DefaultJarArchive.<init>(DefaultJarArchive.java:79)
      org.apache.cactus.integration.ant.deployment.DefaultJarArchive.<init>(DefaultJarArchive.java:59)
      org.apache.cactus.integration.ant.deployment.webapp.DefaultWarArchive.<init>(DefaultWarArchive.java:60)
      org.apache.cactus.integration.ant.deployment.WarParser.parse(WarParser.java:55)
      org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:135)
      org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      org.apache.tools.ant.Task.perform(Task.java:364)
      org.apache.tools.ant.Target.execute(Target.java:341)
      org.apache.tools.ant.Target.performTasks(Target.java:369)
      org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      org.apache.tools.ant.Main.runBuild(Main.java:668)
      org.apache.tools.ant.Main.startAnt(Main.java:187)
      org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      TRACE 330166:
      java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:136)
      org.apache.cactus.integration.ant.deployment.DefaultJarArchive.<init>(DefaultJarArchive.java:81)
      org.apache.cactus.integration.ant.deployment.DefaultJarArchive.<init>(DefaultJarArchive.java:59)
      org.apache.cactus.integration.ant.deployment.webapp.DefaultWarArchive.<init>(DefaultWarArchive.java:60)
      org.apache.cactus.integration.ant.deployment.WarParser.parse(WarParser.java:55)
      org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:135)
      org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      org.apache.tools.ant.Task.perform(Task.java:364)
      org.apache.tools.ant.Target.execute(Target.java:341)
      org.apache.tools.ant.Target.performTasks(Target.java:369)
      org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      org.apache.tools.ant.Main.runBuild(Main.java:668)
      org.apache.tools.ant.Main.startAnt(Main.java:187)
      org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

      My question is: why does Cactus keep the WAR file resident in memory even after it has already been deployed by the container? This is a huge waste of memory.

      Secondly, I am trying to track down a memory leak in my Cactus tests – I am not 100% sure who is responsible yet. Unfortunately, my code relies on JDK 1.5. Any tips on how to memory profile Cactus tests?

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Gili
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development