Recent Changes - Search:

edit SideBar


Cape Code Host Memory Leaks

It looks like we are leaking memory in Cape Code where we are retaining classes when we open models.

To replicate this:

  1. Start up reloadAllAccessors
    cd $PTII
    $PTII/bin/reloadAllAccessors &
  2. Start up
  3. Find the Java process running ptolemy.vergil.basic.imprt.accessor.ReloadAccessors
  4. See Memory Leaks (ptexternal wiki) for how to use jvisualvm, especially Dealing with memory leaks in Kepler
  5. In the monitor tab, note that the amount of memory increases and that GC is taking lots of time:
  6. Press Heap Dump
  7. In the Heap Dump, press the Class button then press on Class Name to sort by classes and look for the ptolemy.vergil.basic packages

  8. In the above, we are not leaking ActorGraphFrame or BasicGraphFrame, but we are leaking some actions
  9. Click on ptolemy.vergil.basic.BasicGraphController$OpenBaseClassAction
  10. In the References section, right click and select Show Nearest GC Root:
  11. In the above WebCamDiscoveryService is highlighted.

At this point, I ran out of time. See Dealing with memory leaks in Kepler for how we could deal with these.

Edit - History - Print - Recent Changes - Search
Page last modified on February 10, 2017, at 09:45 PM