paperbot · PL 论文追踪

全部论文 待读 收藏

From Thread to Pool: Modeling and Static Detection of Thread Pool Misuses in Java Programs

从线程到线程池:Java 程序中线程池误用的建模与静态检测
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Baoquan Cui, Yucheng Qiu, Rui Han, Hang Gao, Jian Zhang
crossref: 2026-10-09

AI 速览

一句话:提出七类执行器管理误用分类与资源管理模型,并实现静态分析工具 PoolGuard 检测 Java 线程池误用。

异步编程是现代软件性能的基础,Java 中基于 ExecutorService 的执行器已成为管理并发任务的标准抽象。已有研究广泛关注传统并发缺陷,但对执行器管理误用分析不足:这类缺陷并非源于异步任务的业务逻辑,而是源于执行器的配置、使用与终止方式。本文提出七类执行器管理误用模式的分类体系,并用资源管理模型对其进行形式化。基于该模型,作者实现静态分析框架 PoolGuard,既能检测执行器通用的生命周期与结果处理缺陷,也能检测 ThreadPoolExecutor 特有的配置误用。在包含真实缺陷的基准套件上的评估表明,PoolGuard 优于专用异步检测器以及 SpotBugs、Infer 等通用分析器。将该工具应用于大规模开源系统,共发现 50 个此前未知的问题,其中 24 个已被开发者修复或确认,体现了语义分析在检测执行器管理缺陷方面的实用价值。

问题
现有研究多聚焦传统并发缺陷,而对 Java ExecutorService 执行器在配置、使用与终止上的管理误用缺乏系统分析与自动检测手段。
方法
提出七类执行器管理误用模式分类,并用资源管理模型加以形式化,进而实现静态分析框架 PoolGuard,检测通用生命周期/结果处理缺陷及 ThreadPoolExecutor 特定配置误用。
评估
在含真实缺陷的基准套件上与专用异步检测器及 SpotBugs、Infer 对比,并在大规模开源系统上应用,发现 50 个未知问题,其中 24 个已被修复或确认。
原文摘要(Abstract)

Asynchronous programming is fundamental to modern software performance, and Java ExecutorService-based executors have become a standard abstraction for managing concurrent tasks. While existing research has extensively studied traditional concurrency bugs, management misuses of executors remain under-analyzed. These defects arise not from the business logic of asynchronous tasks, but from how executors are configured, used, and terminated. We present a taxonomy of seven executor-management misuse patterns and formalize them using a resource-management model. Based on this, we develop PoolGuard, a static analysis framework for detecting both executor-generic lifecycle/result-handling defects and ThreadPoolExecutor-specific configuration misuses. Extensive evaluation on a benchmark suite with real-world defects shows that PoolGuard is better than specialized async detectors as well as general-purpose analyzers such as SpotBugs and Infer. Applying PoolGuard to large-scale open-source systems, we identified 50 previously unknown issues, 24 of which have already been fixed or confirmed by developers, demonstrating the practical value of semantic analysis for executor-management defects.

链接与引用

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

BibTeX
@inproceedings{paperbot12540,
  title = {From Thread to Pool: Modeling and Static Detection of Thread Pool Misuses in Java Programs},
  author = {Baoquan Cui and Yucheng Qiu and Rui Han and Hang Gao and Jian Zhang},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3837508}
}