摘要:如何有效地獲取具有代表性的差錯數(shù)據進行差錯注入仍是故障注入技術一個有待深入研究的問題。文中通過故障注入實驗分析了程序的“故障-差錯-異常”傳播機理,說明了從異常層次進行程序錯誤行為分析及其差錯數(shù)據收集的合理性。該研究為當前具有較大規(guī)模的、具有異常處理機制的程序進行差錯數(shù)據的收集提供了新途徑。
關鍵詞:異常;故障注入;軟件差錯
中圖分類號:TP311 文獻標識碼:A 文章編號:1009-3044(2014)30-7077-03
Analysis of Programs “fault-error-exception/failure” Process Based on Exception Control Flow
SUN Ya
(School of Software, Tongji University, Shanghai 201804, China)
Abstract: Its still a key question to fault-injection technique that how to effectively generate representative error set that emulates software fault. In this paper, the propagation process of “fault-error-exception” chain in program is analyzed with fault injection experiment, which rationalizes the point to analyze program erroneous behavior from the aspect of exception control flow. This research provides a new means to analyze the erroneous behavior and generate the valid error set for the large-scale program with exception handling mechanism automatically.
Key words: exception; fault injection; software error
故障注入技術通過人為地對軟件或計算系統(tǒng)注入故障,加速其失效而達到驗證目標軟件的容錯機制、評估軟件可靠性的目的[1]。如何獲取建立故障或差錯模型是該技術在實現(xiàn)過程中的關鍵[2]。對于軟件而言,在進行差錯注入之前,具有代表性的差錯集合獲取需要分析目標軟件的功能特性及其在故障激活后所表現(xiàn)出的錯誤行為[1-2]。但該過程需要分析大量故障或失效數(shù)據,周期很長。
程序的異常處理機制是提高軟件可靠性的重要手段之一。該機制通過異常的引發(fā)、捕捉及其錯誤處理代碼的執(zhí)行,可將程序從錯誤狀態(tài)恢復到正常狀態(tài),避免軟件失效的發(fā)生 [3]。所以,當該類程序中的故障在激活之后,會有一定的幾率被異常處理機制偵測,最終引起異常。這說明程序中異常可看作程序故障激活后的一種表現(xiàn)形式。該文通過以Ipbench作為實驗負載,對其進行基于正交缺陷分類[1](orthogonal defect classification, ODC)故障的故障注入實現(xiàn),分析了具有異常處理機制的程序中故障激活后如何引起異常的發(fā)生,描述了該類程序中“故障-差錯-異常/失效”的傳播關系。……