Source Level Debugging of Parallel Programs Roland Wismüller LRR-TUM, TU München Germany.

Slides:



Advertisements
Similar presentations
Purdue University Center for Education and Research in Information Assurance and Security Building a distributed intrusion detection system with Perl Diego.
Advertisements

Włodzimierz Funika, Marcin Białek, Piotr Pęgiel, Marcin Smętek Institute of Computer Science AGH, Mickiewicza 30, Kraków, Poland A Case Study of.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Speeding it up Part 3: Out-Of-Order and SuperScalar execution dr.ir. A.C. Verschueren.
Architecture-dependent optimizations Functional units, delay slots and dependency analysis.
Packet Switching COM1337/3501 Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann Chapter 3.
Remote Procedure Call (RPC)
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Procedures and Stacks. Outline Stack organization PUSH and POP instructions Defining and Calling procedures.
Intro to Threading CS221 – 4/20/09. What we’ll cover today Finish the DOTS program Introduction to threads and multi-threading.
490dp Synchronous vs. Asynchronous Invocation Robert Grimm.
Lecture 23: Software Architectures
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Dependable computing needs pervasive debugging Tim Harris
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
3.5 Interprocess Communication
Ritu Varma Roshanak Roshandel Manu Prasanna
TinyOS Software Engineering Sensor Networks for the Masses.
CPS110: Implementing threads/locks on a uni-processor Landon Cox.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
DEBUGGERS For CS302 Data Structures Course Slides prepared by TALHA OZ (most of the text is from
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Debugging Logic Errors CPS120 Introduction to Computer Science Lecture 6.
Game Scripting By: Nicholas Haines. Aurora Neverwinter Toolset.
CSE 486/586 CSE 486/586 Distributed Systems PA Best Practices Steve Ko Computer Sciences and Engineering University at Buffalo.
Chocolate Bar! luqili. Milestone 3 Speed 11% of final mark 7%: path quality and speed –Some cleverness required for full marks –Implement some A* techniques.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Self Adaptivity in Grid Computing Reporter : Po - Jen Lo Sathish S. Vadhiyar and Jack J. Dongarra.
Slides created by: Professor Ian G. Harris Test and Debugging  Controllability and observability are required Controllability Ability to control sources.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Programming Models & Runtime Systems Breakout Report MICS PI Meeting, June 27, 2002.
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
Game Scripting by: Nicholas Haines. What is Scripting? Interpreted Language Interpreted Language –As the game runs.
C H A P T E R T E N Event-Driven Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
Proactor Pattern Venkita Subramonian & Christopher Gill
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
OMIS Approach to Grid Application Monitoring Bartosz Baliś Marian Bubak Włodzimierz Funika Roland Wismueller.
Games Development 2 Concurrent Programming CO3301 Week 9.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Framework for MDO Studies Amitay Isaacs Center for Aerospace System Design and Engineering IIT Bombay.
PMI: A Scalable Process- Management Interface for Extreme-Scale Systems Pavan Balaji, Darius Buntinas, David Goodell, William Gropp, Jayesh Krishna, Ewing.
Allegro CL Certification Program Lisp Programming Series Level I Session Basic Lisp Development in the IDE.
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Seminar of “Virtual Machines” Course Mohammad Mahdizadeh SM. University of Science and Technology Mazandaran-Babol January 2010.
Presenter : Shao-Chieh Hou 2012/8/27 Second ACM/IEEE International Symposium on Networks-on-Chip IEEE computer society.
IT3002 Computer Architecture
Chapter – 8 Software Tools.
Debugging What coders (programmers) do to find the errors (“bugs”) in their own programs “Bugs” – Admiral Grace Hopper, developer of the world’s first.
Debugging using By: Samuel Ashby. What is debugging?  A bug is an error in either a program or the hardware itself.  Debugging is first locating and.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Dale Roberts Debugger Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and Information Science, School.
Threads prepared and instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University 1July 2016Processes.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
Debugging CMSC 202.
Using Visual Studio with C#
Tonga Institute of Higher Education
Using a Debugger 1-Jan-19.
CS510 Operating System Foundations
CSE 153 Design of Operating Systems Winter 2019
Debugging.
Chapter 13: I/O Systems.
Presentation transcript:

Source Level Debugging of Parallel Programs Roland Wismüller LRR-TUM, TU München Germany

Outline Introduction: source level debuggers Debuggers for parallel programs Current / future work at LRR-TUM

What is a Debugger? A tool to remove bugs? –No! A tool to find bugs? –No! A tool to examine program executions? –Yes!

Source Level Debugging

Compilation Example

Setting a Breakpoint

Printing a Variable

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 replace trap with original instruction

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 insert trap again

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 continue execution

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step Problem: there may be no support for single stepping

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step replace next instruction with a trap

Continue Execution 4) cont must execute original instruction call foo add #4,sp trap continue execution

