Facebook engineers have solved a long-term mobile bugging issue in iOS, reducing its crash rate by more than 50 percent. According to the company’s engineering blog, one of mobile’s top crashes was in the Apple Core Data system. The team received the crashes into a report analyzer, but it took months for them to create the correct approach to the problem.
When scaling a product, the engineers wrote, certain fundamental programming challenges come with it. Debugging can be difficult even if the problem can be replicated. With Facebook, the codebase rapidly changes making debugging even more difficult.
After taking several steps to eradicate the bug — for example, hypothesizing when the error occurred, finding the “rogue thread” in the code, and abandoning the manual code analysis — the team was able to pinpoint the problem. After working with a networking team, the issue was fixed within a few hours.
Facebook engineers Slobodan Predolac and Nicolas Spiegelberg wrote about this in a blog post:
Dealing with a large, rapidly evolving codebase can seem overwhelming at times. Everyday tasks like analyzing crashes and understanding code can turn into their own programming challenges. At these moments, it’s important to work together, brainstorm, and rely on computer programming fundamentals.