1.05k likes | 1.12k Views
Self-healing Software Systems. Mauro Pezzè University of Lugano and University of Milano Bicocca. Why self healing?. Software fails Verification & validation are hard New factors amplify problems dynamic behavior / emerging scenarios unexpected environment interactions
E N D
Self-healing Software Systems Mauro Pezzè University of Lugano and University of Milano Bicocca
Why self healing? Software fails Verification & validation are hard New factors amplify problems dynamic behavior / emerging scenarios unexpected environment interactions multi vendors / multi owners
Dynamic autonomous changes the provider independently updates the service implementation statically unpredictable evolution Service provider communicate publish bind Service requestor Service broker find the application dynamically reconfigure the services the broker dynamically discover new service
unpredictable environment interactions statically unpredictable interactions
Multi vendors / owners Web Application JSF JDBC DB … DB DB JSP Log4J Tomcat JDK Tomcat Server
Multi vendors / owners Web Application JSF JDBC DB … DB DB JSP Log4J Tomcat JDK Tomcat Server
Self-healing software systems? • similarly to natural systems • focus on some classes of problems • maybe incomplete recovery • may imply changes in the body • does not work for all problems • differently from natural systems • recover from expected as well as unexpected problems • built-in as well as emerging mechanisms • potentially hazardous novel interactions
focus on some classes of problems Integration failures • common in presence of evolving/emerging behaviors • often due to uncovered incompatibilities - misunderstandings • hard/impossible to identify during classic testing • easy to correct once diagnosed
Inconsistent interpretation of parameters or values Mars Climate Orbiter FAULTmeters – yard mismatch FIXconverter
Violations of domains, capacity, size Buffer overflow FAULTmeters – yard mismatch FIXconverter
…Integration Faults Side effects on parameters or resources FAULTconflict on temporary file FIXrename misunderstood functionality FAULTInconsistent interpretation of web hits FIXconvert
Detecting failures automatically • Application independent failures • memory faults • deadlocks • race conditions • Exceptions • Application dependent failures • Oracles • Assertions
Getting Assertions Right setId public abstract void setId(java.lang.String id) Set the component identifier of this UIComponent (if any). […] Component identifiers must obey the following semantic restrictions (note that this restriction is NOT enforced by the setId() implementation): • The specified identifier must be unique among all the components […] that are descendents of the nearest ancestor UIComponent [...], or within the scope of the entire component tree […]. JSF Specification 1.2, javax.faces.component.UIComponent
public class UIComponent { private String id = “default”; public UIComponent(String id) { this.id = id; } public void setId(String id) { this.id = id; } public void doSomething() { this.id =“whatever”; } }
requirement Java service pages specification Java server faces implementation annotation generation
Observations • 1 Property = 56 Assertions
Properties ✔ UML Stereotypes Platform independent 1:n Mapping Rules AJ Pointcuts Property Templates Platform specific AJ Advice Runtime Checks Concept Prototype
Debugging • hard manual activity • compare multiple execution (need multiple runs)
Reality is Different! Over-Generalization and Over-Restriction Over-Generalization Over-Restriction
Models derived dynamically … x < 0 Daikon kTail Adabu gkTail
kTail A. Biermann and J. Feldman. On the synthesis of finite state machines from samples of their behavior. IEEE Transactions on Computer, 21:592–597, 1972.
From Sequence of Events to Protocols a -> a -> a -> b -> c a -> b -> c a -> a -> b -> c a -> a -> a -> a -> a -> c
kTail TRACES a -> a -> a -> b -> c a -> b -> c a -> a -> b -> c a -> a -> a -> a -> a -> c PTA (1) (2) FSA
Build the PTA TRACES a -> a -> a -> b -> c a -> b -> c a -> a -> b -> c a -> a -> a -> a -> a -> c PTA (1)
2 FUTURES 2-future(2) = {aa,ab,bc} 2-future(5) = {aa, bc} 2-future(11) = {} 2-future(8) = {c} … k=2
2-future(8) = {c} 2-future(12) = {c}
2-future(11) = {} 2-future(13) = {}
2-future(2) = {aa, ab, bc} 2-future(3) = {aa, ab, bc}