Presentation is loading. Please wait.

Presentation is loading. Please wait.

Error Scope on a Computational Grid: Theory and Practice Douglas Thain and Miron Livny Computer Sciences Department University of Wisconsin HPDC-11, July.

Similar presentations


Presentation on theme: "Error Scope on a Computational Grid: Theory and Practice Douglas Thain and Miron Livny Computer Sciences Department University of Wisconsin HPDC-11, July."— Presentation transcript:

1 Error Scope on a Computational Grid: Theory and Practice Douglas Thain and Miron Livny Computer Sciences Department University of Wisconsin HPDC-11, July 2002

2 Danger Ahead!

3 Outline An Exercise: Condor + Java Bad News: Error Explosion A Theory of Error Propagation (A Taste) Condor Revisited Parting Thoughts

4 An Exercise: Coupling Condor and Java The Condor Project, est. 1985. – Production high-throughput computing facility. – Provides a stable execution environment on a Grid of unstable, autonomous resources. The Java Language, est 1991. – Production language, compiler, and interpreter. – Provides a standard instruction set and libraries on any processor and system. The Grid – Execute any code any where at any time. – Dependable, consistent, pervasive, inexpensive... – Are we there yet?

5 The Condor High Throughput Computing System HTC != HPC – Measured in sims/week, frames/month, cycles/year. All participants are autonomous. – Users give constraints on usable machines. – Machines give constraints on jobs and users. – ClassAds: a language for matchmaking. If you are willing to re-link jobs... – Remote system calls for transparent mobility. – Binary checkpointing for migration and fault-tolerance. – Can’t relink? All other features available. Special “universes” support software environments. – PVM, MPI, Master-Worker, Vanilla, Globus, Java

6 Home File System Execution SiteSubmission Site User Agent (schedd) Match- Maker Machine Agent (startd) Policy Control Policy Control Execution Protocol The Job Fork Job Agent (starter) Fork Job Agent (shadow) Fork “I want...” “I have...” Claiming Protocol notify

7 Java Universe Execution: – User specifies.class and.jar files. – Machine provides the JVM details. Input and Output: – Know all of your files? Condor transfers whole files for you. – Need online I/O? Link program with Chirp I/O Library. Execution site provides proxy to home site.

8 JVM Fork Job Agent (starter) Job Agent (shadow) Home File System I/O Library The Job I/O ServerI/O Proxy Secure Remote I/O Local System Calls Local RPC (Chirp) Execution SiteSubmission Site Wrapper

9 Initial Experience Bad news! Any kind of error sent the job back to the user with an exception message: – NullPointerException - Program is faulty. – OutOfMemory - Program outgrew machine. – ClassNotFoundError - Machine incorrectly installed. – ConnectionRefused - Network temporarily unavailable. Users were frustrated because they had to evaluate whether the job failed or the system failed. These were correct in the sense they were true. These were not bugs. We deliberately trapped all possible errors and passed them up the chain.

10 What’s the Problem? To reason about this problem, we began to construct a theory of error propagation. This theory offers some common definitions and four principles that outline a design discipline. We re-examined the Java Universe according to this theory. Our most serious mistake: We failed to propagate errors according to their scope.

11 We are NOT Talking About: Fault Tolerance – What algorithms are fault-resistant? – How many disks can I lose without losing data? – How many copies should I make for five nines? Language Structures – Should I use Objects or Strings to represent errors? – Should I use Exceptions or Signals to communicate errors? These are important and valuable questions, but we are asking something different!

12 We ARE Talking About: Where is the problem? How should a program respond to an error? Who should receive an error message? What information should an error carry? How can we even reason about this stuff?

13

14

15 Engineering Perspective Fault – A physical disruption of the machine. Error – An information state that reflects a fault. Failure – A violation of documented/guaranteed behavior. Fault – (A failure in one’s underlying components.)

