Incinerator -- Eliminating Stale References in Dynamic OSGi Applications

Java class loaders are commonly used in application servers to load, unload and update a set of classes as a unit. However, unloading or updating a class loader can introduce stale references to the objects of the outdated class loader. A stale reference leads to a memory leak and, for an update, to an inconsistency between the outdated classes and their replacements. To detect and eliminate stale references, we propose Incinerator, a Java virtual machine extension that introduces the notion of an outdated class loader. Incinerator detects stale references and sets them to null during a garbage collection cycle. We evaluate Incinerator in the context of the OSGi framework and show that Incinerator correctly detects and eliminates stale references, including a bug in Knopflerfish. We also evaluate the performance of Incinerator with the DaCapo benchmark on VMKit and show that Incinerator has an overhead of at most 3.3%.

[1]  Nick Mitchell,et al.  LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java Applications , 2003, ECOOP.

[2]  Grzegorz Czajkowski,et al.  Multitasking without compromise: a virtual machine evolution , 2001, SIGP.

[3]  Mauricio J. Serrano,et al.  Thin locks: featherweight Synchronization for Java , 2004, SIGP.

[4]  Matthias Hauswirth,et al.  Producing wrong data without doing anything obviously wrong! , 2009, ASPLOS.

[5]  Seong-Won Lee,et al.  Cloud platforms and embedded computing - The operating systems of the future , 2013, 2013 50th ACM/EDAC/IEEE Design Automation Conference (DAC).

[6]  James R. Larus,et al.  Sealing OS processes to improve dependability and safety , 2007, EuroSys '07.

[7]  Martin C. Rinard,et al.  Detecting and eliminating memory leaks using cyclic memory allocation , 2007, ISMM '07.

[8]  RFP 126-OSGi ME : An OSGi Profile for Embedded Devices , 2009 .

[9]  James R. Larus,et al.  Language support for fast and reliable message-based communication in singularity OS , 2006, EuroSys.

[10]  Yuval Elovici,et al.  Google Android: A Comprehensive Security Assessment , 2010, IEEE Security & Privacy.

[11]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[12]  Richard E. Jones,et al.  The Garbage Collection Handbook: The art of automatic memory management , 2011, Chapman and Hall / CRC Applied Algorithms and Data Structures Series.

[13]  Thorsten von Eicken,et al.  JRes: a resource accounting interface for Java , 1998, OOPSLA '98.

[14]  Perry Cheng,et al.  Oil and water? High performance garbage collection in Java with MMTk , 2004, Proceedings. 26th International Conference on Software Engineering.

[15]  Kiev Gama,et al.  Service Coroner: A Diagnostic Tool for Locating OSGi Stale References , 2008, 2008 34th Euromicro Conference Software Engineering and Advanced Applications.

[16]  Julia L. Lawall,et al.  VMKit: a substrate for managed runtime environments , 2010, VEE '10.

[17]  Jan Vitek,et al.  Incommunicado: efficient communication for isolates , 2002, OOPSLA '02.

[18]  Wilson C. Hsieh,et al.  Processes in KaffeOS: isolation, resource management, and sharing in java , 2000, OSDI.

[19]  Kathryn S. McKinley,et al.  Cork: dynamic memory leak detection for garbage-collected languages , 2007, POPL '07.

[20]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[21]  Michael D. Bond,et al.  Tolerating memory leaks , 2008, OOPSLA.

[22]  Kathryn S. McKinley,et al.  Dynamic software updates: a VM-centric approach , 2009, PLDI '09.

[23]  Stéphane Frénot,et al.  I-JVM: a Java Virtual Machine for component isolation in OSGi , 2009, 2009 IEEE/IFIP International Conference on Dependable Systems & Networks.

[24]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[25]  Guy L. Steele,et al.  Java(TM) Language Specification , 2005 .