Latest
AWS opens Project C2, which pairs AI with formal proofs to find hidden bugs
Image: Amazon

AWS opens Project C2, which pairs AI with formal proofs to find hidden bugs

Amazon Web Services has introduced Project Code Confidence, or Project C2, a bug-finding technique that pairs large language models with automated reasoning. AWS said it is opening access to a limited number of customers, with plans to widen availability over time.

AWS said it tested the approach on 22 popular open source projects and found more than 800 bugs, ranging from complex race conditions to thread-safety problems. It said it shared fixes with the maintainers. The company is also applying the technique to internal services including Amazon Aurora, Amazon DynamoDB and Amazon Elastic Block Store.

Why rare bugs matter at scale

AWS said that in 2015 it saw a one-in-a-million error occur a few times a second on its platform. A little over a decade later, it said, such errors happen thousands of times a second. It expects the rise of AI agents to push that number up further.

The company said these bugs are not the security vulnerabilities attackers exploit, but are just as important to fix. It added that they tend to cluster in code that handles errors and failures, which runs rarely but is critical when it does.

How Project C2 works

AWS said frontier AI models struggle with subtle distributed-systems bugs because there are too many variables and possible orderings of events. As an example, it said a single round of agreement between three machines under the Paxos protocol can unfold in more than 90,000 unique orders, and that figure grows exponentially once lost packets and retries are included.

Project C2 reads code and supporting documentation to build an understanding of what a system should do, then tries to prove the implementation matches that intent. It uses mathematical tools such as the Lean theorem prover to produce model-written proofs that hold across all possible orderings, rather than testing each one.

When it finds a mismatch, the system either refines its understanding of the intent or has found a real bug. For real bugs, AWS said, it builds a test that triggers the problem in the actual implementation, rates severity, and then develops, tests and proves the correctness of a fix.

AWS said existing tools generally rely on known patterns, such as static analysis and security scanners, or on a model’s raw judgement, such as AI code review and coding agents. It said that is why they miss edge cases.

Examples from open source

In one case, AWS said it scanned a popular Rust performance-profiling library and found nine local thread-safety bugs, including one that could make the reporting thread panic and lose later data.

In a popular open source in-memory database, AWS said a background process could retry a failed disk-sync check and clear an error flag when the retry succeeded. On Linux-like systems, it said, the second success only confirms data written after the failed attempt, so critical data could be lost after a reboot.

In a widely deployed distributed key-value store built on the Raft protocol, AWS found a time-of-check to time-of-use bug in lease handling. An old leader could keep revoking leases after losing leadership, which AWS said could in theory leave a cluster with two payment processors and lead to double-charging customers.

AWS said it has run the technique on hundreds of codebases and found similar bugs in nearly all of them. Every report included detailed reproductions, often with automated tests, and tested patches.

Access and next steps

AWS said users do not need expertise in AI or automated reasoning, and that Project C2 can examine anything from a single library to an entire distributed system. Interested customers can sign up through the Project C2 page. The company said it will add more automated reasoning techniques in the coming months, from bug finding to regression testing.

The announcement was made as part of AWS re:Invent.

Source: Amazon News