16 Interface Perspective Implicit Error – A result presented as valid, but found to be false. – Example: sqrt(3) -> 2. Explicit Error – A result describing an inability to carry out the request. – Example: open(“file”) -> ENOENT. Escaping Error – A return to a higher level of abstraction. – Example: read -> virt mem failure -> process abort. – Example: server out of memory -> shutdown socket

17 Principles for Error Design 1 - A program must not generate an implicit error as a result of receiving an explicit error. 2 - An escaping error must be used to convert a potential implicit error into an explicit error at a higher level. 3 - An error must be propagated to the program that manages its scope. 4 - Error interfaces must be concise and finite.

18 Error Scope Definition: The scope of an error is the portion of a system that it invalidates. Principle 3: An error must be propagated to the program that manages its scope.

19 Error Scope Examples “File not found” simply has file scope.

20 schedd shadow starter JVM program CodeData Program Scope Virtual Machine Scope Remote Resource Scope Local Resource Scope Job Scope Input Data Prog Args Prog Image Output Space I/O Server User Policy Owner Policy Java Pkg Mem & CPU

21 DetailScopeHandler Program exited normally.ProgramUser Null pointer exception.ProgramUser Out of memory.Virtual Machine JVM Java misconfigured.Remote Resource Starter Home file system offline.Local Resource Shadow Program image corrupt.JobSchedd Scope in Condor

22 Scope in Condor: JVM Exit Code DetailScopeHandlerExit Code Program exited normally.ProgramUser(x) Null pointer exception.ProgramUser1 Out of memory.Virtual Machine JVM1 Java misconfigured.Remote Resource Starter1 Home file system offline.Local Resource Shadow1 Program image corrupt.JobSchedd1

23 What To Do With An Error? A program cannot possibly know what to do with an error outside its scope. – Should sin(x) deal with “math library not available?” Propagate an error to the manager of the scope as directly as possible. Sometimes, a direct mechanism: – Signal, exception, dropped connection, message. Sometimes, an indirect mechanism: – Touch a file, then exit by any means available.

24 JVM Job Agent (starter) Job Agent (shadow) Home File System Wrapper I/O Library The Job Result File JVM Result Program Result or Error and Scope Starter Result + Program Result

25 JVM starter shadow Home File System Wrapper I/O Library The Job Result File JVM Result Starter Result + Program Result I/O Proxy Local I/O (Chirp) Errors of Larger Scope Errors Inside Program Scope

26 Error Theory An outline: – Definitions of error types. – Error relationships discussion. – Four principles for error discipline. – Error scope. Unpopular position: – Generic (expandable) errors must be exterminated! Please take a closer look, and feel free to come argue with me!

27 Open Problems

28 Related Work Anh Nguyen-Tuong and Andrew Grimshaw, Legion Reflective Graph and Event Model. – Distributed applications keep a model of themselves. – Very powerful when the entire system is known to every component. John B. Goodenough, et al. “Exceptions” – Must exceptions be declared in the interface? – If not, how do we deal with escaping errors? Hoare, et al, “Design by Contract” – Motivates the distinction between explicit and escaping errors. – How should escaping errors be structured?

29 Conclusion Small but powerful changes drastically improved the Java Universe. Our mistake was to represent all possible errors explicitly in the closest interface. Error scope is an analytic tool that helps the designer decide how to propagate an error. An error discipline saves precious resources: time and aggravation!

30 A Parting Thought Very few existing structures can be lifted into distributed computing without change. Can these results be distinguished? – sh fails to load (result 1) – gzip fails to load (result 1) – file does not exist (result 1) – file exists (result 0) #!/bin/sh gzip file exit $?

31 For more information... Douglas Thain – thain@cs.wisc.edu Miron Livny – miron@cs.wisc.edu Condor Software, Manuals, Papers, and More – http://www.cs.wisc.edu/condor Questions now?


Download ppt "Error Scope on a Computational Grid: Theory and Practice Douglas Thain and Miron Livny Computer Sciences Department University of Wisconsin HPDC-11, July."

Similar presentations


Ads by Google