Cork: Dynamic Memory Leak Detection for Java

نویسندگان

  • Maria Jump
  • Kathryn S. McKinley
چکیده

Despite all the benefits of garbage collection, memory leaks remain a problem for Java programs. A memory leak in Java occurs when a program inadvertently maintains references to objects that it no longer needs, preventing the garbage collector from reclaiming space. At best, leaks degrade performance. At worst, they cause programs to run out of memory and crash. Small continuous leaks in long-running programs are notoriously hard to find and can crash the program only after days or weeks of execution. We introduce Cork, a low-overhead, accurate technique for detecting memory leaks in Java programs. Cork identifies overall monotonic heap growth by piggybacking on the garbage collector. On each full-heap collection, Cork builds a summary type pointsto graph annotated with type volumes. Cork identifies potentially leaking types that grow over multiple collections. Cork reports the slice in the type points-to graph that is growing (i.e., the data structure that points to the leaking type). We implement Cork in MMTk for Jikes RVM, where it adds an average overhead of 2.4% for moderate heap sizes and 1.7% for large heap sizes to SPECjvm and DaCapo benchmarks using a generational mark-sweep collector. Cork exactly identifies a single growing data structure in each of three popular benchmarks (fop, 202 jess, and SPECjbb2000). Due to the precision of Cork’s report, we eliminated these leaks in 202 jess and SPECjbb2000, whereas their developers had not previously done so. Cork is the first tool to find leaks in Java with low enough overhead to consider using online.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

JPAR – Isolating Java Heap to Protect Runtime of Middleware from Memory Leak

Memory leaks are among the most difficult Java application problems, which do various harm to Java middlewarebased system, including unpredictable behavior, low performance, and even crash of the whole system. The fatal crash of the whole system may have devastating impact to enterprise applications supported by the system. Traditional approaches to solving memory leak problem are to provide me...

متن کامل

Detecting memory leaks in managed languages with Cork

A memory leak in a managed program occurs when the program inadvertently maintains references to objects that it no longer needs. Memory leaks cause systematic heap growth which degrades performance and results in program crashes after perhaps days or weeks of execution. Prior approaches for detecting memory leaks rely on heap differencing or detailed object statistics which store state proport...

متن کامل

Efficient, Context-Sensitive Dynamic Analysis via Calling Context Uptrees

State-of-the-art dynamic bug detectors such as data race and memory leak detectors report program locations that are likely causes of bugs. However, static program location is not enough for developers to understand the behavior of increasingly complex and concurrent software. Dynamic calling context provides additional information, but it is expensive to record calling context frequently, e.g....

متن کامل

Pruning To appear in ASPLOS 2009 . Preliminary draft

Managed languages improve programmer productivity with type safety and garbage collection, which eliminate memory errors such as dangling pointers, double frees, and buffer overflows. However, programs may still leak memory if programmers forget to eliminate the last reference to an object that will not be used again. Leaks slow programs by increasing collector workload and frequency. Growing l...

متن کامل

LeakSurvivor: Towards Safely Tolerating Memory Leaks for Garbage-Collected Languages

Continuous memory leaks severely hurt program performance and software availability for garbage-collected programs. This paper presents a safe method, called LeakSurvivor, to tolerate continuous memory leaks at runtime for garbage-collected programs. Our main idea is to periodically swap out the “Potentially Leaked” (PL) memory objects identified by leak detectors from the virtual memory to dis...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006