Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1368088.1368110acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Precise memory leak detection for java software using container profiling

Published: 10 May 2008 Publication History

Abstract

A memory leak in a Java program occurs when object references that are no longer needed are unnecessarily maintained. Such leaks are difficult to understand because static analyses typically cannot precisely identify these redundant references, and existing dynamic analyses for leak detection track and report fine-grained information about individual objects, producing results that are usually hard to interpret and lack precision.
We introduce a novel container-based heap-tracking technique, based on the observation that many memory leaks in Java programs occur due to containers that keep references to unused data entries. The novelty of the described work is two-fold: (1) instead of tracking arbitrary objects and finding leaks by analyzing references to unused objects, the technique tracks only containers and directly identifies the source of the leak, and (2) the approach computes a confidence value for each container based on a combination of its memory consumption and its elements' staleness (time since last retrieval), while previous approaches do not consider such combined metrics. Our experimental results show that the reports generated by the proposed technique can be very precise: for two bugs reported by Sun and for a known bug in SPECjbb, the top containers in the reports include the containers that leak memory.

References

[1]
M. D. Bond and K. S. McKinley. Bell: Bit-encoding online memory leak detection. In ASPLOS, pages 61--72, 2006.
[2]
S. Cherem, L. Princehouse, and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In PLDI, pages 480--491, 2007.
[3]
W. DePauw, D. Lorenz, J. Vlissides, and M. Wegman. Execution patterns in object-oriented visualization. In USENIX COOTS, pages 219--234, 1998.
[4]
W. DePauw and G. Sevitsky. Visualizing reference patterns for solving memory leaks in Java. Concurrency: Practice and Experience, 12(14):1431--1454, 2000.
[5]
N. Dor, M. Rodeh, and S. Sagiv. Checking cleanness in linked lists. In SAS, pages 115--134, 2000.
[6]
B. Hackett and R. Rugina. Region-based shape analysis with tracked locations. In POPL, pages 310--323, 2005.
[7]
R. Hastings and B. Joyce. Purify: A tool for detecting memory leaks and access errors in C and C++ programs. In Winter 1992 USENIX Conference, pages 125--138, 1992.
[8]
M. Hauswirth and T. M. Chilimbi. Low-overhead memory leak detection using adaptive statistical profiling. In ASPLOS, pages 156--164, 2004.
[9]
D. L. Heine and M. S. Lam. A practical flow-sensitive and context-sensitive C and C++ memory leak detector. In PLDI, pages 168--181, 2003.
[10]
D. L. Heine and M. S. Lam. Static detection of leaks in polymorphic containers. In ICSE, pages 252--261, 2006.
[11]
Jikes Research Virtual Machine. jikesrvm.org.
[12]
JProbe. www.quest.com/jprobe.
[13]
JProfiler. www.ej-technologies.com.
[14]
M. Jump and K. S. McKinley. Cork: Dynamic memory leak detection for garbage-collected languages. In POPL, pages 31--38, 2007.
[15]
LeakHunter. www.wilytech.com/solutions/products.
[16]
N. Mitchell. The runtime structure of object ownership. In ECOOP, pages 74--98, 2006.
[17]
N. Mitchell and G. Sevitsky. Leakbot: An automated and lightweight tool for diagnosing memory leaks in large Java applications. In ECOOP, pages 351--377, 2003.
[18]
E. Nicholas. weblogs.java.net/blog/enicholas/archive/2006/04/leaking_evil.html.
[19]
M. Orlovich and R. Rugina. Memory leak analysis by contradiction. In SAS, pages 405--424, 2006.
[20]
F. Qin, S. Lu, and Y. Zhou. Safemem: Exploiting ECC-memory for detecting memory leaks and memory corruption during production runs. In HPCA, pages 291--302, 2005.
[21]
R. Shaham, E. K. Kolodner, and M. Sagiv. Automatic removal of array memory leaks in Java. In CC, pages 50--66, 2000.
[22]
SPECjbb2000 Documentation. www.spec.org.
[23]
Sun Bug Database. bugs.sun.com/bugdatabase.
[24]
R. Vallee-Rai, E. Gagnon, L. Hendren, P. Lam, P. Pominville, and V. Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In CC, pages 18--34, 2000.
[25]
Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In FSE, pages 115--125, 2005.

Cited By

View all
  • (2024)A Platform-Agnostic Framework for Automatically Identifying Performance Issue Reports With Heuristic Linguistic PatternsIEEE Transactions on Software Engineering10.1109/TSE.2024.339062350:7(1704-1725)Online publication date: 1-Jul-2024
  • (2024)Asking and Answering Questions During Memory ProfilingIEEE Transactions on Software Engineering10.1109/TSE.2024.337712750:5(1096-1117)Online publication date: 13-Mar-2024
  • (2024)Understanding and Detecting Inefficient Image Displaying Issues in Android AppsJournal of Computer Science and Technology10.1007/s11390-022-1670-339:2(434-459)Online publication date: 1-Mar-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '08: Proceedings of the 30th international conference on Software engineering
May 2008
558 pages
ISBN:9781605580791
DOI:10.1145/1368088
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 ACM 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: 10 May 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. container profiling
  2. leaking confidence
  3. memory leaks

Qualifiers

  • Research-article

Conference

ICSE '08
Sponsor:

Acceptance Rates

ICSE '08 Paper Acceptance Rate 56 of 370 submissions, 15%;
Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)0
Reflects downloads up to 26 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)A Platform-Agnostic Framework for Automatically Identifying Performance Issue Reports With Heuristic Linguistic PatternsIEEE Transactions on Software Engineering10.1109/TSE.2024.339062350:7(1704-1725)Online publication date: 1-Jul-2024
  • (2024)Asking and Answering Questions During Memory ProfilingIEEE Transactions on Software Engineering10.1109/TSE.2024.337712750:5(1096-1117)Online publication date: 13-Mar-2024
  • (2024)Understanding and Detecting Inefficient Image Displaying Issues in Android AppsJournal of Computer Science and Technology10.1007/s11390-022-1670-339:2(434-459)Online publication date: 1-Mar-2024
  • (2023)A Large-Scale Empirical Study of Real-Life Performance Issues in Open Source ProjectsIEEE Transactions on Software Engineering10.1109/TSE.2022.316762849:2(924-946)Online publication date: 1-Feb-2023
  • (2023)Towards an understanding of memory leak patterns: an empirical study in PythonSoftware Quality Journal10.1007/s11219-023-09641-531:4(1303-1330)Online publication date: 17-Jun-2023
  • (2022)A Survey of Performance Optimization for Mobile ApplicationsIEEE Transactions on Software Engineering10.1109/TSE.2021.307119348:8(2879-2904)Online publication date: 1-Aug-2022
  • (2022)Taxonomy of Aging-related Bugs in Deep Learning Libraries2022 IEEE 33rd International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE55969.2022.00048(423-434)Online publication date: Oct-2022
  • (2020)Evaluating an Interactive Memory Analysis Tool: Findings from a Cognitive Walkthrough and a User StudyProceedings of the ACM on Human-Computer Interaction10.1145/33949774:EICS(1-37)Online publication date: 18-Jun-2020
  • (2020)Butterfly Space: An Architectural Approach for Investigating Performance Issues2020 IEEE International Conference on Software Architecture (ICSA)10.1109/ICSA47634.2020.00027(202-213)Online publication date: Mar-2020
  • (2020)Do Memories Haunt You? An Automated Black Box Testing Approach for Detecting Memory Leaks in Android AppsIEEE Access10.1109/ACCESS.2020.29665228(12217-12231)Online publication date: 2020
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media