148
ENABLING AND SUPPORTING THE DEBUGGING OF SOFTWARE FAILURES Thesis Defense James Clause

Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ENABLING AND SUPPORTING THE DEBUGGING

OF SOFTWARE FAILURES

Thesis Defense

James Clause

Page 2: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DEFINITIONS‣ mistake: a human action that

produces an incorrect result

‣ fault: an incorrect step, process, or data definition in a computer program

‣ failure: the inability of a system or component to perform its required functions within specified requirements

Debugging

Page 3: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DEBUGGING IS EXPENSIVE

Page 4: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

• “...departments tend to spend about half of their applications staff time on maintenance” – Lientz and Swanson, 1981

DEBUGGING IS EXPENSIVE

Page 5: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

• “...departments tend to spend about half of their applications staff time on maintenance” – Lientz and Swanson, 1981

• “Boehm, Brooks, Myers, and Yourdon and Constantine indicate that testing and debugging alone represent approximately half the cost of new system development.” – Vessey, 1985

DEBUGGING IS EXPENSIVE

Page 6: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

• “...departments tend to spend about half of their applications staff time on maintenance” – Lientz and Swanson, 1981

• “Boehm, Brooks, Myers, and Yourdon and Constantine indicate that testing and debugging alone represent approximately half the cost of new system development.” – Vessey, 1985

• “According to an informal industry poll, 85 to 90 percent of the IS [Information Services] budget goes to legacy system operation and maintenance.” – Erlikh, 2000

DEBUGGING IS EXPENSIVE

Page 7: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

• “...departments tend to spend about half of their applications staff time on maintenance” – Lientz and Swanson, 1981

• “Boehm, Brooks, Myers, and Yourdon and Constantine indicate that testing and debugging alone represent approximately half the cost of new system development.” – Vessey, 1985

• “According to an informal industry poll, 85 to 90 percent of the IS [Information Services] budget goes to legacy system operation and maintenance.” – Erlikh, 2000

• “...the national annual costs of an inadequate infrastructure for software testing is estimated to range from $22.2 to $59.5 billion” – NIST, 2002

DEBUGGING IS EXPENSIVE

Page 8: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

• “...departments tend to spend about half of their applications staff time on maintenance” – Lientz and Swanson, 1981

• “Boehm, Brooks, Myers, and Yourdon and Constantine indicate that testing and debugging alone represent approximately half the cost of new system development.” – Vessey, 1985

• “According to an informal industry poll, 85 to 90 percent of the IS [Information Services] budget goes to legacy system operation and maintenance.” – Erlikh, 2000

• “...the national annual costs of an inadequate infrastructure for software testing is estimated to range from $22.2 to $59.5 billion” – NIST, 2002

• “24,191 people … were involved in either opening, handling, commenting on, or resolving Windows Vista bugs. That is an order of magnitude greater than the ∼2,000 developers who wrote code for Vista” – Guo, 2010

DEBUGGING IS EXPENSIVE

Page 9: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

THESIS STATEMENT

Program analysis techniques can enable and support the debugging of failures in widely-used applications by:1) capturing, replaying, minimizing, and, as much

as possible, anonymizing failing executions2) highlighting subsets of failure-inducing inputs

that are likely to be helpful for debugging such failures

Page 10: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONS

Page 11: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Page 12: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input minimization✘

Page 13: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Page 14: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Page 15: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Enable

Page 16: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Support

Enable

Page 17: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Support

Enable

Page 18: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MOTIVATION

Page 19: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MOTIVATION

Page 20: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MOTIVATION

Page 21: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MOTIVATION

Page 22: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MOTIVATION

Failures can be difficultto reproduce.

Page 23: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ENVIRONMENT INTERACTIONS

Page 24: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ENVIRONMENT INTERACTIONSS

tre

am

s

Page 25: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ENVIRONMENT INTERACTIONSS

tre

am

s File

s

Page 26: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

LIMITATIONSNot applicable in every situation

Page 27: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

LIMITATIONS

• May not be enough space to store accessed data

• databases• long running executions

Not applicable in every situation

Page 28: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

