skip to main content
10.1145/3297663.3310297acmconferencesArticle/Chapter ViewAbstractPublication PagesicpeConference Proceedingsconference-collections
research-article

Analyzing Data Structure Growth Over Time to Facilitate Memory Leak Detection

Published: 04 April 2019 Publication History

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.

References

[1]
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).
[2]
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).
[3]
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).
[4]
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).
[5]
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).
[6]
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).
[7]
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).
[8]
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).
[9]
Dynatrace. 2019. Demo Applications: easyTravel. https://community.dynatrace.com/community/display/DL/Demo Applications+ easyTravel.
[10]
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).
[11]
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).
[12]
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).
[13]
Maria Jump and Kathryn S. McKinley. 2009a. Detecting Memory Leaks in Managed Languages with Cork. Software: Practice and Experience, Vol. 40, 1 (2009).
[14]
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).
[15]
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).
[16]
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).
[17]
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).
[18]
Nick Mitchell. 2006. The Runtime Structure of Object Ownership. In Proc. of the 20th European Conf. on Object-Oriented Programming (ECOOP '06).
[19]
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).
[20]
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).
[21]
Hanspeter Mössenböck, Markus Löberbauer, and Albrecht Wöß. 2019. The Compiler Generator Coco/R. http://www.ssw.uni-linz.ac.at/Coco/
[22]
Wim De Pauw and Gary Sevitsky. 2000. Visualizing Reference Patterns for Solving Memory Leaks in Java. Concurrency: Practice and Experience, Vol. 12, 14 (2000).
[23]
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).
[24]
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).
[25]
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).
[26]
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).
[27]
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).
[28]
Connie U. Smith and Lloyd G. Williams. 2002. New Software Performance Antipatterns: More Ways to Shoot Yourself in the Foot. In Intl. CMG Conf.
[29]
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.
[30]
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).
[31]
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).
[32]
textEclipse Foundation. 2019. Eclipse Memory Analyzer (MAT). https://www.eclipse.org/mat/
[33]
textOracle. 2019 a. The HotSpot Group. http://openjdk.java.net/groups/hotspot/
[34]
textOracle. 2019 b. VisualVM: All-in-One Java Troubleshooting Tool. https://visualvm.github.io/
[35]
Peter Wegner and Edwin D. Reilly. 2003. Data Structures. In Encyclopedia of Computer Science .
[36]
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).
[37]
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).
[38]
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).
[39]
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).
[40]
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).
[41]
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).
[42]
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).
[43]
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).

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPE '19: Proceedings of the 2019 ACM/SPEC International Conference on Performance Engineering
April 2019
348 pages
ISBN:9781450362399
DOI:10.1145/3297663
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 April 2019

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. analysis over time
  2. data structures
  3. domain specific language
  4. growth analysis
  5. memory leak detection
  6. memory monitoring

Qualifiers

  • Research-article

Funding Sources

  • Christian Doppler Forschungsgesellschaft

Conference

ICPE '19

Acceptance Rates

ICPE '19 Paper Acceptance Rate 13 of 71 submissions, 18%;
Overall Acceptance Rate 252 of 851 submissions, 30%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)19
  • Downloads (Last 6 weeks)2
Reflects downloads up to 30 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media