CS353 Project 3: Building CHESS (due October 13)

Problem statement

To find a conccurent bug, both buggy input and buggy schedule are required. However in a normal execution, we can specify input but we cannot specify the schedule. Thus it is hard to find a conccurrent bug with a normal execution and we need a tool to explore schedules.

In projects 2 and 3, you will implement a simplified version of CHESS to explore schedules systematically.

In project 3, you will implement the CHESS scheduler and apply it to detect real world data races. The CHESS scheduler will be implemented as follows:

  1. In the first execution, record all synchronization points where you can switch to another thread. The synchronization points are after a thread is created, before mutex is locked, and after mutex is released.
  2. In the (n+1)-th execution, switch to another thread at the n-th sycnhronization point.

Sample test program: sample2.c

This program has an atomicity violation bug and it will crash the program in a certain schedule. Use your tool to find the bug in this program.

You can build sample2.c by typing 'gcc -o sample2 -lpthread -lrt sample2.c' on the shell.

Find a concurrent bug in pbzip2.

Pbzip2 is a parallel compression/decompression program. An old version of pbzip2 has a concurrent bug. Download the following buggy pbzip2 and input and find a concurrent bug with your tool. You'll need to implement pthread_cond_wait (wait) and pthread_cond_broadcast (notify) to find the bug.

pbzip2.tar.gz, input

Submission

Where to get help

Dohyeong Kim(kim1051@purdue.edu) is managing this project. You can either send him email or meet with him by appointment.

Appendix

You can find a document about pthread from internet including pthread tutorial from Lawrence Livermore National Laboratory