ABSTRACT
Type safety and garbage collection in managed languages eliminate memory errors such as dangling pointers, double frees, and leaks of unreachable objects. Unfortunately, a program still leaks memory if it maintains references to objects it will never use again. Leaked objects decrease program locality and increase garbage collection frequency and workload. A growing leak will eventually exhaust memory and crash the program.
This paper introduces a leak tolerance approach called Melt that safely eliminates performance degradations and crashes due to leaks of dead but reachable objects in managed languages, given sufficient disk space to hold leaking objects. Melt (1) identifies stale objects that the program is not accessing; (2) segregates in-use and stale objects by storing stale objects to disk; and (3) preserves safety by activating stale objects if the program subsequently accesses them. We design and build a prototype implementation of Melt in a Java VM and show it adds overhead low enough for production systems. Whereas existing VMs grind to a halt and then crash on programs with leaks, Melt keeps many of these programs running much longer without significantly degrading performance. Melt provides users the illusion of a fixed leak and gives developers more time to fix leaky programs.
- B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño Virtual Machine. IBM Systems Journal, 39(1):211--238, 2000. Google Scholar
Digital Library
- M. Arnold, S. J. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive Optimization in the Jalapeño JVM. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 47--65, 2000. Google Scholar
Digital Library
- M. P. Atkinson, L. Daynès, M. J. Jordan, T. Printezis, and S. Spence. An Orthogonally Persistent Java. SIGMOD Rec., 25(4):68--75, 1996. Google Scholar
Digital Library
- D. Bacon, P. Cheng, and V. Rajan. A Real-Time Garbage Collector with Low Overhead and Consistent Utilization. In ACM Symposium on Principles of Programming Languages, pages 285--298, 2003. Google Scholar
Digital Library
- E. D. Berger and B. G. Zorn. DieHard: Probabilistic Memory Safety for Unsafe Languages. In ACM Conference on Programming Language Design and Implementation, pages 158--168, 2006. Google Scholar
Digital Library
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and Water? High Performance Garbage Collection in Java with MMTk. In ACM International Conference on Software Engineering, pages 137--146, 2004. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer,M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovićc, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 169--190, 2006. Google Scholar
Digital Library
- S. M. Blackburn and A. L. Hosking. Barriers: Friend or Foe? In ACM International Symposium on Memory Management, pages 143--151, 2004. Google Scholar
Digital Library
- M. D. Bond and K. S. McKinley. Bell: Bit-Encoding Online Memory Leak Detection. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 61--72, 2006. Google Scholar
Digital Library
- M. D. Bond and K. S. McKinley. Tolerating Memory Leaks. Technical Report TR-07-64, University of Texas at Austin, December 2007.Google Scholar
- D. Breitgand, M. Goldstein, E. Henis, O. Shehory, and Y. Weinsberg. PANACEA-Towards a Self-Healing Development Framework. In Integrated Network Management, pages 169--178, 2007.Google Scholar
Cross Ref
- G. Chen, M. Kandemir, N. Vijaykrishnan, M. J. Irwin, B. Mathiske, and M. Wolczko. Heap Compression for Memory-Constrained Java Environments. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 282--301, 2003. Google Scholar
Digital Library
- W. Chen, S. Bhansali, T. Chilimbi, X. Gao, and W. Chuang. Profile-guided Proactive Garbage Collection for Locality Optimization. In ACM Conference on Programming Language Design and Implementation, pages 332--340, 2006. Google Scholar
Digital Library
- S. Cherem, L. Princehouse, and R. Rugina. Practical Memory Leak Detection using Guarded Value-Flow Analysis. In ACM Conference on Programming Language Design and Implementation, pages 480--491, 2007. Google Scholar
Digital Library
- T. M. Chilimbi and M. Hauswirth. Low-Overhead Memory Leak Detection Using Adaptive Statistical Profiling. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 156--164, 2004. Google Scholar
Digital Library
- DaCapo Benchmark Regression Tests. http://jikesrvm.anu.-edu.au/?dacapo/.Google Scholar
- E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. On-the-Fly Garbage Collection: An Exercise in Cooperation. Commun. ACM, 21(11):966--975, Nov. 1978. Google Scholar
Digital Library
- Eclipse.org Home. http://www.eclipse.org/.Google Scholar
- B. Goetz. Plugging memory leaks with weak references, 2005. http://www-128.ibm.com/developerworks/java/-library/j-jtp11225/.Google Scholar
- B. Goetz. Plugging memory leaks with soft references, 2006. http://www-128.ibm.com/developerworks/java/-library/j-jtp01246.html.Google Scholar
- M. Goldstein, O. Shehory, and Y. Weinsberg. Can Self-Healing Software Cope With Loitering? In International Workshop on Software Quality Assurance, pages 1--8, 2007. Google Scholar
Digital Library
- L. J. Guibas, D. E. Knuth, and M. Sharir. Randomized Incremental Construction of Delaunay and Voronoi Diagrams. In Colloquium on Automata, Languages and Programming, pages 414--431, 1990. Google Scholar
Digital Library
- S. C. Gupta and R. Palanki. Java memory leaks -- Catch me if you can, 2005. http://www.ibm.com/developerworks/-rational/library/05/0816 GuptaPalanki/index.html.Google Scholar
- R. Hastings and B. Joyce. Purify: Fast Detection of Memory Leaks and Access Errors. In Winter USENIX Conference, pages 125--136, 1992.Google Scholar
- D. L. Heine and M. S. Lam. A Practical Flow-Sensitive and Context-Sensitive C and C++ Memory Leak Detector. In ACM Conference on Programming Language Design and Implementation, pages 168--181, 2003. Google Scholar
Digital Library
- M. Hertz, Y. Feng, and E. D. Berger. Garbage Collection without Paging. In ACM Conference on Programming Language Design and Implementation, pages 143--153, 2005. Google Scholar
Digital Library
- M. Hirzel, A. Diwan, and J. Henkel. On the Usefulness of Type and Liveness Accuracy for Garbage Collection and Leak Detection. ACM Transactions on Programming Languages and Systems, 24(6):593--624, 2002. Google Scholar
Digital Library
- A. L. Hosking and J. Chen. PM3: An Orthogonal Persistent Systems Programming Language -- Design, Implementation, Performance. In International Conference on Very Large Data Bases, pages 587--598, 1999. Google Scholar
Digital Library
- A. L. Hosking and J. E. B. Moss. Object Fault Handling for Persistent Programming Languages: A Performance Evaluation. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 288--303, 1993. Google Scholar
Digital Library
- A. L. Hosking, N. Nystrom, Q. I. Cutts, and K. Brahnmath. Optimizing the Read and Write Barriers for Orthogonal Persistence. In International Workshop on Persistent Object Systems, pages 149--159, 1999. Google Scholar
Digital Library
- X. Huang, S. M. Blackburn, K. S. McKinley, J. E. B. Moss, Z. Wang, and P. Cheng. The Garbage Collection Advantage: Improving Program Locality. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 69--80, 2004. Google Scholar
Digital Library
- Jikes RVM. http://www.jikesrvm.org.Google Scholar
- Jikes RVM Research Archive. http://www.jikesrvm.org/-Research+Archive.Google Scholar
- M. Jump and K. S. McKinley. Cork: Dynamic Memory Leak Detection for Garbage-Collected Languages. In ACM Symposium on Principles of Programming Languages, pages 31--38, 2007. Google Scholar
Digital Library
- J.Maebe, M. Ronsse, and K. D. Bosschere. Precise Detection of Memory Leaks. In International Workshop on Dynamic Analysis, pages 25--31, 2004.Google Scholar
- A. Marquez, S. M. Blackburn, G. Mercer, and J. Zigman. Implementing Orthogonally Persistent Java. In International Workshop on Persistent Object Systems, pages 247--261, 2000. Google Scholar
Digital Library
- Mckoi SQL Database message board: memory/thread leak with Mckoi 0.93 in embedded mode, 2002. http://www.-mckoi.com/database/mail/subject.jsp?id=2172.Google Scholar
- N. Mitchell and G. Sevitsky. LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java Applications. In European Conference on Object-Oriented Programming, pages 351--377, 2003.Google Scholar
- J. E. B. Moss. Working with Persistent Objects: To Swizzle or Not to Swizzle. IEEE Transactions on Computers, 18(8):657--673, 1992. Google Scholar
Digital Library
- N. Nethercote and J. Seward. Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation. In ACM Conference on Programming Language Design and Implementation, pages 89--100, 2007. Google Scholar
Digital Library
- H. H. Nguyen and M. Rinard. Detecting and Eliminating Memory Leaks Using Cyclic Memory Allocation. In ACM International Symposium on Memory Management, pages 15--29, 2007. Google Scholar
Digital Library
- G. Novark, E. D. Berger, and B. G. Zorn. Plug: Automatically Tolerating Memory Leaks in C and C++ Applications. Technical Report UM-CS-2008-009, University of Massachusetts, 2008.Google Scholar
- K. Ogata, T. Onodera, K. Kawachiya, H. Komatsu, and T. Nakatani. Replay Compilation: Improving Debuggability of a Just-in-Time Compiler. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 241--252, 2006. Google Scholar
Digital Library
- Oracle. JRockit Mission Control. http://www.oracle.com/-technology/products/jrockit/missioncontrol/.Google Scholar
- F. Pizlo, D. Frampton, E. Petrank, and B. Steensgaard. Stopless: A Real-Time Garbage Collector for Multiprocessors. In ACM International Symposium on Memory Management, pages 159--172, 2007. Google Scholar
Digital Library
- D. Plainfossé. Distributed Garbage Collection and Reference Management in the Soul Object Support System. PhD thesis, Université Paris-6, Pierre-et-Marie-Curie, 1994.Google Scholar
- F. Qin, S. Lu, and Y. Zhou. SafeMem: Exploiting ECCMemory for Detecting Memory Leaks and Memory Corruption During Production Runs. In International Symposium on High-Performance Computer Architecture, pages 291--302, 2005. Google Scholar
Digital Library
- F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Rx: Treating Bugs as Allergies-A Safe Method to Survive Software Failures. In ACM Symposium on Operating Systems Principles, pages 235--248, 2005. Google Scholar
Digital Library
- Quest. JProbe Memory Debugger. http://www.quest.com/-jprobe/debugger.asp.Google Scholar
- M. Rinard, C. Cadar, D. Dumitran, D. Roy, T. Leu, and W. Beebee. Enhancing Server Availability and Security through Failure-Oblivious Computing. In USENIX Symposium on Operating Systems Design and Implementation, pages 303--316, 2004. Google Scholar
Digital Library
- N. Sachindran, J. E. B. Moss, and E. D. Berger. MC2: High-Performance Garbage Collection for Memory-Constrained Environments. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 81--98, 2004. Google Scholar
Digital Library
- SciTech Software. .NET Memory Profiler. http://www.-scitech.se/memprofiler/.Google Scholar
- Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, 1999.Google Scholar
- Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01 edition, 2001.Google Scholar
- Sun Developer Network Forum. Java Programming {Archive} - garbage collection dilema (sic), 2003. http://forum.java.-sun.com/thread.jspa?threadID=446934.Google Scholar
- Sun Developer Network Forum. Reflections & Reference Objects - Java memory leak example, 2003. http://forum.-java.sun.com/thread.jspa?threadID=456545.Google Scholar
- Y. Tang, Q. Gao, and F. Qin. LeakSurvivor: Towards Safely Tolerating Memory Leaks for Garbage-Collected Languages. In USENIX Annual Technical Conference, pages 307--320, 2008. Google Scholar
Digital Library
- P. R. Wilson. Pointer Swizzling at Page Fault Time: Efficiently Supporting Huge Address Spaces on Standard Hardware. ACM SIGARCH Comput. Archit. News, 19(4):6--13, 1991. Google Scholar
Digital Library
- F. Xian,W. Srisa-an, and H. Jiang. MicroPhase: An Approach to Proactively Invoking Garbage Collection for Improved Performance. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 77--96, 2007. Google Scholar
Digital Library
- T. Yang, E. D. Berger, S. F. Kaplan, and J. E. B. Moss. CRAMM: Virtual Memory Support for Garbage-Collected Applications. In USENIX Symposium on Operating Systems Design and Implementation, pages 103--116, 2006. Google Scholar
Digital Library
- T. Yang, M. Hertz, E. D. Berger, S. F. Kaplan, and J. E. B. Moss. Automatic Heap Sizing: Taking Real Memory into Account. In ACM International Symposium on Memory Management, pages 61--72, 2004. Google Scholar
Digital Library
- J. N. Zigman, S. Blackburn, and J. E. B. Moss. TMOS: A Transactional Garbage Collector. In International Workshop on Persistent Object Systems, pages 138--156, 2001. Google Scholar
Digital Library
- B. Zorn. Barrier Methods for Garbage Collection. Technical Report CU-CS-494-90, University of Colorado at Boulder, 1990.Google Scholar
Index Terms
Tolerating memory leaks
Recommendations
Tolerating memory leaks
Type safety and garbage collection in managed languages eliminate memory errors such as dangling pointers, double frees, and leaks of unreachable objects. Unfortunately, a program still leaks memory if it maintains references to objects it will never ...
Leak pruning
ASPLOS XIV: Proceedings of the 14th international conference on Architectural support for programming languages and operating systemsManaged languages improve programmer productivity with type safety and garbage collection, which eliminate memory errors such as dangling pointers, double frees, and buffer overflows. However, because garbage collection uses reachability to over-...
Leak pruning
ASPLOS 2009Managed languages improve programmer productivity with type safety and garbage collection, which eliminate memory errors such as dangling pointers, double frees, and buffer overflows. However, because garbage collection uses reachability to over-...







Comments