ABSTRACT
Memory leaks are a major threat in modern software systems. They occur if objects are unintentionally kept alive longer than necessary and are often indicated by continuously growing data structures.
While there are various state-of-the-art memory monitoring tools, most of them share two critical shortcomings: (1) They have no knowledge about the monitored application's data structures and (2) they support no or only rudimentary analysis of the application's data structures over time.
This paper encompasses novel techniques to tackle both of these drawbacks. It presents a domain-specific language (DSL) that allows users to describe arbitrary data structures, as well as an algorithm to detect instances of these data structures in reconstructed heaps. In addition, we propose techniques and metrics to analyze and measure the evolution of data structure instances over time. This allows us to identify those instances that are most likely involved in a memory leak. These concepts have been integrated into AntTracks, a trace-based memory monitoring tool. We present our approach to detect memory leaks in several real-world applications, showing its applicability and feasibility.
- Verena Bitto, Philipp Lengauer, and Hanspeter Mössenböck. 2015. Efficient Rebuilding of Large Java Heaps from Event Traces. In Proc. of the Principles and Practices of Programming on The Java Platform (PPPJ '15). Google ScholarDigital Library
- Michael D. Bond and Kathryn S. McKinley. 2006. Bell: Bit-encoding Online Memory Leak Detection. In Proc. of the 12th Int'l Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS XII). Google ScholarDigital Library
- Gilad Bracha, Martin Odersky, David Stoutamire, and Philip Wadler. 1998. Making the Future Safe for the Past: Adding Genericity to the Java Programming Language. In Proc. of the 13th ACM SIGPLAN Conf. on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '98). Google ScholarDigital Library
- Robert Cartwright and Guy L. Steele, Jr. 1998. Compatible Genericity with Run-time Types for the Java Programming Language. In Proc. of the 13th ACM SIGPLAN Conf. on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '98). Google ScholarDigital Library
- K. Chen and J. Chen. 2007. Aspect-Based Instrumentation for Locating Memory Leaks in Java Programs. In Proc. of the 31st Annual Int'l Computer Software and Applications Conf. (COMPSAC '07). Google ScholarDigital Library
- Wim De Pauw and Gary Sevitsky. 1999. Visualizing Reference Patterns for Solving Memory Leaks in Java. In Proc. of the European Conference on Object-Oriented Programming (ECOOP '99). Google ScholarDigital Library
- Dino Distefano and Ivana Filipović. 2010. Memory Leaks Detection in Java by Bi-abductive Inference. In Proc. of the Int'l Conf. on Fundamental Approaches to Software Engineering (FASE 2010). Google ScholarDigital Library
- Bruno Dufour, Barbara G. Ryder, and Gary Sevitsky. 2007. Blended Analysis for Performance Understanding of Framework-based Applications. In Proc. of the 2007 Int'l Symposium on Software Testing and Analysis (ISSTA '07). Google ScholarDigital Library
- Dynatrace. 2019. Demo Applications: easyTravel. https://community.dynatrace.com/community/display/DL/Demo Applications+ easyTravel.Google Scholar
- Mohammadreza Ghanavati, Diego Costa, Artur Andrzejak, and Janos Seboek. 2018. Memory and Resource Leak Defects in Java Projects: An Empirical Study. In Proc. of the 40th Int'l Conf. on Software Engineering: Companion Proceeedings (ICSE '18). Google ScholarDigital Library
- Matthias Hauswirth and Trishul M. Chilimbi. 2004. Low-overhead Memory Leak Detection Using Adaptive Statistical Profiling. In Proc. of the 11th Int'l Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS XI). Google ScholarDigital Library
- Maria Jump and Kathryn S. McKinley. 2007. Cork: Dynamic Memory Leak Detection for Garbage-collected Languages. In Proc. of the 34th Annual ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages (POPL '07). Google ScholarDigital Library
- Maria Jump and Kathryn S. McKinley. 2009a. Detecting Memory Leaks in Managed Languages with Cork. Software: Practice and Experience, Vol. 40, 1 (2009). Google ScholarDigital Library
- Maria Jump and Kathryn S. McKinley. 2009b. Dynamic Shape Analysis via Degree Metrics. In Proc. of the Int'l Symposium on Memory Management (ISMM '09). Google ScholarDigital Library
- Evan K. Maxwell, Godmar Back, and Naren Ramakrishnan. 2010. Diagnosing Memory Leaks using Graph Mining on Heap Dumps. In Proc. of the ACM SIGKDD Int'l Conf. on Knowledge Discovery and Data Mining (KDD '10). Google ScholarDigital Library
- Philipp Lengauer, Verena Bitto, Stefan Fitzek, Markus Weninger, and Hanspeter Mössenböck. 2016. Efficient Memory Traces with Full Pointer Information. In Proc. of the 13th Int'l. Conf. on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools (PPPJ '16). Google ScholarDigital Library
- Philipp Lengauer, Verena Bitto, and Hanspeter Mössenböck. 2015. Accurate and Efficient Object Tracing for Java Applications. In Proc. of the 6th ACM/SPEC Int'l. Conf. on Performance Engineering (ICPE '15). Google ScholarDigital Library
- Nick Mitchell. 2006. The Runtime Structure of Object Ownership. In Proc. of the 20th European Conf. on Object-Oriented Programming (ECOOP '06). Google ScholarDigital Library
- Nick Mitchell and Gary Sevitsky. 2003. LeakBot: An automated and lightweight tool for diagnosing memory leaks in large Java applications. In Proc. of the European Conference on Object-Oriented Programming (ECOOP '03).Google ScholarCross Ref
- Nick Mitchell and Gary Sevitsky. 2007. The Causes of Bloat, the Limits of Health. In Proc. of the 22nd Annual ACM SIGPLAN Conf. on Object-oriented Programming Systems and Applications (OOPSLA '07). Google ScholarDigital Library
- Hanspeter Mössenböck, Markus Löberbauer, and Albrecht Wöß. 2019. The Compiler Generator Coco/R. http://www.ssw.uni-linz.ac.at/Coco/Google Scholar
- Wim De Pauw and Gary Sevitsky. 2000. Visualizing Reference Patterns for Solving Memory Leaks in Java. Concurrency: Practice and Experience, Vol. 12, 14 (2000).Google ScholarCross Ref
- Derek Rayside and Lucy Mendel. 2007. Object Ownership Profiling: A Technique for Finding and Fixing Memory Leaks. In Proc. of the 22nd IEEE/ACM Int'l Conf. on Automated Software Engineering (ASE '07). Google ScholarDigital Library
- Derek Rayside, Lucy Mendel, and Daniel Jackson. 2006. A Dynamic Analysis for Revealing Object Ownership and Sharing. In Proc. of the Int'l Workshop on Dynamic Systems Analysis (WODA '06). Google ScholarDigital Library
- S. P. Reiss. 2009. Visualizing The Java Heap to Detect Memory Problems. In 5th IEEE Int'l Workshop on Visualizing Software for Understanding and Analysis (VISSOFT '09).Google Scholar
- Ran Shaham, Elliot K. Kolodner, and Shmuel Sagiv. 2000. Automatic Removal of Array Memory Leaks in Java. In Proc. of the 9th Int'l Conference on Compiler Construction (CC '00). Google ScholarDigital Library
- Connie U. Smith and Lloyd G. Williams. 2000. Software Performance Antipatterns. In Proc. of the 2nd Int'l Workshop on Software and Performance (WOSP '00).Google Scholar
- Connie U. Smith and Lloyd G. Williams. 2002. New Software Performance Antipatterns: More Ways to Shoot Yourself in the Foot. In Intl. CMG Conf.Google Scholar
- Connie U. Smith and Lloyd G. Williams. 2003. More New Software Performance Antipatterns: Even More Ways to Shoot Yourself in the Foot. In Intl. CMG Conf.Google Scholar
- V. Sor, P. Oü, T. Treier, and S. N. Srirama. 2013. Improving Statistical Approach for Memory Leak Detection Using Machine Learning. In Proc. of the 2013 IEEE Int'l Conf. on Software Maintenance (ICSM '13). Google ScholarDigital Library
- Vladimir vS or, Nikita Salnikov-Tarnovski, and Satish Narayana Srirama. 2011. Automated Statistical Approach for Memory Leak Detection: Case Studies. In On the Move to Meaningful Internet Systems (OTM 2011). Google ScholarDigital Library
- textEclipse Foundation. 2019. Eclipse Memory Analyzer (MAT). https://www.eclipse.org/mat/Google Scholar
- textOracle. 2019 a. The HotSpot Group. http://openjdk.java.net/groups/hotspot/Google Scholar
- textOracle. 2019 b. VisualVM: All-in-One Java Troubleshooting Tool. https://visualvm.github.io/Google Scholar
- Peter Wegner and Edwin D. Reilly. 2003. Data Structures. In Encyclopedia of Computer Science .Google Scholar
- Markus Weninger, Elias Gander, and Hanspeter Mössenböck. 2018a. Analyzing the Evolution of Data Structures Over Time in Trace-Based Offline Memory Monitoring. In Proc. of the 9th Symposium on Software Performance (SSP '18).Google Scholar
- Markus Weninger, Elias Gander, and Hanspeter Mössenböck. 2018b. Utilizing Object Reference Graphs and Garbage Collection Roots to Detect Memory Leaks in Offline Memory Monitoring. In Proc. of the 15th Int'l Conf. on Managed Languages & Runtimes (ManLang '18). Google ScholarDigital Library
- Markus Weninger, Philipp Lengauer, and Hanspeter Mössenböck. 2017. User-centered Offline Analysis of Memory Monitoring Data. In Proc. of the 8th ACM/SPEC on Int'l Conf. on Performance Engineering (ICPE '17). Google ScholarDigital Library
- Markus Weninger and Hanspeter Mössenböck. 2018. User-defined Classification and Multi-level Grouping of Objects in Memory Monitoring. In Proc. of the 9th ACM/SPEC Int'l Conf. on Performance Engineering (ICPE '18). Google ScholarDigital Library
- Guoqing Xu, Michael D. Bond, Feng Qin, and Atanas Rountev. 2011. LeakChaser: Helping Programmers Narrow Down Causes of Memory Leaks. In Proc. of the 32Nd ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI '11). Google ScholarDigital Library
- Guoqing Xu and Atanas Rountev. 2008. Precise Memory Leak Detection for Java Software Using Container Profiling. In Proc. of the 30th Int'l Conf. on Software Engineering (ICSE '08). Google ScholarDigital Library
- Dacong Yan, Guoqing Xu, Shengqian Yang, and Atanas Rountev. 2014. LeakChecker: Practical Static Memory Leak Detection for Managed Languages. In Proc. of the Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO '14). Google ScholarDigital Library
- Vladimir ?or and Satish Narayana Srirama. 2014. Memory Leak Detection in Java: Taxonomy and Classification of Approaches. Journal of Systems and Software, Vol. 96 (2014).Google Scholar
Index Terms
- Analyzing Data Structure Growth Over Time to Facilitate Memory Leak Detection
Recommendations
Automated memory leak detection for production use
ICSE 2014: Proceedings of the 36th International Conference on Software EngineeringThis paper presents Sniper, an automated memory leak detection tool for C/C++ production software. To track the staleness of allocated memory (which is a clue to potential leaks) with little overhead (mostly <3%), Sniper leverages instruction sampling ...
Utilizing object reference graphs and garbage collection roots to detect memory leaks in offline memory monitoring
ManLang '18: Proceedings of the 15th International Conference on Managed Languages & RuntimesComplex software systems often suffer from performance problems caused by memory anomalies such as memory leaks. While the proliferation of objects is rather easy to detect using state-of-the-art memory monitoring tools, extracting a leak's root cause, ...
Memory Leak Detection in Sun Solaris OS
ISCSCT '08: Proceedings of the 2008 International Symposium on Computer Science and Computational Technology - Volume 02Memory leak has been exposed to be one of the most serious bugs which are hard to locate and fix in computer program. This paper describes three methods of detecting memory leaks in Solaris when programmers do applications. Using dbx can get specific ...
Comments