a concurrency agnostic debugger
play

: A Concurrency-Agnostic Debugger An Example for Domain-Specific - PowerPoint PPT Presentation

: A Concurrency-Agnostic Debugger An Example for Domain-Specific Online Debugging C. Torres Lopez S. Marr D. Aumayr H. Mssenbck E. Gonzalez Boix IFIP WG 2.11, July 17-20, 2017, Koblenz What am I doing? A simple VM for all


  1. Κόμπος : A Concurrency-Agnostic Debugger An Example for Domain-Specific Online Debugging C. Torres Lopez S. Marr D. Aumayr H. Mössenböck E. Gonzalez Boix IFIP WG 2.11, July 17-20, 2017, Koblenz

  2. What am I doing? A simple VM for all Making dynamic Combining concurrency models languages fast, easily! Concurrency Models (incl. metaobject actors, CSP, STM, protocols) fork/join, data flow, threads+locks, … Ownership-based Meta-Tracing vs. Tooling/Debugging metaobject protocol Par;al Evalua;on 2

  3. ENIAC's main control panel, U. S. Army Photo For a brief bit of history: ENIAC’s recessive gene Marcus Mitch, and Akera Atsushi. Penn Printout (March 1996) h_p://www.upenn.edu/compu`ng/printout/archive/v12/4/pdf/gene.pdf

  4. Decades of Research and Solu`ons for “ Everything” 4

  5. But no Silver Bullet Actors CSP Locks, Monitors, … Fork/Join Transac;onal Memory Data Flow … 5

  6. In Prac`ce: Concurrency Abstrac`ons are Combined • Uses Locks and Atomic* • Mul`ple async. future/ > 4500 “deadlock” bugs task abstrac`ons > 530 “race condi`on” bugs • Mul`ple ‘transac`on’ systems Study on Scala: S. Tasharofi, P. Dinges, and R. E. Johnson. Why Do Scala Developers Mix the Actor Model with other Concurrency Models? In Proc. of ECOOP, volume 7920 of LNCS, pages 302–326. Springer, 2013. 6

  7. I want to reason about actors, fork/join tasks, transac`ons … And not some implementa`on-level shared memory HOW TO DEBUG SUCH SYSTEMS? 7

  8. Demo of Kómpos 8

  9. Custom Debugger Features Stepping Opera`ons Breakpoints Sequen`al 1 5 Generic 4 2 Actors 6 5 CSP 4 2 STM 3 3 Threads&Locks 4 2 22 19 (not intended to be complete)

  10. Debugger Architecture Debugger Interpreter Frontend Debugger Protocol 10

  11. Kómpos Architecture Actors Threads CSP … STM F/J Kómpos Debugger SOM NS Debugger Protocol Interpreter (Web Socket, JSON) Java, Truffle+Graal 11

  12. Kómpos Architecture Actors Threads Breakpoint CSP … 22 Breakpoint Support STM Types F/J Stepping 19 Stepping Kómpos Support Opera`ons Debugger SOM NS Visualiza`ons Debugger Protocol Interpreter Various Support (Web Socket, JSON) Visualiza`ons Java, Truffle+Graal How to Abstract from Concurrency Models? 12

  13. A Concurrency-Agnos`c Debugger Protocol THE KÓMPOS PROTOCOL 13

  14. Abstract from Concurrency Models • Breakpoint Types • Stepping Opera`ons Actors Threads • Ac`vity Types, Dynamic scopes Breakpoint CSP … Support STM F/J Stepping Kómpos Support Debugger SOM NS Debugger Interface Visualiza`ons Interpreter Support (Web Socket, JSON) • Interac`ons modeled via data • Debugger agnos`c of concepts 14

  15. What’s a Breakpoint? message send message receive promise resolver promise resolu`on prom := aResult <-: get. • Name/Type • Source Loca`ons Truffle AST § Iden`fied by Source Tags Var Write Send Debugger Requirements #get MsgSendTag § Annotated AST Var Read 15

  16. What’s a Stepping Opera`on? Step into Step over Return Step to Receiver Step to Promise Resolver • Name/Type Step to Promise Resolu`on prom := • Source Loca`ons aResult <-: get. – Iden`fied by Source Tags • Current Type of Ac`vity – Actor, Process, Fork/Join Task, Thread • Current Dynamic Scope – Held Monitor, Transac`on 16

  17. Kómpos Protocol Metadata EntityType id: typeId name: string ActivityType DynamicScopeType icon: string BreakpointType SteppingType name: string name: string label: string label: string applicableTo: Tag[] applicableTo: Tag[] activities: ActivityType[] scopes: DynamicScopeType[] 17

  18. Kómpos Protocol Messages Source BreakpointUpdate URI: URI location: Coord sourceText: string type: BreakpointType locations: TaggedCoord[] Stopped Step activityId: id activityId: id location: Coord type: SteppingType actType: ActivityType scopes: DynamicScopeType[] 18

  19. Example for Transac`ons before transac`on to int: {BreakpointUpdate, before commit loc: 1:1:6, awer commit tags: Atomic type: beforeCommit} atomic { from int: {Stopped, int b = this.fieldB; actId: 1, this.fieldA = b + 1; loc: 3:3:20, scopes: [tx]} } resume to int: {Step, step next actId: 1, step over type: afterCommit} before commit awer commit scopes: tx 19

  20. How concurrency-agnos`c is the protocol design? EVALUATION 20

  21. Implemented Interac`ons No changes to frontend required! Stepping Opera`ons Breakpoints Sequen`al 1 5 Generic 4 2 Actors 6 5 CSP 4 2 STM 3 3 Threads&Locks 4 2 22 19 (not intended to be complete)

  22. CONCLUSION 22

  23. Too many Concepts, Too many Varia`ons 18/07/17 23

  24. Solu`on: Model Domain with Metadata • Breakpoint Types • Stepping Opera`ons Actors Threads • Ac`vity Types, Dynamic Scopes Breakpoint … CSP Support STM F/J Stepping Kómpos Support Debugger SOM NS Visualiza`ons Debugger Interface Interpreter Support (Web Socket, JSON) 24

  25. Paper Deadline: 14 August 2017 Workshop Proposals: 1 October 2017 25

  26. Kómpos: Plaxorm for Debugging Complex Concurrent Applica`ons • Concurrent Debugger – Concept-agnos`c • Visualiza`on, Breakpoints, Stepping, Tracing • Replay, Asser`ons, … • For Actors, CSP, Fork/Join, STM, Locks&Threads, … 26

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