Continue Execution 4) cont must execute original instruction call foo add #4,sp trap insert original trap & instruction

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 continue execution Still a problem: original instruction may be a jump / call / ret we have to emulate these instructions!

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step A different problem: multithreading: another thread may bypass our breakpoint

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step A different problem: multithreading: another thread may bypass our breakpoint

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step A different problem: multithreading: another thread may bypass our breakpoint

Continue Execution 4) cont must execute original instruction call foo add #4,sp move r0,r1 execute a single step A different problem: multithreading: another thread may bypass our breakpoint

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 Solution: don’t remove the trap execute original instruction somewhere else add #4,sp

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 Solution: don’t remove the trap execute original instruction somewhere else add #4,sp

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 Solution: don’t remove the trap execute original instruction somewhere else add #4,sp

Continue Execution 4) cont must execute original instruction call foo trap move r0,r1 Solution: don’t remove the trap execute original instruction somewhere else add #4,sp

Continue Execution 4) cont must execute original instruction Still a problem: instruction may depend on the PC value we have to emulate these instructions! call foo trap move r0,r1 add #4,sp

Optimization Effects

print i reads i5 variable table i register i5 short prints z !!

Parallel Debugging Additional properties of parallel programs Requirements for parallel debuggers Problems and solution techniques

Parallel Programs Multiple processes and/or threads –created dynamically –many of them Program distributed across several hosts Additional state components: –communication subsystem

Multiple Processes / Threads Naming processes / threads –system id’s may not be unique, not persistent not user friendly –debugger generated id’s usually: small integers selection based on additional information –naming not yet existent processes / threads DETOP: pattern matching

Thread Selection in DETOP functionexecutablesystem iddebugger id node listselection pattern

Scalability Input: use process / thread sets –commands are executed for each member –e.g. [1,2,3] print i or [2,7] break 123 –sometimes: named sets –problems: command semantics may differ for the processes e.g. different executables / call stacks when to evaluate named sets?

DETOP User Interface

Output: aggregation –simple case: aggregate identical results –complex case: aggregate partially identical results –impossible cases: asynchronous events Scalability [1]: 12.3 [2]: 4.1 [3]: 12.3 [4]: 12.3 [5]: 12.3 [1,3-5]: 12.3 [2]: 4.1

Aggregating Stacks: Call Tree

Concurrency Issues What happens if a thread stops? –stop all threads in all processes –stop all threads in the same process –stop only that thread What happens if I continue a thread? –start all threads in all processes –start all threads in the same process –start only that thread When does the debugger accept input? –only when all processes are stopped –always

Concurrency Issues What happens if a thread stops? –stop all threads in all processes (BP option) –stop all threads in the same process (BP option) –stop only that thread What happens if I continue a thread? –start all threads in all processes (separate command) –start all threads in the same process (use pattern) –start only that thread When does the debugger accept input? –only when all processes are stopped –always

Additional State Components E.g. message buffers, blocked processes Usually no support from debuggers –additional dependency on programming library implementation Often other tools (visualizers) will show this information –use them together with the debugger (?) interoperable tools

Interoperable Tools Multiple, loosely coupled tools are used on the same program Concrete scenario: –debugger that allows to ‘time-warp’ –i.e. return to previous program states without rerunning the program –speed up debugging cycle of long running programs

‘Time-Warp’ Debugger Tools that need to interoperate: –parallel debugger (DETOP) –checkpointing system for parallel programs (CoCheck, based on Condor) –deterministic execution controller (codex) –means to specify the state to return to (VISTOP: state based program flow visualizer)

Preconditions for Interoperability Common monitoring infrastructure –OMIS / OCM Mechanisms for informing tools on modifications of state done by other tools –e.g. VISTOP must know when DETOP stops a process, as event buffer must be read Mechanisms for direct tool interaction –e.g. VISTOP to CoCheck: ‘restart from checkpoint’

OMIS Basis: –objects + services –event / action paradigm –scalability by using object sets –location transparency Example: thread_creates_proc([t_1,t_2]): thread_stop([$proc, $new_proc]) thread_get_backtrace([$thread],0)

Interoperability Problems A tool may violate preconditions of another tool –DETOP can stop a process –checkpointing is initiated by sending a signal –stopped process won’t handle signal ! –we cannot hide the state change from the checkpointer this case cannot be handled easily

The End Debuggers are by far not trivial Parallel debuggers are even more complex Lots of open (maybe unsolvable) research issues Interoperability may ease implementation of enhanced functionality