Causality analysis

The causality analysis report helps you understand the cause of a specific bug by showing you which events in your system are associated with the bug becoming more likely.

To generate the report, Antithesis rewinds the simulation to different times before the bug happens and tries new sequences of events to see whether the bug occurs or not. The causality analysis graph in the report summarises these results by showing you bug probability over time.

To see how the graph works, we’ll use a toy example of a program that simulates flipping two coins one after another, and then checks the result later. If both coins come up heads, we count it as a bug.

We take a single timeline where we saw the bug and rewind time to different points. From each point, we let Antithesis explore forward multiple times and see if we still hit the bug. Putting all this information together gives us a graph of bug probability against time:

Causality analysis for the coin flip example.

To interpret this graph, it’s easiest to work backwards from the bug:

  • If you rewind to a point after the second flip, you know that both coins came up heads. At this point the bug is “baked in”: you’re guaranteed to see it when you check, and so the probability is 100%.
  • If you rewind to somewhere between the first and second flip, you know that the first coin came up heads. But as Antithesis explores forwards again, the second coin flip could be either heads or tails, leading to a bug probability of roughly 50%.
  • If you rewind to before the first flip, each coin flip could be either heads or tails, leading to a bug probability of roughly 25%.

The coin flips stand out as two sharp jumps in the bug probability. Jumps like this are a strong signal that something interesting is happening at those points.

Below the graph, you’ll see the logs for the original bug timeline, filtered for the time window that you’re currently viewing. You can use the logs to investigate what’s happening around the time of the jump.

How to generate a causality analysis report

You can generate a causality analysis report from a specific example in the Properties section of the triage report:

Examples of a bug in the triage report, with 'Causality analysis' button.

To generate the report, select Causality analysis for the example you’re interested in. Give your report a description, and optionally add email addresses. Then select to generate the report.

To view your report, go to the Debugging sessions view. Once results start streaming, you will see your report in the list. Click on it to watch the graph update in real time. If you provided an email address, you will also get the final report emailed to you once streaming finishes.

  • Introduction
  • How Antithesis works
  • Using Antithesis with AI
  • Get started
  • Test an example system
  • With Docker Compose
  • Build and run an etcd cluster
  • Add a test template
  • With Kubernetes
  • Build and run an etcd cluster
  • Add a test template
  • Setup guide
  • For Docker Compose users
  • For Kubernetes users
  • Product
  • Test templates
  • Creating test templates
  • Test commands
  • How to check a test template locally
  • How to port tests to Antithesis
  • Test launchers
  • The triage report
  • Findings
  • Environment
  • Utilization
  • Properties
  • Logs Explorer & multiverse map
  • Debugging
  • Causality analysis
  • Multiverse debugging
  • Advanced mode
  • The Antithesis multiverse
  • Querying with event sets
  • Environment utilities
  • Using the Antithesis Notebook
  • Cookbook
  • Tooling integrations
  • CI integration
  • Discord and Slack integrations
  • Issue tracker integration - BETA
  • Configuration
  • Access and authentication
  • The Antithesis environment
  • Best practices
  • Docker best practices
  • Kubernetes best practices
  • Optimizing for testing
  • Concepts
  • Properties and Assertions
  • Properties in Antithesis
  • Assertions in Antithesis
  • Sometimes Assertions
  • Properties to test for
  • Fault injection
  • Reference
  • Webhooks
  • Launching a test
  • Launching a debugging session
  • Webhook parameters
  • SDK reference
  • Define test properties
  • Generate randomness
  • Manage test lifecycle
  • Assertion catalog
  • Coverage instrumentation
  • Go
  • Instrumentor
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Java
  • Using the SDK
  • Building your software
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • C
  • C++
  • C/C++ Instrumentation
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • JavaScript
  • Python
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Rust
  • Instrumentation
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • .NET
  • Instrumentation
  • Tutorial
  • Assert (reference)
  • Lifecycle (reference)
  • Random (reference)
  • Languages not listed above
  • Assert (reference)
  • Lifecycle (reference)
  • Assertion Schema
  • Handling external dependencies
  • FAQ
  • Product FAQs
  • About Antithesis POCs
  • Release notes
  • Release notes
  • General reliability resources
  • Reliability glossary
  • Techniques for better software testing
  • Autonomous testing
  • Deterministic simulation testing
  • Property-based testing
  • White paper — How much does an outage cost?
  • Catalog of reliability properties for key-value datastores
  • Catalog of reliability properties for blockchains
  • Test ACID compliance with a ring test