paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatically detecting missing cleanup for ungraceful exits

自动检测非优雅退出(ungraceful exit)导致的清理缺失
FSE Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2019匹配度 2/10 · 该论文属于程序分析与缺陷检测/修复方向,关注非优雅退出导致的清理缺失,但未涉及用户核心关注的 LLM/Agent 与程序分析交叉、静态分析、浮点程序分析或贝叶斯程序分析。引用 8 inbox
Zhouyang Jia, Shanshan Li, Tingting Yu, Xiangke Liao, Ji Wang
crossref: 2026-09-12

AI 速览

一句话:提出 SafeExit,通过对比正常与中断执行的退出行为,自动检测并定位非优雅退出造成的清理缺失。

软件可能因中断/信号处理代码的缺陷,或开发者有意的调试操作而发生非优雅退出,其遗留的过时状态会引发各种“怪异”问题;常见的重启修复方式代价高且影响其他正常进程。本文设计 SafeExit,通过监控程序在正常执行下的退出行为获得“期望清理行为”,再检查被中断执行时的实际退出行为,两者对比即可发现并定位缺失的清理行为,从而支持轻量级修复。作者将 SafeExit 应用于 10 个领域的 38 个程序,在 36 个程序中识别出 133 类清理行为,并在 292 次中断执行中检测到 2861 个缺失行为。为预测未见输入场景下的缺失行为,SafeExit 使用采样输入场景训练预测模型,平均 F-measure 达 92.5%。

问题
程序因信号/中断处理缺陷或调试需要而非优雅退出时,会遗留过时状态并引发难以排查的问题,而重启这一常用修复手段过于重量级。
方法
SafeExit 监控程序正常退出时的行为作为期望清理行为,与被中断执行时的退出行为进行对比,从而检测并定位缺失的清理行为;并利用采样输入场景训练预测模型以泛化到未见场景。
评估
在 10 个领域的 38 个程序上评估,于 36 个程序中识别出 133 类清理行为,在 292 次中断执行中检测出 2861 个缺失行为,缺失行为预测的平均 F-measure 为 92.5%。
原文摘要(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%.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot5057,
  title = {Automatically detecting missing cleanup for ungraceful exits},
  author = {Zhouyang Jia and Shanshan Li and Tingting Yu and Xiangke Liao and Ji Wang},
  booktitle = {FSE},
  year = {2019},
  doi = {10.1145/3338906.3338938}
}