kirancodes.me
To Proof Maintenance & Beyond!

Automatically detecting missing cleanup for ungraceful exits

Zhouyang Jia, Shanshan Li, Tingting Yu, Xiangke Liao, Ji Wang

Abstract

Software encounters ungraceful exits due to either bugs in the interrupt/signal handler code or the intention of developers to debug the software. Users may suffer from ”weird” problems caused by leftovers of the ungraceful exits. A common practice to fix these problems is rebooting, which wipes away the stale state of the software. This solution, however, is heavyweight and often leads to poor user experience because it requires restarting other normal processes. In this paper, we design SafeExit, a tool that can automatically detect and pinpoint the root causes of the problems caused by ungraceful exits, which can help users fix the problems using lightweight solutions. Specifically, SafeExit checks the program exit behaviors in the case of an interrupted execution against its expected exit behaviors to detect the missing cleanup behaviors required for avoiding the ungraceful exit. The expected behaviors are obtained by monitoring the program exit under a normal execution. We apply SafeExit to 38 programs across 10 domains. SafeExit finds 133 types of cleanup behaviors from 36 programs and detects 2861 missing behaviors from 292 interrupted executions. To predict missing behaviors for unseen input scenarios, SafeExit trains prediction models using a set of sampled input scenarios. The results show that SafeExit is accurate with an average F-measure of 92.5%.

BibTeX
@inproceedings{Jia-al:FSE19,
  author    = {Zhouyang Jia and
               Shanshan Li and
               Tingting Yu and
               Xiangke Liao and
               Ji Wang},
  title     = {Automatically detecting missing cleanup for ungraceful exits},
  booktitle = {{ESEC/SIGSOFT} {FSE}},
  pages     = {751--762},
  publisher = {{ACM}},
  year      = {2019},
}

Related papers