LIMITATIONS

• May not be enough space to store accessed data

• databases• long running executions

• May have unacceptable runtime overhead

• webservers, real-time applications

Not applicable in every situation

Page 29: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

LIMITATIONS

• May not be enough space to store accessed data

• databases• long running executions

• May have unacceptable runtime overhead

• webservers, real-time applications

Not applicable in every situation

Evaluation demonstrates that it can be useful for some common application types.

Page 30: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATION

Acceptable runtime overhead

Failures reproduced successfully

Page 31: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONPrototype implementation:

• maps libc function calls to interaction events

Subjects:• several cpu intensive applications

(e.g., bzip, gcc)

Results:• negligible overheads

• data size is acceptable• all failures successfully replayed

Page 32: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Support

Enable

Page 33: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PRACTICALITY ISSUES

Page 34: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

345

PRACTICALITY ISSUES

Large in size

Page 35: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

345345

PRACTICALITY ISSUES

Large in size Contain sensitiveinformation

Page 36: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

345345

PRACTICALITY ISSUES

Large in size Contain sensitiveinformation

Minimize

Highlight

Page 37: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

345345

PRACTICALITY ISSUES

Large in size Contain sensitiveinformation

AnonymizeMinimize

Highlight

Page 38: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Support

Enable

Page 39: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MINIMIZATION✘

24:15

Page 40: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MINIMIZATION✘

�Time

minimization 2:5524:15

Page 41: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MINIMIZATION✘

✂Data

minimization 2:55

�Time

minimization 2:5524:15

Page 42: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

MINIMIZATION✘

✂Data

minimization 2:55

�Time

minimization 2:5524:15

Oracle Oracle

Page 43: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TIME MINIMIZATIONEvent log:

Environment data (streams):KEYBOARD: {5680}hello ❙ {4056}c ❙ {300}...

NETWORK: {3405}<html><body>... ❙ {202}...

FILE foo.1POLL KEYBOARD NOKPOLL KEYBOARD OKPULL KEYBOARD 5POLL NETWORK OKPULL NETWORK 1024FILE bar.1POLL NETWORK NOKPOLL NETWORK OKFILE foo.2...PULL NETWORK 1024FILE foo.2POLL KEYBOARD NOK...

Page 44: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TIME MINIMIZATIONEvent log:

Environment data (streams):KEYBOARD: {5680}hello ❙ {4056}c ❙ {300}...

NETWORK: {3405}<html><body>... ❙ {202}...

FILE foo.1POLL KEYBOARD NOKPOLL KEYBOARD OKPULL KEYBOARD 5POLL NETWORK OKPULL NETWORK 1024FILE bar.1POLL NETWORK NOKPOLL NETWORK OKFILE foo.2...PULL NETWORK 1024FILE foo.2POLL KEYBOARD NOK...

Remove idle time

Page 45: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TIME MINIMIZATIONEvent log:

Environment data (streams):KEYBOARD: {5680}hello ❙ {4056}c ❙ {300}...

NETWORK: {3405}<html><body>... ❙ {202}...

FILE foo.1POLL KEYBOARD NOKPOLL KEYBOARD OKPULL KEYBOARD 5POLL NETWORK OKPULL NETWORK 1024FILE bar.1POLL NETWORK NOKPOLL NETWORK OKFILE foo.2...PULL NETWORK 1024FILE foo.2POLL KEYBOARD NOK...

Remove idle time

Page 46: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TIME MINIMIZATIONEvent log:

Environment data (streams):KEYBOARD: {5680}hello ❙ {4056}c ❙ {300}...

NETWORK: {3405}<html><body>... ❙ {202}...

FILE foo.1POLL KEYBOARD NOKPOLL KEYBOARD OKPULL KEYBOARD 5POLL NETWORK OKPULL NETWORK 1024FILE bar.1POLL NETWORK NOKPOLL NETWORK OKFILE foo.2...PULL NETWORK 1024FILE foo.2POLL KEYBOARD NOK...

Remove idle time

Remove delays

Page 47: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TIME MINIMIZATIONEvent log:

