replaying and isolating failing multi object interactions
play

Replaying and Isolating Failing Multi-Object Interactions Martin - PowerPoint PPT Presentation

Replaying and Isolating Failing Multi-Object Interactions Martin Burger Andreas Zeller Saarland University e-mail client written in Java 100,200 LOC ~ 1,600 Java classes 17 developers Actively developed from February


  1. Replaying and Isolating Failing Multi-Object Interactions Martin Burger • Andreas Zeller Saarland University

  2. • e-mail client written in Java • 100,200 LOC • ~ 1,600 Java classes • 17 developers • Actively developed from February 2001 to August 2007

  3. Debugging 101 1. reproduce the original failure - manually by using GUI - test driver that reproduce faulty behavior

  4. Debugging 101 1. reproduce the original failure - manually by using GUI - test driver that reproduce faulty behavior 2. fix the actual defect - focus on relevant behavior - simplify faulty behavior

  5. Faulty Component Behavior component application set of classes

  6. Faulty Component Behavior crosses border interaction - method calls - field accesses - exception flow - ... component application set of classes

  7. Faulty Component Behavior crosses border interaction - method calls - field accesses - exception flow - ... failure component application set of classes

  8. Reproducing component

  9. Reproducing 1. interaction component

  10. Reproducing 1. interaction 2. … component computes in component the same way

  11. Reproducing 1. interaction 3. … failure reproduced 2. … component computes in component the same way

  12. Simplifying

  13. Simplifying many interactions

  14. Simplifying many replaying causes original failure interactions

  15. Simplifying replaying causes minimal set of original failure interactions

  16. Simplifying delta debugging binary search replaying causes minimal set of original failure interactions

  17. Implementation: JINSI • debugging tool to reproduce and simplify failing components in Java programs • reproduce capture and replay of interactions at component level • simplify delta debugging minimizes interactions Isolating Relevant Component Interactions with JINSI. Orso + Joshi + Burger + Zeller WODA 2006

  18. Original Import Run address book importer (GUI) Columba

  19. Capture address book importer (GUI) Columba JINSI instrumentation

  20. Capture address book “incoming call” importer (GUI) - method name - arguments Columba JINSI event log instrumentation written to

  21. Replay address book importer (GUI) Columba

  22. Replay address book importer (GUI) JINSI replaces Columba

  23. Replay address book importer (GUI) JINSI replaces Columba event log read from

  24. Replay original failure reproduced address book importer (GUI) JINSI replaces Columba event log read from

  25. Delta Debugging address book importer (GUI) JINSI event log uses delta debugging

  26. Delta Debugging AddressbookImporter() address book importer (GUI) JINSI event log uses delta debugging

  27. Delta Debugging AddressbookImporter() init(file) address book importer (GUI) JINSI event log uses delta debugging

  28. Delta Debugging AddressbookImporter() init(file) wizardFinished() address book importer (GUI) JINSI event log uses delta debugging

  29. Delta Debugging AddressbookImporter() Problem - already minimal init(file) - too high level Solution wizardFinished() address book - much finer grained importer (GUI) JINSI event log uses delta debugging

  30. Inside the Component coarse grained view black box (JINSI 2006)

  31. Object Interactions object finer grained view

  32. Object Interactions object finer grained view

  33. Object Interactions object finer grained view

  34. Object Interactions object finer grained view

  35. Object Interactions border crossing captured interactions are by JINSI captured by JINSI 2006 captured by JINSI event log

  36. Object Interactions all object interactions are captured by JINSI 2008

  37. Object Trace all object interactions are captured by JINSI 2008 event log object trace for all objects

  38. Importing the Addresses Object Trace ContactModel() setSortString() setFormattedName() addressbook. setNickName() model setFamilyName() (19 classes) • • • 49,849 more JINSI

  39. Importing the Addresses Object Trace ContactModel() setSortString() setFormattedName() addressbook. calling setNickName() model delta debugging: setFamilyName() (19 classes) • > 2 hours • • 49,849 more JINSI

  40. Object Slice • dynamic backward slice: subset that may have influenced a specific object • focuses on objects, not on statements • objects are a natural abstraction

  41. Object Interactions

  42. Object Interactions suspicious object

  43. Object Slice at first, include suspicious object suspicious object

  44. Object Slice include interacting objects

  45. Object Slice include objects that interact with those already in slice

  46. Object Slice stop when reached largest connected graph

  47. Object Slice simplified set of failure-inducing interactions within the component

  48. Object Slice simplified set of failure-inducing interactions within the component

  49. Importing Addresses Object Slice ContactModel() setGivenName() setFamilyName() addressbook. setSortString() model getSortString() (19 classes) getGivenName() getPreferredEmail() JINSI

  50. Delta Debugging apply delta debugging to object slice

  51. Delta Debugging minimized set of failure-inducing interactions within the component original failure

  52. Importing Addresses Delta Debugging ContactModel() addressbook. model (19 classes) getPreferredEmail() JINSI

  53. Slicing + Delta Debugging Incoming Interactions > 2 hours delta debugging 2 minimized 49,855 original run

  54. Slicing + Delta Debugging Incoming Interactions > 2 hours delta debugging 2 minimized 49,855 7 object slice original run simplified

  55. Slicing + Delta Debugging Incoming Interactions > 2 hours delta debugging 2 minimized 49,855 7 object slice delta debugging 2 minimized original run simplified

  56. Slicing + Delta Debugging Incoming Interactions > 2 hours delta debugging 2 minimized 49,855 < 1 min 7 object slice delta debugging 2 minimized original run simplified

  57. Slicing + Delta Debugging Incoming Interactions > 2 hours delta debugging 2 minimized 49,855 < 1 min < 1 min 7 object slice delta debugging 2 minimized original run simplified

  58. Method from Minimal Trace public String getPreferredEmail() { Iterator it = getEmailIterator(); // get first item IEmailModel model = (IEmailModel) it.next(); // backwards compatiblity -> its not possible // anymore to create a model without email if (model == null) return null; return model.getAddress(); }

  59. Method from Minimal Trace public String getPreferredEmail() { Iterator it = getEmailIterator(); // get first item IEmailModel model = (IEmailModel) it.next(); // backwards compatiblity -> its not possible // anymore to create a model without email if (model == null) return null; return model.getAddress(); }

  60. Method from Minimal Trace public String getPreferredEmail() { Iterator it = getEmailIterator(); // get first item IEmailModel model = null; IEmailModel model = (IEmailModel) it.next(); if (it.hasNext()) model = (IEmailModel) it.next(); // backwards compatiblity -> its not possible // anymore to create a model without email if (model == null) return null; return model.getAddress(); }

  61. Related Work • Test Factoring David Saff et al. Selective Capture-Replay Shrinivas Joshi et al. JINSI is based on these methods • Efficient Test Case Minimization Andreas Leitner et al. method calls in random tests; static slicing • ReCrash Shay Artzi et al. • ReCrash focuses on stack trace • JINSI focuses on object interactions

  62. Future Work failing but not defective component application

  63. Future Work failing but not defective component application

  64. Future Work when observing failing application: but not defective too many component application interactions

  65. Future Work failing but not defective component application

  66. Future Work failing but not defective component application

  67. Future Work Cause-Effect-Chain final state e.g. contact model

  68. Future Work Cause-Effect-Chain intermediate states final state e.g. contact model

  69. Future Work Cause-Effect-Chain input intermediate states final state e.g. keystrokes e.g. contact model in GUI

  70. Future Work Capture Component Level JINSI captures component component interaction application event log

  71. Future Work Replay Component Level component component JINSI replays component interaction... event log

  72. Future Work Replay Component Level component JINSI replays component interaction... event log

  73. Future Work Replay Component + Capture Objects ... and captures object interactions object for all objects trace component JINSI replays component interaction... event log

  74. Challenges • capture constructors - super call - constructor call as argument • who is calling - caller registry to get caller of method

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend