Jinx: Making Uncommon Concurrency Errors Commonplace in Shared Memory Programs

35
Опубликовано 7 сентября 2016, 18:02
The era of increasing single-threaded application performance is long over. Application code bases must adapt to utilize multicore chips, or be forever stuck with circa 2004 performance levels. The difficulty of writing multithreaded code is well accepted: if it was easy, we would have parallelized applications long ago. One of the main challenges with writing concurrent software is debugging. Errors are often subtle, difficult to reason about and hard to reproduce. In this talk I will describe Jinx, a specialized hypervisor that significantly aids the debugging and quality assurance testing of multithreaded software. Jinx is a thin hypervisor that slips underneath an already booted operating system, such as Windows 7. Once installed, Jinx periodically takes snapshots of the guest virtual machine (VM) and executes these VM images looking for shared memory communications between processors. It then carefully perturbs these VM simulations looking for ways to expose concurrency errors. Once it finds a particular execution path in a simulated VM that exposes a concurrency error it deterministically replays that path onto the real VM that the user is experiencing. The net result is applications that have subtle concurrency errors, when executing above the Jinx hypervisor, experience these errors orders of magnitude more often than they would under ordinary circumstances, vastly easing the ability to catch them during product development. In this talk I describe the Jinx hypervisor. I will discuss how Jinx installs itself after the guest has already booted; how Jinx simulates copies of the guest operating system efficiently; how simulations are deterministically replayed onto reality; and an important debugging feature of Jinx called, ShortStop, that halts processors at the semantically important shared memory communication point that precipitates a program error. Finally, I'll conclude the talk with a demo of Jinx executing on Windows 7 and discuss the future of thin hypervisor approaches to debugging and system reliability.
автотехномузыкадетское