Automated detection of atomicity violations in large-scale systems