Exception Handling Analysis and Transformation Using Fault Injection: Study of Resilience Against Unanticipated Exceptions

Benoit Cornu 1, 2 Lionel Seinturier 1, 2 Martin Monperrus 1, 2
1 SPIRALS - Self-adaptation for distributed services and large software systems
Inria Lille - Nord Europe, CRIStAL - Centre de Recherche en Informatique, Signal et Automatique de Lille (CRIStAL) - UMR 9189
Abstract : Context: In software, there are the error cases that are anticipated at specification and design time, those encountered at development and testing time, and those that were never anticipated before happening in production. Is it possible to learn from the anticipated errors during design to analyze and improve the resilience against the unanticipated ones in production? Objective: In this paper, we aim at analyzing and improving how software handles unanticipated exceptions. The first objective is to set up contracts about exception handling and a way to assess them automatically. The second one is to improve the resilience capabilities of software by transforming the source code. Method: We devise an algorithm, called short-circuit testing, which injects exceptions during test suite execution so as to simulate unanticipated errors. It is a kind of fault-injection techniques dedicated to exception-handling. This algorithm collects data that is used for verifying two formal contracts that capture two resilience properties w.r.t. exceptions: the source-independence and pure-resilience contracts. Then we propose a code modification technique, called ``catch-stretching'' which allows error-recovery code (of the form of catch blocks) to be more resilient. Results: Our evaluation is performed on 9 open-source software applications and consists in analyzing 241 catch blocks executed during test suite execution. Our results show that 101/214 of them (47%) expose resilience properties as defined by our exception contracts and that 84/214 of them (39%) can be transformed to be more resilient. Conclusion: Our work shows that it is possible to reason on software resilience by injecting exceptions during test suite execution. The collected information allows us to apply one source code transformation that improves the resilience against unanticipated exceptions. This works best if the test suite exercises the exceptional programming language constructs in many different scenarios.
Type de document :
Article dans une revue
Information and Software Technology, Elsevier, 2015, Information and Software Technology, 57, pp.66-76. 〈10.1016/j.infsof.2014.08.004〉
Liste complète des métadonnées

Littérature citée [24 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/hal-01062969
Contributeur : Benoit Cornu <>
Soumis le : jeudi 18 décembre 2014 - 15:37:03
Dernière modification le : mardi 3 juillet 2018 - 11:48:07
Document(s) archivé(s) le : lundi 23 mars 2015 - 16:56:30

Fichier

exception-analysis-resilience-...
Fichiers produits par l'(les) auteur(s)

Identifiants

Collections

Citation

Benoit Cornu, Lionel Seinturier, Martin Monperrus. Exception Handling Analysis and Transformation Using Fault Injection: Study of Resilience Against Unanticipated Exceptions. Information and Software Technology, Elsevier, 2015, Information and Software Technology, 57, pp.66-76. 〈10.1016/j.infsof.2014.08.004〉. 〈hal-01062969〉

Partager

Métriques

Consultations de la notice

442

Téléchargements de fichiers

826