Environment data (streams):KEYBOARD: {5680}hello ❙ {4056}c ❙ {300}...

NETWORK: {3405}<html><body>... ❙ {202}...

FILE foo.1POLL KEYBOARD NOKPOLL KEYBOARD OKPULL KEYBOARD 5POLL NETWORK OKPULL NETWORK 1024FILE bar.1POLL NETWORK NOKPOLL NETWORK OKFILE foo.2...PULL NETWORK 1024FILE foo.2POLL KEYBOARD NOK...

Remove idle time

Remove delays

Page 48: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

foo.1 foo.2 bar.1

Whole entities

Chunks

Atoms

Page 49: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

foo.2 bar.1

Lorem ipsum dolor sitamet, consetetursadipscing elitr,seddiam nonumy eirmodtempor invidunt utlabore et dolore magna aliquyamerat, sed diam voluptua. At vero

eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 50: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

foo.2 bar.1

Lorem ipsum dolor sitamet, consetetursadipscing elitr,seddiam nonumy eirmodtempor invidunt utlabore et dolore magna aliquyamerat, sed diam voluptua. At vero

eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 51: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

foo.2 bar.1

Whole entities

Chunks

Atoms

Page 52: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

Lorem ipsum dolor sitamet, consetetursadipscing elitr,seddiam nonumy eirmodtempor invidunt utlabore et dolore magna aliquyamerat, sed diam voluptua. At vero

eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 53: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

Lorem ipsum dolor sitamet, consetetursadipscing elitr,seddiam nonumy eirmodtempor invidunt utlabore et dolore magna aliquyamerat, sed diam voluptua. At vero

eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 54: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

Lorem ipsum dolor sitamet, consetetursadipscing elitr,seddiam nonumy eirmodtempor invidunt utlabore et dolore magna aliquyamerat, sed diam voluptua. At vero

eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 55: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

Lorem ipsum dolor sitamet, consetetursadipscing elitr,seddiam nonumy eirmodtempor invidunt utlabore et dolore magna aliquyamerat, sed diam voluptua. At vero

eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 56: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 57: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et

Whole entities

Chunks

Atoms

Page 58: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

Whole entities

Chunks

Atomssadipscing elitr, eirmod invidunt ut labore dolore magna erat, voluptua.

Page 59: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

bar.1

Whole entities

Chunks

Atoms

sadipscing elitr, eirmod invidunt ut labore dolore magna erat, voluptua.

foo.2

Page 60: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

DATA MINIMIZATION

Environment data (files):

Whole entities

Chunks

Atoms

sadipscing elitr, eirmod invidunt ut labore dolore magna erat, voluptua.

foo.2

Page 61: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ANALYSIS

Page 62: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ANALYSIS

1. Original and minimized executions produce the same failure

2. Minimized execution is not larger than the original execution

(assuming a correct oracle)

Correctness

Page 63: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ANALYSIS

1. Original and minimized executions produce the same failure

2. Minimized execution is not larger than the original execution

(assuming a correct oracle)

Correctness

polynomial in the size of the captured data(assuming delta debugging)

Worst case performance

Page 64: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONCan the technique produce, in a reasonable amount of time, minimized executions that can be used to debug the original failure?

Page 65: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONCan the technique produce, in a reasonable amount of time, minimized executions that can be used to debug the original failure?

Pine email and news client• two real field failures• 20 failing executions, 10 per failure

Page 66: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONCan the technique produce, in a reasonable amount of time, minimized executions that can be used to debug the original failure?

Pine email and news client• two real field failures• 20 failing executions, 10 per failure

Minimized executions generated by• randomly generating interaction scripts• manually performing the scripts (while recording)• minimizing the captured executions

Page 67: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RESULTSHeader-color fault Address book fault

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

# entities streams size files sizeAve

rage

val

ue a

fter

min

imiz

atio

n

Page 68: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RESULTSHeader-color fault Address book fault

Results are likely to be conservative; recorded executionsonly contain the minimal amount of data needed to perform an action.

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

# entities streams size files sizeAve

rage

val

ue a

fter

min

