Back to Search Start Over

BLeak: Automatically Debugging Memory Leaks in Web Applications.

Authors :
Vilk, John
Berger, Emery D.
Source :
Communications of the ACM; Nov2020, Vol. 63 Issue 11, p146-153, 8p, 3 Black and White Photographs, 2 Diagrams, 3 Charts, 1 Graph
Publication Year :
2020

Abstract

Memory leaks in web applications are pervasive and difficult to debug. Leaks degrade responsiveness by increasing garbage collection costs and can even lead to browser tab crashes. Previous leak detection approaches designed for conventional applications are ineffective in the browser environment. Tracking down leaks currently requires intensive manual effort by web developers, which is often unsuccessful. This paper introduces BLeak (Browser Leak debugger), the first system for automatically debugging memory leaks in web applications. BLeak’s algorithms leverage the observation that in modern web applications, users often repeatedly return to the same (approximate) visual state (e.g., the inbox view in Gmail). Sustained growth between round trips is a strong indicator of a memory leak. To use BLeak, a developer writes a short script (17–73 LOC on our benchmarks) to drive a web application in round trips to the same visual state. BLeak then automatically generates a list of leaks found along with their root causes, ranked by return on investment. Guided by BLeak, we identify and fix over 50 memory leaks in popular libraries and apps including Airbnb, AngularJS, Google Analytics, Google Maps SDK, and jQuery. BLeak’s median precision is 100%; fixing the leaks it identifies reduces heap growth by an average of 94%, saving from 0.5MB to 8MB per round trip. [ABSTRACT FROM AUTHOR]

Details

Language :
English
ISSN :
00010782
Volume :
63
Issue :
11
Database :
Complementary Index
Journal :
Communications of the ACM
Publication Type :
Periodical
Accession number :
146617582
Full Text :
https://doi.org/10.1145/3422598