Charting the API minefield using software telemetry data

Charting the API minefield using software telemetry data
复制标题

DOI:
10.1007/s10664-014-9343-7
复制
发表时间:
2015-12
影响因子:
4.1
通讯作者:
M. Kechagia;Dimitris Mitropoulos;D. Spinellis
M. Kechagia;Dimitris Mitropoulos;D. Spinellis
中科院分区:
计算机科学2区
文献类型:
--
作者:
M. Kechagia;Dimitris Mitropoulos;D. Spinellis

文献摘要

被引文献

相似文献

程序通过使用应用程序编程接口(API)来绘制其功能的重要部分。除了开发人员在软件中扩展API的方式之外,这些程序的稳定性还取决于API的设计和实现。在这项工作中,我们报告了如何使用软件遥测数据来分析Android应用程序中API故障的原因。具体来说,我们得到了4.9gbworth的崩溃数据,数千个应用程序发送到一个集中的崩溃报告管理服务。我们处理了这些数据,提取了大约一百万个堆栈跟踪,将链接异常的部分拼接在一起,并建立了启发式规则来绘制应用程序和API调用之间的边界。我们检查了一组与riskyAPI调用相关的50多万个堆栈跟踪,以映射最常见的应用程序失败原因的空间。我们的研究结果表明,最常见的问题可以归因于内存耗尽,竞争条件或死锁,以及丢失或损坏的资源。考虑到我们确定的崩溃原因的类别,我们将考虑API设计和实现选择,例如特定的异常、默认资源和非阻塞算法,这些可以消除常见故障。此外,我们认为,开发工具,如内存分析器,线程调试器和静态分析器可以通过早期的代码测试和分析,防止崩溃。最后,一些用于进程和内存管理的执行平台和框架设计也可以消除一些应用程序崩溃。
Programs draw significant parts of their functionality through the use of Application Programming Interfaces (APIs). Apart from the way developers incorporateAPIs in their software, the stability of these programs depends on the design and implementation of theAPIs. In this work, we report how we used software telemetry data to analyze the causes ofAPIfailures in Android applications. Specifically, we got 4.9gbworth of crash data that thousands of applications sent to a centralized crash report management service. We processed that data to extract approximately a million stack traces, stitching together parts of chained exceptions, and established heuristic rules to draw the border between applications and theAPIcalls. We examined a set of more than a half million stack traces associated with riskyAPIcalls to map the space of the most common application failure reasons. Our findings show that the top ones can be attributed to memory exhaustion, race conditions or deadlocks, and missing or corrupt resources. Given the classes of the crash causes we identified, we recommendAPIdesign and implementation choices, such as specific exceptions, default resources, and non-blocking algorithms, that can eliminate common failures. In addition, we argue that development tools like memory analyzers, thread debuggers, and static analyzers can prevent crashes through early code testing and analysis. Finally, some execution platform and framework designs for process and memory management can also eliminate some application crashes.