imiz

atio

n

Page 69: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RESULTSHeader-color fault Address book fault

Results are likely to be conservative; recorded executionsonly contain the minimal amount of data needed to perform an action.

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

# entities streams size files sizeAve

rage

val

ue a

fter

min

imiz

atio

n

Inputs can be minimized in a reasonable amount of time (less then 75 minutes)

Page 70: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Support

Enable

Page 71: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Sensitiveinput (I) that causes F

Input domain

ANONYMIZATION

Page 72: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Sensitiveinput (I) that causes F

Input domainInputs that

cause F

ANONYMIZATION

Page 73: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Sensitiveinput (I) that causes F

Input domainInputs that

cause F

ANONYMIZATION

Anonymizedinput (I’) that also causes F

Page 74: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Inputs that satisfyF’s path condition Sensitive

input (I) that causes F

Input domainInputs that

cause F

ANONYMIZATION

Anonymizedinput (I’) that also causes F

Page 75: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PATH CONDITION GENERATION

Path condition: set of constraints on a program’s inputs that encode the conditions necessary for a

specific path to be executed.

Page 76: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

Page 77: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

Page 78: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0

Page 79: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0(sensitive)

Page 80: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

Symbolic State:

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0(sensitive)

Page 81: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

Symbolic State:

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

(sensitive)

Page 82: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

Symbolic State:

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

(sensitive)

Page 83: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

(sensitive)

Page 84: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

(sensitive)

Page 85: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

a→i1*2

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

(sensitive)

Page 86: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

a→i1*2

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

(sensitive)

Page 87: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

a→i1*2

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

∧ i2+i1*2 > 10

(sensitive)

Page 88: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

a→i1*2

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

∧ i2+i1*2 > 10

(sensitive)

Page 89: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Path Condition:

i1 <= 5

Symbolic State:

a→i1*2

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

PATH CONDITION GENERATION

5 3 0x→i1y→i2z→i3

∧ i2+i1*2 > 10∧ i3 == 0

(sensitive)

Page 90: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Page 91: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Page 92: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Page 93: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0 i1 == 5

i2 == 3i3 == 0

Page 94: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0 i1 == 5

i2 == 3i3 == 0

boolean foo(int x, int y, int z) { if(x <= 5) { int a = x * 2; if(y + a > 10) { if(z == 0) { return true; } } } return false;}

5 3 0

Page 95: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Page 96: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Input Constraints:

i1 != 5∧ i2 != 3∧ i3 != 0

Page 97: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Input Constraints:

i1 != 5∧ i2 != 3∧ i3 != 0

(breakable)

Page 98: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Input Constraints:

i1 != 5∧ i2 != 3∧ i3 != 0

(breakable)

Page 99: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

ConstraintSolver

CHOOSING ANONYMIZED INPUTS

Path Condition:

i1 <= 5∧ i2+i1*2 > 10∧ i3 == 0

Input Constraints:

i1 != 5∧ i2 != 3∧ i3 != 0

i1 == 4i2 == 10i3 == 0

(breakable)

Page 100: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PATH CONDITION RELAXATIONSensitiveinput (I) that causes F

Input domain

Page 101: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PATH CONDITION RELAXATIONSensitiveinput (I) that causes F

Input domain

Page 102: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PATH CONDITION RELAXATIONSensitiveinput (I) that causes F

Input domain

Page 103: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PATH CONDITION RELAXATIONSensitiveinput (I) that causes F

Input domain

Page 104: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

PATH CONDITION RELAXATIONSensitiveinput (I) that causes F

Input domain

Page 105: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONFeasibilityCan the approach generate, in a reasonable amount of time, anonymized inputs that reproduce the failure?

StrengthHow much information about the original inputs is revealed?

EffectivenessAre the anonymized inputs safe to send to developers?

Page 106: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

SUBJECTS

• Columba: 1 fault• htmlparser: 1 fault

• Printtokens: 2 faults• NanoXML: 16 faults

(20 faults, total)

Page 107: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

SUBJECTS

• Columba: 1 fault• htmlparser: 1 fault

