Skip to content

filipedeluna/oscar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSCAR Noise Injector - Prototype

Requirements (Tested on)

  • Apache Maven 3.6.3
  • OpenJDK 17.0.2 (Project compiles to Java 9)

Running Instructions

mvn clean
mvn compile
mvn exec:java -Dexec.mainClass=oscar.Main -Dexec.args="-h"
OSCAR arguments
oscar <targetfile> <mainclass> <outputdirectory>
Instrumented program arguments
Usage:
        java [java_options] <mainclass> [oscar_options]
                (to execute a class)
        or: java -jar <mainclass> [oscar_options]
                (to execute a jar file)

OSCAR options include:
        -a --args                       String                          Inject arguments into the program
        -c --config_file                String                          Set config file location to load
        -co --console-output            Flag            False           Enable output of noising locations signals to console
        -fo --file-output               Flag            False           Enable output of noising locations signals to a file
        -lfo --lazy-file-output         Flag            False           Enable lazy output of noising locations signals to a file
        -M --max_sleep_length           Long            0               Set maximum sleep length
        -m --min_sleep_length           Long            400             Set minimum sleep length
        -d --disable-noise              Flag            False           Disable all noise
        -np --noise-placements          List<String>    All             Set the list of active noise placements.
        -nc --noise-categories          List<String>    All             Set the list of active noise categories.
        -pnp --print-noise-placements   Flag            -               Print all possible noise placements.
        -v --version                    Flag            -               Print OSCAR version.
        -vb --verbose                   Flag            False           Enable full logging.
        -q --quiet                      Flag            False           Disable logging.
        -h --help                       Flag            False           Print Help.

OSCAR Noise Injector 2022
Note:
  • Sleep lengths should be integers
  • Injected arguments need to be inside quotes as such: "-a -b -c"

Examples:

Account
  1. Compile the Account program source code
cd data/cflash/account
javac *.java
cd ../../..
  1. Use OSCAR to instrument the Account program's bytecode with the noising engine's logic. OSCAR will wrap the original program in its routine. The outputted program will be in the folder "output".
mvn exec:java -Dexec.mainClass=oscar.Main -Dexec.args="data/cflash/account/Main.class Main 
output"
  1. Run the instrumented program without any noise
cd output
java Main -d
  1. Run the instrumented program with random noise between 0 and 100ms
java Main -m 0 -M 100
  1. Run the instrumented program, only noising synchronized blocks and methods, and lazily output the trace to a file.
java Main -m 0 -M 100 -nc sb -lfo
  1. Run the instrumented program, with specific arguments.
java Main -a "5"

Acknowledgments

This work was partially funded by the Portuguese FCT-MEC project HiPSTr (High-performance Software Transactions — PTDC/CCI-COM/32456/2017)&LISBOA-01-0145-FEDER-032456).

About

OSCAR Noise Injection Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published