Big Data. Big Decisions
InformationWeek
Special Coverage Series

Commentary


Parallelism at PDC: Day 3 - finding Heisenbugs



The first parallelism session on Day 3 here at PDC is 'Research: Concurrency Analysis Platform and Tools for Finding Concurrency Bugs'

This was the one time I had to pick between two parallelism sessions - I choose this one because many Microsoft developers internally talked about using the CHESS research in some of their development work.

Parallel programs require proper data synchronization, and getting it wrong can lead to dead locks and race conditions.  These parallel programming bugs are notoriously difficult to debug because they are non-deterministic. A program will pass or fail intermittently.

This gives rise to the term ‘Heisenbugs’ because observing the bug (e.g., in a debugger) can "fix" it!

The presenters were Madan Musuvathi and Thomas Ball, both from Microsoft Research.

Madan explained that debugging is often a huge productivity problem for parallel programmers. Microsoft Research has developed what they call the ‘Concurrency Analysis Platform’ (CAP) to enable concurrency bug-finding tools. Inside Microsoft, a tool called CHESS build on CAP has become popular.

CAP allows a program to be run deterministically. An attendee asked if CAP could just be put in the system scheduler to force determinism, and be there all the time. Tom said it an interesting idea but with drawbacks he did not elaborate on.

Present a tool called "CHESS" - can find Heisenbugs in Win32/.NET in native and managed code. Maden and Tom announced that this tool will be available externally soon at http://msdn.microsoft.com/devlabs. There is information about CHESS today at http://research.microsoft.com/projects/CHESS

CHESS/CAP uses an interleaving approach to increase test coverage.  This runs a program multiple times, and hopes that changing the interleaving will expose a failure.  The advantage is CHESS on CAP is its ability to reproduce the sequential debugging experience to debug a parallel bug. The disadvantage is it can miss possible failures in code is not exercised and the number of interleavings needed to fix this is never realistic (expediential explosion). Tom used the phrases ‘go get some coffee’ and ‘in a day or two’ to describe use on real programs. Tom said CHESS does not scale to large programs today, and Madan promised future work is looking at heuristics to try to reduce the search space intelligently to address this.

Competing approaches to CHESS’s interleaving approach include:

 

  • Design a language with defined behaviors and constraints that allow a special tool. Cilk Arts does this.  The advantage is it is FAST.  Disadvantages include that it will not catch errors created outside of using Cilk Art’s languages extensions.
  • Try to detect bugs statically. Deadlock detection can be okay this way, but data races yield too many false positives (so users always dial it back so it will miss real issues) and miss interactions outside the source code you have. Therefore, a static checking can help eliminate some bugs, but cannot be your only solution. Compilers are increasingly offering some static checking to help, but not solve this challenge of ridding a program of Heisenbugs.
  • Do a comprehensive analysis tool to find all race conditions and dead lock possibilities by observing the correctness or incorrectness of the program’s runtime behavior.  This is what the Intel Thread Checker does. Advantages: in practice find the bugs that matter with few false positives, finds bugs even if the program does not fail, can pinpoint the failure itself, and unlike interleaving only requires one run of a program. Disadvantages: not as fast as static solutions, can miss possible failures if code is not exercised, and does not facilitate debugging in a debugger (maybe CAP can be used in the future to help?).

Tom explained that future work using CAP includes a data-race detection engine and a tool for finding memory-model errors.  In general he said you can build many more tools on top of CAP – including debug and visualization tools.  Future work also includes porting to 64 bits.

Madan showed off a tool called 'Sober' - a tool for finding memory-model errors. Madan spun the fact the tool is hard to use by saying 'this tools is for very very smart people.  

CHESS is currently integrated into Visual Studio Team Test only for managed code in a single process (no services).  Tom said native code testing is done only from the command line right now. Both require the Team version of Visual Studio.

We’re really seeing an explosion now of tools to help with parallelism.  CHESS is an interesting twist on helping find Heisenbugs which tries to force a program into failing to detect an error, and allow it to be debugged in reproducible fashion.

 

 



Related Reading


More Insights




Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

BYTE encourages readers to engage in spirited, healthy debate, including taking us to task. However, BYTE moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing/SPAM. BYTE further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.

Follow InformationWeek

By The Numbers

What Are Your Primary Concerns About Using Big Data Software?

Base: 417 respondents at organizations using or planning to deploy data analytics, BI or statistical analysis software
Data: InformationWeek 2013 Analytics, Business Intelligence and Information Management Survey of 541 business technology professionals, October 2012

What Do You Think?

What's your attitude about SQL analysis on top of Hadoop?
We want fast, standard SQL analysis capabilities on Hadoop ASAP
Hadoop is for unstructured data; SQL is for relational databases
We'll give SQL on Hadoop a try, but relational DBs will remain the mainstay
Given strong SQL support on Hadoop, we'd nix the data warehouse
We're not interested in Hadoop
No opinion



Related Content

From Our Sponsor

Five Big Data Challenges and How to Overcome Them with Visual Analytics

Five Big Data Challenges and How to Overcome Them with Visual Analytics

Business leaders often need a visual snapshot of data to quickly grasp and use it. This paper identifies five challenges in presenting data and how visual analytics can resolve them. Solutions are suggested to overcome the challenges of: speed, data clarity, data quality, displaying meaningful results, and dealing with outliers.

Game-Changing Analytics: How IT Executives Can Use Analytics to Create Innovation and Business Success

Game-Changing Analytics: How IT Executives Can Use Analytics to Create Innovation and Business Success

Today's competitive advantage requires a deeper understanding of your business, your market and your customers. As an IT executive, you can drive that knowledge transformation. In this white paper, learn how to make decisions as a strategic business leader and three steps to begin an analytics initiative within your enterprise.

Data Visualization Techniques: From Basics to Big Data with SAS Visual Analytics

Data Visualization Techniques: From Basics to Big Data with SAS Visual Analytics

High-performance data visualization turns sophisticated analyses into meaningful graphics, leading to faster and smarter decision making. In this white paper, learn how visual analytics can transform big data, with additional features such as real-time functionality, mobile compatibility, robust applications for technical groups and accessibility for nontechnical users.

Big Data: Lessons from the Leaders

Big Data: Lessons from the Leaders

Financial performance, competitive advantage, operational efficiency, strategic decision making - every business goal can extract value from big data, and the time for doubt or inaction has long passed. In this Economist Intelligence Unit report, in-depth interviews with data pioneers reveal the link between the effective use of big data and the bottom line among other results.

Decision-Driven Data Management: A Strategy for Better Decisions with Better Data

Decision-Driven Data Management: A Strategy for Better Decisions with Better Data

Which came first, the data or the decision? This white paper makes the case for having a decision in mind, then tailoring big data's volume, variety and velocity to achieve business results such as overcoming customer dissatisfaction or creating well-informed strategies in real time.

Informationweek Reports

Research: The Big Data Management Challenge

Research: The Big Data Management Challenge

The challenge of big data is real, but most organizations don't differentiate 'big data' from traditional data, and nearly 90% of respondents to our survey use conventional databases as the primary means of handling data. We'll help you understand what constitutes big data (it's not just size) and the numerous management challenges it poses.