• Printtokens: 2 faults• NanoXML: 16 faults

Select sensitive failure-inducing inputs• manually generated or included with subject• several 100 bytes to 5MB in size

(20 faults, total)

Page 108: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

SUBJECTS

• Columba: 1 fault• htmlparser: 1 fault

• Printtokens: 2 faults• NanoXML: 16 faults

Select sensitive failure-inducing inputs• manually generated or included with subject• several 100 bytes to 5MB in size

(Assume all of each input is potentially sensitive)

(20 faults, total)

Page 109: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: FEASIBILITY

0

150

300

450

600

Exec

utio

n T

ime

(s)

0

5

10

15

20

colu

mba

html

pars

er

prin

ttok

ens

1

prin

ttok

ens

2

nano

xml

1

nano

xml

2

nano

xml

3

nano

xml

4

nano

xml

5

nano

xml

6

nano

xml

7

nano

xml

8

nano

xml

9

nano

xml

10

nano

xml

11

nano

xml

12

nano

xml

13

nano

xml

14

nano

xml

15

nano

xml

16

Solv

er T

ime

(s)

Page 110: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: FEASIBILITY

0

150

300

450

600

Exec

utio

n T

ime

(s)

0

5

10

15

20

colu

mba

html

pars

er

prin

ttok

ens

1

prin

ttok

ens

2

nano

xml

1

nano

xml

2

nano

xml

3

nano

xml

4

nano

xml

5

nano

xml

6

nano

xml

7

nano

xml

8

nano

xml

9

nano

xml

10

nano

xml

11

nano

xml

12

nano

xml

13

nano

xml

14

nano

xml

15

nano

xml

16

Solv

er T

ime

(s)

Inputs can be anonymized in a reasonable amount of time (easily done overnight)

Page 111: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Average % Bits Revealed Average % Residue

RQ2: STRENGTH

Page 112: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Average % Bits Revealed Average % Residue

RQ2: STRENGTH

Measures how many inputs that satisfy the path

condition

Littleinformation revealed

Page 113: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Average % Bits Revealed Average % Residue

RQ2: STRENGTH

Measures how many inputs that satisfy the path

condition

Lots ofinformation revealed

Page 114: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Average % Bits Revealed Average % Residue

RQ2: STRENGTH

Measures how many inputs that satisfy the path

condition

Measures how much of the anonymized input is identical

to the original input

AAAAAAsecretAAAAAA...

AAAAAA

BBBBBBsecretBBBBBB...

BBBBBB

I’

Lots ofinformation revealed

I

Page 115: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Average % Bits Revealed Average % Residue

RQ2: STRENGTH

Measures how many inputs that satisfy the path

condition

Measures how much of the anonymized input is identical

to the original input

AAAAAAsecretAAAAAA...

AAAAAA

BBBBBBsecretBBBBBB...

BBBBBB

I’

Lots ofinformation revealed

I

Page 116: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ2: STRENGTH

0

25

50

75

100

0

25

50

75

100

colu

mba

html

pars

er

prin

ttok

ens

1

prin

ttok

ens

2

nano

xml

1

nano

xml

2

nano

xml

3

nano

xml

4

nano

xml

5

nano

xml

6

nano

xml

7

nano

xml

8

nano

xml

9

nano

xml

10

nano

xml

11

nano

xml

12

nano

xml

13

neno

xml

14

nano

xml

15

nano

xml

16

Ave

rage

% B

its R

evea

led

Ave

rage

% R

esid

ue

Page 117: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ2: STRENGTH

0

25

50

75

100

0

25

50

75

100

colu

mba

html

pars

er

prin

ttok

ens

1

prin

ttok

ens

2

nano

xml

1

nano

xml

2

nano

xml

3

nano

xml

4

nano

xml

5

nano

xml

6

nano

xml

7

nano

xml

8

nano

xml

9

nano

xml

10

nano

xml

11

nano

xml

12

nano

xml

13

neno

xml

14

nano

xml

15

nano

xml

16

Ave

rage

% B

its R

evea

led

Ave

rage

% R

esid

ue

