arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.18005cs.SEcs.LG
收藏

通过变异生成的堆栈跟踪微调大型语言模型进行故障定位

Fault Localization via Fine-tuning Large Language Models with Mutation Generated Stack Traces

University of Cologne(科隆大学);SAP(思爱普);German Aerospace Center(德国航空航天中心)

Neetha Jambigi, Bartosz Bogacz, Moritz Mueller, Thomas Bach, Michael Felderer

AI总结:

针对生产环境中仅提供堆栈跟踪的软件崩溃,提出通过代码变异生成合成崩溃数据微调大型语言模型的故障定位方法,解决根本原因不在堆栈最内层的复杂情况,在多个数据库上取得显著优于基线的准确率。

摘要:

软件的突然和意外终止被称为软件崩溃,分析这些崩溃具有挑战性。找到根本原因需要大量人工工作和专业知识,以连接堆栈跟踪、源代码和日志等信息源。典型的故障定位方法需要测试失败或源代码。在生产环境(如SAP HANA的生产环境)中发生的崩溃仅提供崩溃日志和堆栈跟踪。我们提出一种仅基于堆栈跟踪信息、无需额外运行时信息的新型故障定位方法,即通过微调大型语言模型(LLMs)实现。我们解决了崩溃根本原因与技术原因不同、且不在堆栈跟踪最内层帧中的复杂情况。由于历史崩溃数量不足以微调LLMs,我们通过利用代码变异器向代码库注入合成崩溃来扩充数据集。通过对HANA代码库410万次变异产生的64,369次崩溃进行微调,我们预测崩溃根本原因位置的准确率达66.9%,而基线方法仅为12.6%和10.6%。我们通过在另外两个开源数据库SQLite和DuckDB上进行评估验证了方法的通用性,准确率分别为63%和74%。在所有实验中,微调在我们的数据集中定位故障的表现始终优于提示未微调的LLMs。

英文摘要:

Abrupt and unexpected terminations of software are termed as software crashes. They can be challenging to analyze. Finding the root cause requires extensive manual effort and expertise to connect information sources like stack traces, source code, and logs. Typical approaches to fault localization require either test failures or source code. Crashes occurring in production environments, such as that of SAP HANA, provide solely crash logs and stack traces. We present a novel approach to localize faults based only on the stack trace information and no additional runtime information, by fine-tuning large language models (LLMs). We address complex cases where the root cause of a crash differs from the technical cause, and is not located in the innermost frame of the stack trace. As the number of historic crashes is insufficient to fine-tune LLMs, we augment our dataset by leveraging code mutators to inject synthetic crashes into the code base. By fine-tuning on 64,369 crashes resulting from 4.1 million mutations of the HANA code base, we can correctly predict the root cause location of a crash with an accuracy of 66.9\% while baselines only achieve 12.6% and 10.6%. We substantiate the generalizability of our approach by evaluating on two additional open-source databases, SQLite and DuckDB, achieving accuracies of 63% and 74%, respectively. Across all our experiments, fine-tuning consistently outperformed prompting non-finetuned LLMs for localizing faults in our datasets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