Discovering concurrency errors