Anonymized inputs reveal, on average, between 60% (worst case) and 2% (best case) of the

information in the original inputs

Page 118: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ3: EFFECTIVENESSHTMLPARSER

<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>james clause @ gatech | home</title>

<style type="text/css" media="screen" title=""><!--/*--><![CDATA[<!--*/

body { margin: 0px;...

/*]]>*/--></style></head><body> ...</body>

Page 119: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ3: EFFECTIVENESSHTMLPARSER

<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>james clause @ gatech | home</title>

<style type="text/css" media="screen" title=""><!--/*--><![CDATA[<!--*/

body { margin: 0px;...

/*]]>*/--></style></head><body> ...</body>

Page 120: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ3: EFFECTIVENESSHTMLPARSER

<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>james clause @ gatech | home</title>

<style type="text/css" media="screen" title=""><!--/*--><![CDATA[<!--*/

body { margin: 0px;...

/*]]>*/--></style></head><body> ...</body>

The portions of the inputs that remain after anonymization tend to be structural in nature and

therefore are safe to send to developers

Page 121: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

TECHNICAL CONTRIBUTIONSRecording and

replaying executions

Input anonymization

Input minimization✘

Highlighting failure-relevant inputs

Support

Enable

Page 122: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

Foo512B

Bar1KB

Baz1.5GB

OVERVIEW

Page 123: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

1 Taint inputs

Foo512B

Bar1KB

Baz1.5GB

OVERVIEW

Page 124: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

1 Taint inputs

Foo512B

Bar1KB

Baz1.5GB

OVERVIEW123

456

789

0

Page 125: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

1 Taint inputs

2 Propagatetaint marks

Foo512B

Bar1KB

Baz1.5GB

OVERVIEW123

456

789

0

Page 126: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

1 Taint inputs

2 Propagatetaint marks

Foo512B

Bar1KB

Baz1.5GB

foo: 512 ... bar: 1024 ... baz: 150... total: 150...

OVERVIEW123

456

789

0

Page 127: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

1 Taint inputs

2 Propagatetaint marks

3 Identifyrelevant inputs

Foo512B

Bar1KB

Baz1.5GB

foo: 512 ... bar: 1024 ... baz: 150... total: 150...

OVERVIEW123

456

789

0

Page 128: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

1 Taint inputs

2 Propagatetaint marks

3 Identifyrelevant inputs

Foo512B

Bar1KB

Baz1.5GB

foo: 512 ... bar: 1024 ... baz: 150... total: 150...

OVERVIEW123

456

789

0

Page 129: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONStudy 1: Effectiveness for debugging real failures Study 2: Comparison with Delta Debugging

Page 130: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONStudy 1: Effectiveness for debugging real failures Study 2: Comparison with Delta Debugging

Application KLoC Fault locationbc 1.06 10.5 more_arrays : 177

gzip 1.24 6.3 get_istat : 828

ncompress 4.24 1.4 comprexx : 896

pine 4.44 239.1 rfc822_cat : 260

squid 2.3 69.9 ftpBuildTitleUrl : 1024

Subjects:

Page 131: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

EVALUATIONStudy 1: Effectiveness for debugging real failures Study 2: Comparison with Delta Debugging

Application KLoC Fault locationbc 1.06 10.5 more_arrays : 177

gzip 1.24 6.3 get_istat : 828

ncompress 4.24 1.4 comprexx : 896

pine 4.44 239.1 rfc822_cat : 260

squid 2.3 69.9 ftpBuildTitleUrl : 1024

Subjects:

We selected a failure-revealing input vector for each subject.

Page 132: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 1: EFFECTIVENESS

Is the information that Penumbra provides helpful for

debugging real failures?

Page 133: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 1 RESULTS: GZIP & NCOMPRESSCrash when a file name is longer than 1,024 characters.

Page 134: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 1 RESULTS: GZIP & NCOMPRESS

Contents&

Attributes

Contents&

Attributes

bar

Contents&

Attributes

foo./gzip

Crash when a file name is longer than 1,024 characters.

# Inputs: 10,000,056

longfile name[ ]

Page 135: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 1 RESULTS: GZIP & NCOMPRESS

Contents&

Attributes

Contents&

Attributes

bar

Contents&

Attributes

foo./gzip

Crash when a file name is longer than 1,024 characters.

# Inputs: 10,000,056 # Relevant (DF): 1

longfile name[ ]

Page 136: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 1 RESULTS: GZIP & NCOMPRESS

Contents&

Attributes

Contents&

Attributes

bar

Contents&

Attributes

foo./gzip

Crash when a file name is longer than 1,024 characters.

# Relevant (DF + CF): 3# Inputs: 10,000,056 # Relevant (DF): 1

longfile name[ ]

Page 137: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 1: CONCLUSIONS1. Data-flow propagation is always effective,

data- and control-flow propagation is sometimes effective.

➡ Use data-flow propagation first then, if necessary, use control-flow propagation.

2. Highlighted inputs correspond to the failure conditions.

➡ Our technique is effective in assisting the debugging of real failures.

Page 138: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

STUDY 2: COMPARISON WITHDELTA DEBUGGING

RQ1: How much manual effort does each technique require?

RQ2: How long does it take to fix a considered failure given the information provided by

each technique?

Page 139: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: MANUAL EFFORTUse setup-time as a proxy for manual (developer) effort.

Page 140: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: MANUAL EFFORTUse setup-time as a proxy for manual (developer) effort.

5,400

12,600

1,8001,8001259731470163

ncompress bc pine

Setu

p-tim

e (s

)

gzip

PenumbraDelta Debugging

squid

Page 141: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: MANUAL EFFORTUse setup-time as a proxy for manual (developer) effort.

5,400

12,600

1,8001,8001259731470163

ncompress bc pine

Setu

p-tim

e (s

)

gzip

PenumbraDelta Debugging

squid

Page 142: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: MANUAL EFFORTUse setup-time as a proxy for manual (developer) effort.

5,400

12,600

1,8001,8001259731470163

ncompress bc pine

Setu

p-tim

e (s

)

gzip

PenumbraDelta Debugging

squid

Page 143: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ1: MANUAL EFFORTUse setup-time as a proxy for manual (developer) effort.

5,400

12,600

1,8001,8001259731470163

ncompress bc pine

Setu

p-tim

e (s

)

gzip

PenumbraDelta Debugging

squidPenumbra requires considerably less setup time than Delta Debugging

(although more time time overall for gzip and ncompress).

Page 144: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ2: DEBUGGING EFFORTUse number of relevant inputs as a proxy for debugging effort.

Page 145: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ2: DEBUGGING EFFORT

Subject PenumbraPenumbra Delta DebuggingDF DF + CF

bc 209 743 285

gzip 1 3 1

ncompress 1 3 1

pine 26 15,100,344 90

squid 89 2,056 —

Use number of relevant inputs as a proxy for debugging effort.

Page 146: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ2: DEBUGGING EFFORT

Subject PenumbraPenumbra Delta DebuggingDF DF + CF

bc 209 743 285

gzip 1 3 1

ncompress 1 3 1

pine 26 15,100,344 90

squid 89 2,056 —

Use number of relevant inputs as a proxy for debugging effort.

• Penumbra (DF) is comparable to (slightly better than) Delta Debugging.

Page 147: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

RQ2: DEBUGGING EFFORT

Subject PenumbraPenumbra Delta DebuggingDF DF + CF

bc 209 743 285

gzip 1 3 1

ncompress 1 3 1

pine 26 15,100,344 90

squid 89 2,056 —

Use number of relevant inputs as a proxy for debugging effort.

• Penumbra (DF) is comparable to (slightly better than) Delta Debugging.

• Penumbra (DF + CF) is likely less effective for bc, pine, and squid

Page 148: Enabling and Supporting the Debugging of Software Failures (PhD Defense)

CONCLUSIONS

Program analysis techniques can enable and support the debugging of failures in widely-used applications by:1) capturing, replaying, minimizing, and, as much

as possible, anonymizing failing executions2) highlighting subsets of failure-inducing inputs

that are likely to be helpful for debugging such failures