Facebook’s evolutionary search for crashing software bugs – Ars Technica
Enlarge / An arty photo of one of Facebook's data centres.
With 1.3 billion daily users, the Facebook site and its apps are the most-used pieces of software in the world.Only a handful of software companies have ascended to a similar echelon of ubiquity, including Microsoft, Google, and Apple. For better or worse, that is the world we now live in, where a large percentage our waking hours is spent interacting with softwareand Facebook leads the pack, with the average userspending 50 minutes per day mostly watching videos and liking photos of babies.Television is the only leisure activity in the worldthat receives more attention than Facebook. And don't forget that Facebook now owns Instagram and WhatsApp, too.
Adobe Stock
That's why Facebook has some advanced bug-finding toolsincluding a devilishly clever dynamic analysis tool, initially devised by students at University College London and then acquired and further developed by Facebook's London office. This is the first time they've shown the inner workings of this new tool, dubbed Sapienz, to the press.
Eachtechnique serves a different purpose, and a big software company would usually use both. Static analysis is perfect for formally verifying that an algorithm works as intended, or for highlighting bad code that might allow for a buffer overflow orother security vulnerability. Dynamic analysis is better at finding the gnarly edge cases that cause crashes. Humans can manually perform both analyses, of course, but computers are obviously a lot quicker when it comes to testing millions of possible inputs.
Facebook's static analyser is called Infer. The company open-sourced the toolin 2013, and a lot of big names (Uber, Spotify, Mozilla) use it. There isn't a whole lot to say about it, other than it seems to be very popular and effective; download it today!
Sapienz has three main tricks up its sleeve.First, it uses a search-based evolutionary algorithm, rather than a random or model-based approach. Second, the fitness function that guides how the algorithm evolves is incredibly complex: there are multiple objectives, entwined by Pareto optimality, that must be fulfilled for each evolutionary change to be a success. And third, Facebook can run Sapienz on its One World test platform, which lets engineers find crashing bugs on hundreds of different Android devices simultaneously. (Sapienz only supportsAndroid apps currently, though there are plans to expand to otherplatforms and app types.)
The key to a successful evolutionary algorithm is its fitness function. I'm not your college computer science lecturer, so I won't go into too much detail, but a fitness function essentially looks at the result of a test case, and decides how close that result is to a desired outcome/objective. The results that don't fulfil the fitness function are tied up in a burlap sack and thrown in the river; the good ones are bred together, to form the basis of the next round of testing.
According to Facebook's engineers, most of their secret sauce is in Sapienz's fitness function, which has three objectives: to test as many of the app's methods and statements as possible, find as many crashes as possible, and minimise the length of the test sequences required to cause crashes. The first two are all about producing better, crash-free software; the third is to improve the efficiency of the system, so that a decent number of crashes can be found in a reasonable amount of time.
These three objectives are assessed by the fitness function for Pareto efficiency. That is, one objective isn't more important than the others: if the evolutionary algorithm is only producing long test sequences, but they're providing good coverage and finding lots of crashes, then those long tests will be kept alive. Over time the systemtries to hit Pareto optimality: where it's impossible to improve one objective without negatively impacting another. So, in this case, the algorithm would attempt to reduce the test sequence length without reducing coverage or the fault revelation.
Sapienz also strays slightly across the border into static analysis: it attempts to reverse-engineer the app (an Android APK in this case) to pull out some strings, which it then uses as natural-language inputs when testing begins. "We found this seeding to be particularly useful when testing apps that require a lot of user-generated content, e.g., Facebook, because it enables Sapienz to post and comment in an apparently more human-meaningful way," say the researchers.
Listing image by Adobe Stock
Read the original:
Facebook's evolutionary search for crashing software bugs - Ars Technica
- Samsung Galaxy handsets could get a massive free software upgrade as soon as this summer - MSN - April 14th, 2025 [April 14th, 2025]
- A Free Software Program Helped Create This Oscar-Winning Movie And Thats a Big Deal - Collider - April 8th, 2025 [April 8th, 2025]
- Samsung Galaxy handsets could get a massive free software upgrade as soon as this summer - t3.com - April 8th, 2025 [April 8th, 2025]
- More Than 200 Manufacturers Download Free Work Instruction Software - Assembly Magazine - April 8th, 2025 [April 8th, 2025]
- Windows' Photoshop Alternative Is Actually Good Now, and It's Free - Lifehacker - April 8th, 2025 [April 8th, 2025]
- I've tried a lot of different backup software, and I keep coming back to this free, open-source tool - XDA - April 8th, 2025 [April 8th, 2025]
- Home Assistant is the best example of what free and open-source software should be - XDA - April 8th, 2025 [April 8th, 2025]
- Intel Unison, a powerful free app bridging Android phones and PCs, is shutting down - Android Central - April 8th, 2025 [April 8th, 2025]
- TugImgSynth, free image wavetable Synthesizer plugin for macOS and Windows - synth anatomy - April 8th, 2025 [April 8th, 2025]
- Garmin wants you to pay for AI features and enhanced software updates - is it worth it? - ZDNET - April 8th, 2025 [April 8th, 2025]
- Apple announces software update to AirPods Max, and you can get it for free; heres how - Fortune India - March 25th, 2025 [March 25th, 2025]
- Download Free PDF Reader (free) for Windows, macOS and Linux - Gizmodo - March 25th, 2025 [March 25th, 2025]
- 5 best free alternatives to Adobe creative software you should use instead - XDA Developers - March 25th, 2025 [March 25th, 2025]
- Best free Adobe Illustrator alternatives of 2025 - TechRadar - March 25th, 2025 [March 25th, 2025]
- Ocean Swift revives its free Legacy Synthesizer plugins with VST3 support: part 1 bundle - Synth Anatomy - March 25th, 2025 [March 25th, 2025]
- I've found the easiest way to learn Blackmagic's Da Vinci Resolve 19 and it's free - Creative Bloq - March 25th, 2025 [March 25th, 2025]
- Download PDFgear (free) for Windows, macOS, Android, iOS and Web App - Gizmodo - March 25th, 2025 [March 25th, 2025]
- U-he Tyrell N6 3.0, free Synthesizer plugin gets major update with Apple Silicon support, and more - Synth Anatomy - March 25th, 2025 [March 25th, 2025]
- GIMP 3.0 Is Here The Best Free Graphics Editor Just Got Better - 9Meters.com - March 18th, 2025 [March 18th, 2025]
- File Your Tax Return for Free: What to Know About the IRS Free File Program and Its Limitations - CNET - March 18th, 2025 [March 18th, 2025]
- Freeware image editor GIMP 3.0 arrives after seven years of incubation - Tom's Hardware - March 18th, 2025 [March 18th, 2025]
- A Perfect Day - for iOS - Free download and software reviews - Download.com - March 18th, 2025 [March 18th, 2025]
- Oscar winner Gints Zilbalodis: Its really cool that we can make these films with free software - The Irish Times - March 18th, 2025 [March 18th, 2025]
- A government program made tax filing free and more efficient. Musk and DOGE may get rid of it anyway - MyFoxZone.com KIDY - March 18th, 2025 [March 18th, 2025]
- Winner of Best Animated Film at the 2025 Oscars Was Made on Free Software - The Express Tribune - March 18th, 2025 [March 18th, 2025]
- Deep Research could be the next Gemini feature to hit free users, per report - Android Central - March 9th, 2025 [March 9th, 2025]
- As Flow takes home the Oscar using only free software, fans troll"Disneys worst nightmare is indie animators with talent" - Soap Central - March 9th, 2025 [March 9th, 2025]
- The best animation Oscar winner was made in totally free software that anyone can use - Yahoo Entertainment - March 9th, 2025 [March 9th, 2025]
- Best free WinZip alternative of 2025 - TechRadar - March 9th, 2025 [March 9th, 2025]
- YouTube's affordable ad-free Premium Lite plan officially rolls out in the U.S. - Android Central - March 9th, 2025 [March 9th, 2025]
- 303 Day: Get Rolands TB-303 software version absolutely free but youll have to be quick - MusicTech - March 9th, 2025 [March 9th, 2025]
- Everybody needs a 303, and Roland is giving away its software version free for 303 Day but be quick, theres only 3,030 copies up for grabs -... - March 3rd, 2025 [March 3rd, 2025]
- News: Free QNX Everywhere software resources now available - A3 Association for Advancing Automation - March 1st, 2025 [March 1st, 2025]
- How do I file my taxes for free? Federal and Ohio state services to know about this year - The Columbus Dispatch - March 1st, 2025 [March 1st, 2025]
- How to file your taxes for free in 2025 - CNBC - March 1st, 2025 [March 1st, 2025]
- Microsoft quietly tests free, ad-supported version of Office apps for Windows with limited functionality - Windows Central - March 1st, 2025 [March 1st, 2025]
- Empty Out Your Gmail Inbox and Get Back 15GB of Storage - CNET - March 1st, 2025 [March 1st, 2025]
- Google releases free version of AI platform that speeds coding - Business in Vancouver - March 1st, 2025 [March 1st, 2025]
- H&R Block vs. TurboTax vs. Jackson Hewitt: Whats the Difference? - Investopedia - February 25th, 2025 [February 25th, 2025]
- All the Ways You Can File for Free This Year, From TurboTax to FreeTaxUSA - CNET - February 18th, 2025 [February 18th, 2025]
- Best free video editing software of 2025: Top picks for every project and skill-level - TechRadar - February 14th, 2025 [February 14th, 2025]
- 500,000 U.S. Lawyers Now Have Free Access to Trust Software through Bar Partnerships with Smokeball - LawSites - February 14th, 2025 [February 14th, 2025]
- Best Tax Software 2025: TurboTax Leads the Pack, but These Options May Work Better for You - CNET - February 14th, 2025 [February 14th, 2025]
- Photopea Is a Free Photoshop Alternative That Runs in the Browser - WIRED - February 14th, 2025 [February 14th, 2025]
- Freedom Reimagined: Meet the Free Software Foundations 40th Anniversary Logo - It's FOSS News - January 24th, 2025 [January 24th, 2025]
- Free Software Foundation Marking 40 Years Old With A New Logo - Phoronix - January 24th, 2025 [January 24th, 2025]
- Coros smartwatches just got a big free software update here are the best new features - MSN - January 24th, 2025 [January 24th, 2025]
- Best personal finance software of 2025 - TechRadar - January 24th, 2025 [January 24th, 2025]
- Free Mac Email Apps That Stand Out in 2025: A Comprehensive Guide - PUNE.NEWS - January 24th, 2025 [January 24th, 2025]
- Free-software warriors celebrate landmark case that enforced GNU LGPL - The Register - January 13th, 2025 [January 13th, 2025]
- This free software is topping the Steam charts, but its not a game - Notebookcheck.net - January 13th, 2025 [January 13th, 2025]
- IRS offering free tax filing services to millions starting this week - KSWO - January 13th, 2025 [January 13th, 2025]
- The best Android antivirus apps in 2025 - Tom's Guide - January 13th, 2025 [January 13th, 2025]
- GIMP vs Krita: which free software is best for you? - Creative Bloq - January 6th, 2025 [January 6th, 2025]
- Mensla MS-3, free waveshaper Synthesizer plugin for macOS and Windows - Synth Anatomy - January 6th, 2025 [January 6th, 2025]
- Tesla fixes TPMS issue on nearly 700,000 vehicles with free software update - Drive Tesla Canada - December 25th, 2024 [December 25th, 2024]
- STRACKALINE TO OFFER EXCLUSIVE FREE SOFTWARE ACCESS AT THE 2025 PGA SHOW (BOOTH 2808) - The Golf Wire - December 18th, 2024 [December 18th, 2024]
- The Pixel 6 just got a free software upgrade that makes it my favorite budget Android phone - ZDNet - December 12th, 2024 [December 12th, 2024]
- Google just gave older Pixel phones a free software upgrade that you once could only wish for - ZDNet - December 8th, 2024 [December 8th, 2024]
- Free AI-Powered Software for Radiology Impressions Available from Scriptor Software - Imaging Technology News - December 8th, 2024 [December 8th, 2024]
- Maryland State Bar Members Now Get Free Trust Accounting Software in Deal with Smokeball - LawSites - December 5th, 2024 [December 5th, 2024]
- 7 free and open-source tools that rival the best creative software - XDA Developers - December 5th, 2024 [December 5th, 2024]
- Google Drive Full? Gift Yourself More Digital Storage This Holiday Season - CNET - November 30th, 2024 [November 30th, 2024]
- Tired of controller lock-in? Mixxx is a free DJ alternative; 2.4.2 out now - Create Digital Music - November 28th, 2024 [November 28th, 2024]
- 5 of the best free software for data recovery on Windows - XDA Developers - November 23rd, 2024 [November 23rd, 2024]
- AAVAA Hands-Free Accessibility Devices Now Compatible with Apple Software - The Hearing Review - November 17th, 2024 [November 17th, 2024]
- The best graphic design software - Creative Bloq - November 16th, 2024 [November 16th, 2024]
- VMware makes Workstation and Fusion free for everyone - BleepingComputer - November 16th, 2024 [November 16th, 2024]
- Trimble Expands Access to Advanced Construction Project Management Capabilities with Free Version of ProjectSight Software - StreetInsider.com - November 16th, 2024 [November 16th, 2024]
- The best free video editing software: how to cut clips without the cost - Creative Bloq - November 8th, 2024 [November 8th, 2024]
- Best Free Invoice And Billing Software Of 2024 - Forbes - November 8th, 2024 [November 8th, 2024]
- Amazfit just dropped a massive free software update and these new features are coming to your smartwatch - Tom's Guide - November 5th, 2024 [November 5th, 2024]
- The Free Software Foundation Finally Has AI / Machine Learning Apps On Their Radar - Phoronix - October 24th, 2024 [October 24th, 2024]
- Intuit asked us to delete part of this Decoder episode - The Verge - October 24th, 2024 [October 24th, 2024]
- "100% Free" GNU Boot Discovers Again They Have Been Shipping Non-Free Code - Phoronix - October 24th, 2024 [October 24th, 2024]
- The best antivirus software in 2024 for PC - TechRadar - October 24th, 2024 [October 24th, 2024]
- Stunning software giveaway: Save over $500 on tools for video editing, password recovery, and more its all free! - BetaNews - October 18th, 2024 [October 18th, 2024]
- PSA: Windows 10 has entered its final year of free support here's what you need to know - Windows Central - October 18th, 2024 [October 18th, 2024]
- Best video editing software in 2024: free and paid-for tools - Amateur Photographer - October 18th, 2024 [October 18th, 2024]
- Samsung TVs free update to One UI is already happening here are the changes coming to TVs - TechRadar - October 18th, 2024 [October 18th, 2024]