• 沒有找到結果。

AutoBash: Improving Configuration Management with Operating System Causality Analysis

N/A
N/A
Protected

Academic year: 2022

Share "AutoBash: Improving Configuration Management with Operating System Causality Analysis"

Copied!
32
0
0

加載中.... (立即查看全文)

全文

(1)

1

AutoBash: Improving Configuration Management with Operating System Causality Analysis

Ya-Yunn Su, Mona Attariyan, and Jason Flinn University of Michigan

(2)

Motivation

• Configuration management is frustrating!

• Users may have to

– Change environment variables – Edit configuration files

– Manage inter-application dependencies

• Current approach:

– Ask friends, search on-line, read manual, … – Try potential solutions

– Carefully undo wrong solutions

(3)

3

AutoBash solves these problems Problems with current approach

• Applying solutions is time-consuming

• Undoing a wrong solution can be hard

• Hard to know how a problem was solved

• A “solution” may cause new problems Automatically tries many solutions

Provides undo capability Explains solution to user

Automatically runs regression tests

(4)

- ( •

• - ) • •

AutoBash overview

Health Monitoring Mode Periodically tests

system health Problem

Detected

Replay Mode

Automatically searches for a solution

Least user effort

Observation Mode Helps user fix the

problem Substantial user

involvement

(5)

5

Outline

• Motivation

• AutoBash design and implementation

– Observation mode – Replay mode

– Health monitoring mode

• Evaluation

• Conclusion

(6)

Observation mode

• A modified bash shell

– User types in commands to solve the problem

% command 1

% test if app works

% undo testing

% undo command 1

% command 2

(7)

7

Verifying a solution is tedious

• AutoBash automatically tests using predicates

• Predicate:

– Tests if an application functions correctly – Returns true/false if the test passes/fails

wget http://localhost/~$USER Predicate example for a web server

% command 1

% test if app works

% undo testing

% rollback command 1

% command 2

(8)

Undoing testing is tedious

• Predicate testing has no side effects

– Executed speculatively and rolled back

• Speculator [SOSP ‘05]

– Process-level speculative execution

• Speculative execution makes predicate testing safe

% command 1

% test if app works

% undo testing

% rollback command 1

% command 2

(9)

9

Undo can be hard

• AutoBash speculatively executes each action

– Light-weight checkpoint and rollback

• Speculative execution makes undo easy

% command 1

% test if app works

% undo testing

% undo command 1

% command 2

% rollback command 1

(10)

Regression testing is hard

• AutoBash automatically runs regression tests

– Executes predicates in the predicate database – Ensures all predicates pass

Predicate Database

P0 P1 P2

P3 P4 P5

CVS predicates

GCC cross-compiler predicates

Web server predicates

P6 P7 P8

(11)

11

Regression tests can be slow

• Problem: running all predicates can be slow

• Only need to run predicates affected by an action

– Uses causality tracking to find affected predicates

(12)

Tracking causality

• Output set

– kernel objects an action causally affects

• Input set

– kernel objects a predicate causally depends on Predicate: grep “test” bar

Output set = {file foo}

Action: touch foo

Input set = {file bar}

(13)

13

Analyzing causality

• AutoBash calculates the intersection

– Determines which predicates to run

Action:

touch foo

file: foo file: bar

Predicate:

grep “test” bar

Do not run predicate

(14)

sh sh

exit

touch

fork & exec

touch

exit

Tracking output sets

• An output set is tracked for each action

Process sh

Output set

file foo

create

Process touch File metadata foo

File content foo Directory entry foo

Action: sh create_file.sh create_file.sh: touch foo

(15)

15

sh Predicate: sh testfile.sh sh

testfile.sh: grep “test” bar

Process grep Process sh

File metadata bar File content bar Directory entry bar

Process grep’s input set

Process grep Process sh

grep

fork & exec

grep

exit

Tracking input sets

• An input set is tracked for each predicate

Predicate’s input set

file bar

read

Process grep File metadata bar

File content bar Directory entry bar

Process sh

File metadata bar File content bar Directory entry bar

(16)

Understanding solutions can be hard

• AutoBash generates causal explanation

– Analyzes input and output sets

(17)

17

Causal explanation

ls –l

/home/$USER

metadata:

/home/$USER/

public_html

wget index.html

metadata:

/home/$USER chmod +x /home/$USER

chmod +x /home/$USER/

public_html

wget

~$USER/cgi-bin/test.pl wget

~$USER/index.html

Actions

Kernel objects

Predicates

(18)

Outline

• Motivation

• AutoBash design and implementation

– Observation mode – Replay mode

– Health monitoring mode

• Evaluation

• Conclusion

(19)

19

Replay mode

