skip to main content
10.1145/1835804.1835822acmconferencesArticle/Chapter ViewAbstractPublication PageskddConference Proceedingsconference-collections
research-article

Diagnosing memory leaks using graph mining on heap dumps

Published: 25 July 2010 Publication History

Abstract

Memory leaks are caused by software programs that prevent the reclamation of memory that is no longer in use. They can cause significant slowdowns, exhaustion of available storage space and, eventually, application crashes. Detecting memory leaks is challenging because real-world applications are built on multiple layers of software frameworks, making it difficult for a developer to know whether observed references to objects are legitimate or the cause of a leak. We present a graph mining solution to this problem wherein we analyze heap dumps to automatically identify subgraphs which could represent potential memory leak sources. Although heap dumps are commonly analyzed in existing heap profiling tools, our work is the first to apply a graph grammar mining solution to this problem. Unlike classical graph mining work, we show that it suffices to mine the dominator tree of the heap dump, which is significantly smaller than the underlying graph. Our approach identifies not just leaking candidates and their structure, but also provides aggregate information about the access path to the leaks. We demonstrate several synthetic as well as real-world examples of heap dumps for which our approach provides more insight into the problem than state-of-the-art tools such as Eclipse's MAT.

Supplementary Material

JPG File (kdd2010_maxwell_dmlu_01.jpg)
MOV File (kdd2010_maxwell_dmlu_01.mov)

References

[1]
M. Akbar and R. Angryk. Frequent pattern-growth approach for document organization. In CIKM '08, pages 77--82, 2008.
[2]
A. Bailey and G. Back. LibX--a Firefox extension for enhanced library access. Library Hi Tech, 24(2):290--304, 2006.
[3]
M. Bond and K. McKinley. Bell: bit-encoding online memory leak detection. In ASPLOS-XII '06, pages 61--72, 2006.
[4]
M. Bond and K. McKinley. Tolerating memory leaks. In OOPSLA '08, pages 109--126, 2008.
[5]
H. Cheng, D. Lo, Y. Zhou, X. Wang, and X. Yan. Identifying bug signatures using discriminative graph mining. In ISSTA '09, pages 141--152, New York, NY, USA, 2009.
[6]
H. Cheng, X. Yan, J. Han, and P. Yu. Direct discriminative pattern mining for effective classification. In ICDE '07, pages 169--178, 2008.
[7]
C. Chent, X. Yan, F. Zhu, and J. Han. gApprox: Mining frequent approximate patterns from a massive network. In ICDM '07, pages 445--450, 2007.
[8]
S. Cherem, L. Princehouse, and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In PLDI '07, pages 480--491, 2007.
[9]
D. Cook and L. Holder. Substructure discovery using minimum description length and background knowledge. JAIR, 1:231--255, 1994.
[10]
J. Engelfriet and G. Rozenberg. Graph grammars based on node rewriting: an introduction to nlc graph grammars. In Graph grammars and their application to computer science: 4th Intl. Workshop, pages 12--23, 1991.
[11]
J. Han, J. Pei, and Y. Yin. Mining frequent patterns without candidate generation. In SIGMOD '00, pages 1--12, 2000.
[12]
R. Hastings and B. Joyce. Purify: A tool for detecting memory leaks and access errors in c and c+ programs. In Winter USENIX Conference, pages 125--138, 1992.
[13]
M. Hauswirth and T. Chilimbi. Low-overhead memory leak detection using adaptive statistical profiling. In ASPLOS-XI '04, pages 156--164, 2004.
[14]
D. Heine and M. Lam. A practical flow-sensitive and context-sensitive C and C+ memory leak detector. In PLDI '03, pages 168--181, 2003.
[15]
I. Jonyer, L. Holder, and D. Cook. MDL-based context-free graph grammar induction and applications. IJAIT, 13(1):65--79, 2004.
[16]
M. Jump and K. McKinley. Cork: dynamic memory leak detection for garbage-collected languages. In POPL '07, pages 31--38, 2007.
[17]
J. Kukluk, L. Holder, and D. Cook. Inference of node and edge replacement graph grammars. In ICML Grammar Induction Workshop '07, 2007.
[18]
M. Kuramochi and G. Karypis. Frequent subgraph discovery. In ICDM '01, pages 313--320, 2001.
[19]
T. Lengauer and R. Tarjan. A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst., 1(1):121--141, 1979.
[20]
C. Liu, X. Yan, H. Yu, J. Han, and P. Yu. Mining behavior graphs for "backtrace" of noncrashing bugs. In SDM '05, pages 286--297.
[21]
N. Mitchell. The runtime structure of object ownership. In D. Thomas, editor, ECOOP '06, 2006.
[22]
N. Mitchell and G. Sevitsky. LeakBot: An automated and lightweight tool for diagnosing memory leaks in large java applications. In ECOOP '03, 2003.
[23]
N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. In OOPSLA '07, pages 245--260, 2007.
[24]
N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. In PLDI '07, pages 89--100, 2007.
[25]
M. Orlovich and R. Rugina. Memory leak analysis by contradiction. In Lecture Notes in Computer Science, volume 4134, pages 405--424. Springer, 2006.
[26]
W. De Pauw and G. Sevitsky. Visualizing reference patterns for solving memory leaks in java. Concurrency - Practice and Experience, 12(14):1431--1454, 2000.
[27]
M. Renieris and S.Reiss. Fault localization with nearest neighbor queries. In ASE '03, pages 30--39, 2003.
[28]
G. Rozenberg. Handbook of Graph Grammars and Computing by Graph Transformation, volume 1. 1997.
[29]
E. Tilevich and G. Back. Program, enhance thyself! demand-driven pattern-oriented program enhancement. In AOSD '08, pages 13--24, April 2008.
[30]
G. Venkataramani, B. Roemer, Y. Solihin, and M. Prvulovic. Memtracker: Efficient and programmable support for memory access monitoring and debugging. In HPCA '07, pages 273--284, 2007.
[31]
T. Xie, S. Thummalapenta, D. Lo, and C. Liu. Data Mining for Software Engineering. IEEE Computer, Vol. 42(8):35--42, Aug 2009.
[32]
Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In ESEC/FSE-13, pages 115--125, 2005.
[33]
G. Xu and A. Rountev. Precise memory leak detection for Java software using container profiling. In ICSE '08, pages 151--160, 2008.
[34]
X. Yan, H. Cheng, J. Han, and P. Yu. Mining significant graph patterns by leap search. In SIGMOD '08, pages 433--444, 2008.
[35]
X. Yan and J. Han. gSpan: graph-based substructure pattern mining. In ICDM '02, pages 721--724, 2002.
[36]
X. Yan and J. Han. CloseGraph: mining closed frequent graph patterns. In SIGKDD '03, pages 286--295, 2003. 956784.
[37]
Z. Zeng, J. Wang, L. Zhou, and G. Karypis. Out-of-core coherent closed quasi-clique mining from large dense graph databases. ACM TODS, 32(2), 2007.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
KDD '10: Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining
July 2010
1240 pages
ISBN:9781450300551
DOI:10.1145/1835804
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: 25 July 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dominator tree
  2. graph grammars
  3. graph mining
  4. heap profiling
  5. memory leaks

Qualifiers

  • Research-article

Conference

KDD '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 1,133 of 8,635 submissions, 13%

Upcoming Conference

KDD '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)0
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