Skip to main content

Facebook open-sources RacerD tool to prevent pesky programming problems

Facebook app & website
Facebook app & website
Image Credit: Paul Sawers / VentureBeat

Facebook revealed a new open source tool today that’s designed to help developers build more complex apps with less work by detecting bugs that are typically difficult to suss out and squash. Called RacerD, it’s a system that examines code for nasty issues known as race conditions and helps identify how to prevent them.

Race conditions appear when coders try to implement concurrency in their programs, so that an app can work on multiple tasks at once. That’s all well and good, but gnarly bugs can crop up when two or more parts of the program try to change the same data at the same time. In that case, it’s possible for both operations to get the incorrect result, screwing up things further down the line.

But finding race conditions is incredibly difficult. It’s basically impossible to test for all the potential problems in an app, and the bugs resulting from a race condition can be inconsistent and hard to diagnose. That’s where RacerD comes in.

Facebook’s system runs when a piece of code is compiled, producing a report about where in a program possible race conditions could arise. Peter O’Hearn, a research scientist at Facebook, said in an interview that while RacerD isn’t guaranteed to catch all of the race condition bugs, it will find most of them.


June 5th: The AI Audit in NYC

Join us next week in NYC to engage with top executive leaders, delving into strategies for auditing AI models to ensure fairness, optimal performance, and ethical compliance across diverse organizations. Secure your attendance for this exclusive invite-only event.


Using RacerD, Facebook’s Android team caught over 1,000 race condition bugs while they converted that app’s news feed to use concurrency. The conversion provided a 5 percent performance increase for the app, which is a significant improvement in this case.

Right now, RacerD is compatible with Java, though O’Hearn said that the company is working on making it compatible with C++ as well.