• Problem: finding a solution is time-consuming

• Automatically searches for a solution

– No user input needed

• Speculative execution provides isolation

– User continues foreground task

– AutoBash runs replay mode in background

(20)

(1) Initial predicate testing:

• Tracks input set for each predicate

• Determines passed/failed predicates S2

S1 S0

How replay mode works

P0 P1 P2 P3 P4

Predicate Database Solution Database

S0 S1 S2 S3 S4 S5

P0 P1 P2 P3 P4

P0 P1 P2 P3 P4

(21)

21

(2) Solution execution:

• Speculatively executes a solution

• Tracks solution output set S2

S1 S0

How replay mode works

P0 P1 P2 P3 P4

Predicate Database Solution Database

S0 S1 S2 S3 S4 S5

P0 P1 P2 P3 P4

(22)

S0 (3) Verifying solution:

• Calculates intersection

• Runs predicates with intersection

P0 P2 S2

S1

How replay mode works

P0 P1 P2 P3 P4

Predicate Database Solution Database

S0 S1 S2 S3 S4 S5

P0 P1 P2 P3 P4

Predicate fails

(23)

23

P0 P2 S2

S1 S0

How replay mode works

P0 P1 P2 P3 P4

Predicate Database Solution Database

S0 S1 S2 S3 S4 S5

P0 P1 P2 P3 P4

Discards solution with no intersection

(24)

P1 P3 P4 P0 P2 P0 P2 (4) Regression tests:

• Calculates intersection

• Runs predicates affected by solution S2

S1 S0

How replay mode works

P0 P1 P2 P3 P4

Predicate Database Solution Database

S0 S1 S2 S3 S4 S5

P0 P1 P2 P3 P4

P0 P1 P2 P3 P4

Predicates pass Predicate passes

(25)

25

• Speculative execution provides safety

• Causality analysis provides speed S2

S1 S0

P0 P2

How replay mode works

P0 P1 P2 P3 P4

Predicate Database Solution Database

S0 S1 S2 S3 S4 S5

P0 P1 P2 P3 P4

P1 P3 P4

P0 P1 P2 P3 P4

Predicate passes S2

(26)

Health monitoring mode

• Periodically executes all predicates

• If any predicate fails, AutoBash

– Runs replay mode to search for a solution

– Reports to the user to run observation mode

(27)

27

Outline

• Motivation

• AutoBash Design and Implementation

– Observation mode – Replay mode

– Health monitoring mode

• Evaluation

• Conclusion

(28)

Evaluation

• Questions:

– What is the overhead of speculative execution?

– How effective is causality analysis?

• Methodology:

– Evaluated CVS, gcc cross compiler, web server – Manually created 10 bugs and 10 solutions

– Manually created 5-8 predicates

(29)

29

0 20 40 60

Bug

Time (seconds)

Predicate re-testing Solution execution

Initial predicate testing

Total replay time (GCC)

Without speculative execution With speculative execution

 Speculative execution overhead is negligible

1 2 3 4 5 6 7 8 9 10

(30)

0 20 40 60

Bug

Time (seconds)

Predicate re-testing Solution execution

Initial predicate testing

Total replay time (GCC)

 Causal analysis improves predicate re-testing time by 67-99%

Without causality analysis With causality analysis

1 2 3 4 5 6 7 8 9 10

(31)

31

Conclusion

• Configuration management is frustrating

• AutoBash automates most tedious parts

• Speculative execution makes AutoBash safe

• Causality analysis makes AutoBash fast

(32)

Questions?

• Supported by

參考文獻

相關文件

The algorithms have potential applications in several ar- eas of biomolecular sequence analysis including locating GC-rich regions in a genomic DNA sequence, post-processing

• A cell array is a data type with indexed data containers called cells, and each cell can contain any type of data. • Cell arrays commonly contain either lists of text

– Each listener may respond to a different kind of  event or multiple listeners might may respond to event, or multiple listeners might may respond to 

Dennis Ritchie Brian Kernighan Douglas McIlroy Michael Lesk Joe Ossanna.. Multitasking and multi-user OS

Abstract—We propose a multi-segment approximation method to design a CMOS current-mode hyperbolic tangent sigmoid function with high accuracy and wide input dynamic range.. The

FMEA, fail mode and effective analysis, which is one of a common method to analysis and find out the fail mode of the product is to dig out the unobservable problem or hidden

Failure Mode and Effects Analysis (Failure Modes and Effects Analysis, FMEA) is used to analyze the product / system, the potential failure modes, identify potential trouble spots

This research is to integrate PID type fuzzy controller with the Dynamic Sliding Mode Control (DSMC) to make the system more robust to the dead-band as well as the hysteresis