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 2019Publication 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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Dynatrace. 2019. Demo Applications: easyTravel. https://community.dynatrace.com/community/display/DL/Demo Applications+ easyTravel.Google ScholarGoogle Scholar
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Maria Jump and Kathryn S. McKinley. 2009a. Detecting Memory Leaks in Managed Languages with Cork. Software: Practice and Experience, Vol. 40, 1 (2009). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Nick Mitchell. 2006. The Runtime Structure of Object Ownership. In Proc. of the 20th European Conf. on Object-Oriented Programming (ECOOP '06). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle ScholarCross RefCross Ref
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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/Google ScholarGoogle Scholar
  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).Google ScholarGoogle ScholarCross RefCross Ref
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle Scholar
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. textEclipse Foundation. 2019. Eclipse Memory Analyzer (MAT). https://www.eclipse.org/mat/Google ScholarGoogle Scholar
  33. textOracle. 2019 a. The HotSpot Group. http://openjdk.java.net/groups/hotspot/Google ScholarGoogle Scholar
  34. textOracle. 2019 b. VisualVM: All-in-One Java Troubleshooting Tool. https://visualvm.github.io/Google ScholarGoogle Scholar
  35. Peter Wegner and Edwin D. Reilly. 2003. Data Structures. In Encyclopedia of Computer Science .Google ScholarGoogle Scholar
  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).Google ScholarGoogle Scholar
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle Scholar

Index Terms

  1. Analyzing Data Structure Growth Over Time to Facilitate Memory Leak Detection

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • 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

                  Copyright © 2019 ACM

                  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].

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 4 April 2019

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  ICPE '19 Paper Acceptance Rate13of71submissions,18%Overall Acceptance Rate252of851submissions,30%

                  Upcoming Conference

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader