Jaca: a Reflective Tool based on Patterns
Download
Report
Transcript Jaca: a Reflective Tool based on Patterns
Institute of
Computing
Jaca: a Reflective Fault Injection
Tool based on Patterns
Eliane Martins
Cecilia Rubira
Nelson Leme
Institute of Computing
State University of Campinas - Unicamp
Brasil
International Performance and Dependability Symposium — IPDS’2002
Washington, D.C., USA • June 23 - 26, 2002
Institute of
Computing
Contents
•
•
•
•
•
•
Context
Motivation and Objective
Jaca
Preliminary Experiments
Conclusions
Future Works
2
Institute of
Computing
Fault Injection
• Deliberate introduction of faults into a system to
observe its behavior
– valuable approach to validate dependability properties
– useful to evaluate impact of error recovery mechanisms
into performance
• Approaches:
– simulation-based fault injection
– hardware fault injection
software fault injection (SFI)
3
Institute of
Computing
SFI Approaches
• Static injection (compile-time)
– source or Assembler code alteration • no extra code is needed
• faults triggered when
altered code is accessed
•
Dynamic injection (runtime)
–special process
–interrupt routines
–trace mode
–code insertion
• needs extra code: fault injector
and monitor
• needs fault trigger mechanism
4
Institute of
Computing
Motivation
• Typical runtime SFI tools work at machine code level
ex.: corruption of CPU registers
useful to emulate consequences of hardware failures
low intrusion into the target application
great effort to emulate software faults
ex.: incorrect assignment of values to variables; incorrect
array indexes; missing function
• Why is it important to emulate software faults ?
• software faults are major cause of system failures
• COTS software components use is increasing, even for
critical applications
5
Institute of
Computing
Our Goals
• Problem:
– Runtime injection at source-code level, affecting
objects’ attributes and methods
– Separation of concerns: fault injection and
monitoring code separated from application code
• Approach used:
– computational reflection
6
Institute of
Computing
Computational Reflection
• Capability of a system to reason
about or act upon itself
• Reflective systems manipulate
– external data
– meta information: data representing
system’s aspects
•
Reflective systems’
architecture:
– base level: system’s functions
– meta level: interception and/or
alteration functions
structural reflection
manipulation of
structural aspects
ex.: definition of a
class or function
behavioral reflection
manipulation of
system’s behavior
ex.: method invocation
interception
7
Institute of
Computing
Behavioral Reflection and OO
object X : class
attribute A : type, value
method M1 : name, parameters
metaobject
meta-level
base-level
A
B
M2
M1
object X
M3
8
Institute of
Computing
Jaca
• Evolution of FIRE:
runtime fault injection tool for
applications written in C++
showed feasibility of the approach
source code dependency
• Main requirements:
–
–
–
–
validation of Java applications
high portability
source code independence
ability to incorporate new fault
models
9
Institute of
Computing
Development Aspects
• Design based on the Fault Injection
Pattern set:
– reuse of architectural solutions
already used to implement fault
injection tools
• modularity
• extensibility
• Code is written in pure Java
• Use of Javassist reflection library:
– extends Java reflection API
– requires no modification to the
standard JVM
– performs reflection at bytecode level
during load time
• portability
• source code
independence
10
Institute of
Computing
Jaca’s Architecture
Interface
Jaca
Log File
Fault List
Controller
Injector
Manager
Logical
Injector
…
Class List
Monitor
Manager
Logical
Injector
Logical
Monitor
…
Activator
Logical
Monitor
Physical
Monitor
Physical
Injector
Meta Level
Base Level
Target Application
…
11
Institute of
Computing
Application Instrumentation
Application’s
Class Files
Javassist
library
byte code
Activator
(class loader)
byte
code
Metaobjects’
ClassFiles
byte code
+
hooks to metaobjects
Metaobject
Physical
Injector
Physical
Monitor
12
Institute of
Computing
Preliminary Experiments
• Experiments to show Jaca’s extensibility:
– Assembler-level fault injection
Physical
Injector
Low Level
Functions
LowLevelRoutine( )
JNIEXPORT void JNICALL Java_LowLevelRoutine
(JNIEnv *param1, jobject param2)
{
int a, b, c, d, op, num ;
printf ( "\n###-> testing CPUID\n” ) ;
op = 1;
asm (
"cpuid"
: "=a" (a),
"=b" (b),
"=c" (c),
"=d" (d)
: "a" (op));
printf ( "\n###-> Register values: - EAX: %i, EBX: %i,
ECX: %i, EDX: %i\n\n", a, b, c, d ) ;
... }
13
Institute of
Computing
Conclusions and Future Works
• Jaca:
–
–
–
an extensible, portable software fault injector
faults affect attributes and methods of Java applications
fault injection uses computational reflection
source code independent but ...
dependent on reflection toolkit used
• Further works:
– validate real world applications
• COTS ODBMS is being tested
– extend Jaca’s functionalities
– use of other reflection toolkits: Guaraná, Kava
– explore Assembler-level fault injection features
14
Institute of
Computing
Thank you !
• Our emails:
[email protected]
[email protected]
[email protected]
15