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
- 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]
- The best open-source productivity software: Free tools to boost your workflow - XDA Developers - October 9th, 2024 [October 9th, 2024]
- Best tax software of 2024: File fast and accurately, plus get your maximum refund - CNBC - October 7th, 2024 [October 7th, 2024]
- The IRS is expanding its free tax filing service. Do you qualify? - The Washington Post - October 4th, 2024 [October 4th, 2024]
- Explore Top Free Software Alternatives to Popular Paid Programs for Budget-Friendly Solutions - Gizbot - October 4th, 2024 [October 4th, 2024]
- The best free video players in 2024: watch videos in any format - TechRadar - October 4th, 2024 [October 4th, 2024]
- Ford unveils BlueCruise 1.4: hands-free driving time doubled with new software update - CBT Automotive News - October 3rd, 2024 [October 3rd, 2024]
- Free Photo Viewer for Windows - Free download and software reviews - Download.com - October 3rd, 2024 [October 3rd, 2024]
- Top 10 Cool Free Windows Software (You'll Really Want) - MSN - October 3rd, 2024 [October 3rd, 2024]
- Best free YouTube to MP3 converter of 2024 - TechRadar - October 3rd, 2024 [October 3rd, 2024]
- The best free alternatives for pricey software: Adios, Office and Adobe - PCWorld - September 28th, 2024 [September 28th, 2024]
- Best Free Accounting Software for Small Businesses (Sponsored content from Jerry) - Varsity Online - September 21st, 2024 [September 21st, 2024]
- WhatsApp for Windows - Free download and software reviews - Download.com - September 21st, 2024 [September 21st, 2024]
- FDA approves some Apple AirPods to be used as hearing aids - NPR - September 16th, 2024 [September 16th, 2024]
- Q-Free releases new flexible, modular, and scalable tolling software solution - Highways News - September 16th, 2024 [September 16th, 2024]
- Clark Center for Geospatial Analytics to offer free version of TerrSet/IDRISI software starting Dec. 2 - Geo Week News - September 3rd, 2024 [September 3rd, 2024]
- Best video editing apps of 2024: Top tools for Android, iPhone, and iPad - TechRadar - September 3rd, 2024 [September 3rd, 2024]
- Samsung extends free software upgrades to millions of Smart TV owners are YOU one of them? - GB News - September 3rd, 2024 [September 3rd, 2024]
- This open-source software can double the volume of Windows laptops. For free - The Indian Express - August 22nd, 2024 [August 22nd, 2024]
- European Commission cuts funding support for Free Software projects - European Digital Rights (EDRi) - August 22nd, 2024 [August 22nd, 2024]
- Hyundai partners with TCSO to combat car thefts with free software patch - KEYE TV CBS Austin - August 22nd, 2024 [August 22nd, 2024]
- Free and Discounted Software for University of Oklahoma Students - The University of Oklahoma - August 16th, 2024 [August 16th, 2024]
- GitHub is the Best Place for Free and Open Source Software - How-To Geek - August 16th, 2024 [August 16th, 2024]
- The Usual Suspects Xenia, a free Waldorf microwave II/XT emulation using the DSP56300 plugin - Synth Anatomy - August 16th, 2024 [August 16th, 2024]
- Best free Adobe Illustrator alternatives of 2024 - TechRadar - June 24th, 2024 [June 24th, 2024]
- This is how to view the long-established free software 'CrystalDiskInfo' that shows the health status and SMART ... - GIGAZINE - June 24th, 2024 [June 24th, 2024]
- The best antivirus software 2024: Free and paid options - Tom's Guide - June 20th, 2024 [June 20th, 2024]
- Best free text-to-speech software of 2024 - TechRadar - May 20th, 2024 [May 20th, 2024]
- Best free word processor of 2024 - TechRadar - May 20th, 2024 [May 20th, 2024]
- Best free antivirus in 2024 - TechRadar - May 20th, 2024 [May 20th, 2024]
- 'Open-Shell Menu' is an open source software that returns the Windows start menu to its previous appearance for free - GIGAZINE - May 20th, 2024 [May 20th, 2024]
- Avast Free Antivirus: Testing its features and learning about the six layers of protection - TechSpot - May 20th, 2024 [May 20th, 2024]
- The best Android antivirus apps in 2024 - Tom's Guide - May 3rd, 2024 [May 3rd, 2024]
- Best photo editing software in 2024 - Tom's Guide - May 3rd, 2024 [May 3rd, 2024]
- BYD recalls 16666 Seagull EVs in China due to software issue that may prevent reverse camera image from displaying - CnEVPost - May 3rd, 2024 [May 3rd, 2024]
- KIA installs free anti-theft software this weekend in St. Louis area - KSDK.com - April 28th, 2024 [April 28th, 2024]
- Best survey tool of 2024 - TechRadar - April 28th, 2024 [April 28th, 2024]
- Grand Rapids Police and Hyundai Offer Free Anti-Theft Software Upgrades Amid Vehicle Theft Wave - Hoodline - April 26th, 2024 [April 26th, 2024]
- Blueprint Software Systems Announces Free Trial for RPA Analytics Solution - PR Web - April 26th, 2024 [April 26th, 2024]
- Houston Police, Hyundai to host free anti-theft security event for vehicle owners - Houston Public Media - April 26th, 2024 [April 26th, 2024]
- Hyundai providing free anti-theft software installation this weekend at Greenspoint Mall - KHOU.com - April 20th, 2024 [April 20th, 2024]
- Ubuntu Studio in new LTS beta; still the easiest creative Linux distro - CDM Create Digital Music - Create Digital Music - April 20th, 2024 [April 20th, 2024]
- How to get free help with income tax prep, or free software | Business | postandcourier.com - The Post and Courier - February 23rd, 2024 [February 23rd, 2024]
- Best encryption software of 2024 - TechRadar - February 23rd, 2024 [February 23rd, 2024]
- The best free VPN in 2024 - TechRadar - February 23rd, 2024 [February 23rd, 2024]