Facebook has announced the open source release of their RacerD unsynchronized memory access — or data race — detector for Java applications following its successful implementation internally.

RaceD is based off of the company’s open source static analysis tool, Infer.

According to Facebook, this newest publicly available piece of Infer’s static analysis platform has caught more than 1,000 multi-threading issues in their Android codebase over the past 10 months, all before the code ever reached production.

Though the project was started in 2015 with a lofty goal of creating an unobtrusive, “high speed and low friction,” scalable concurrency analysis utility for programmers writing concurrent programs, an immediate need caused the team to shift towards a tool that analyzed existing code. This development helped Facebook’s engineers on their Android app convert part of the News Feed from a sequential, single-threaded to a concurrent, multi-threaded operation, Facebook’s software engineer Sam Blackshear and software evangelist Peter O’Hearn writes

“Data races are one of the most basic forms of concurrency error, and removing them can help simplify the mental task of understanding a concurrent program,” wrote Blackshear and O’Hearn.

The three guiding ideas behind RacerD’s design are:

  1. Don’t do whole-program analysis; be compositional.
  2. Don’t explore interleavings; track lock and thread information.
  3. Don’t attempt a general, precise alias analysis; use an aggressive ownership analysis for anti-aliasing of allocated resources.

“Reasoning about concurrency has been studied for over 40 years and has seen many research advances. However, not much of the work has made it through to deployment where it can help programmers in their daily jobs,” Blackshear and O’Hearn wrote. “RacerD demonstrates that a static concurrency analysis can be developed and effectively applied at the speed and scale demanded by Facebook’s development model, where a large codebase is undergoing frequent modification.”

Top 5 trending projects on GitHub this week:

#1. p3cAlibaba Java coding guidelines.
#2. napajsMicrosoft’s multi-threaded JavaScript runtime.
#3. Front end checklistLike the name says, a checklist for front end development.
#4. Tech Interview HandbookA cheatsheet for rocking your next interview.
#5. Design blocksMore than 170 Bootstrap based design blocks.

 

About Ian C. Schafer

Ian C. Schafer is a multimedia reporter and undeniable nerd living and working in New York City and on Long Island.