> ## Third-party library workarounds

> Fixes for third-party libraries that don't work in the Antithesis environment out of the box.

> Fetch the complete documentation index at: https://antithesis.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---

Most software runs in the [Antithesis environment](/docs/configuration/the_antithesis_environment/) without changes. A few third-party libraries make assumptions about the machine that don't hold here, and fail as a result. This page lists the ones we know about and how to fix them.

## AWS-LC

[AWS-LC](https://github.com/aws/aws-lc) is a cryptographic library. By default, it seeds its random number generator from CPU jitter: the small, random differences in how long instructions take to run. To check that this source works, it reads the CPU timestamp counter (`RDTSC`) 1024 times, and aborts if it sees a repeated value or if the gaps between values are too regular.

The Antithesis CPU is deterministic, so this timing is too regular. The check fails and your process aborts. This affects any program that uses AWS-LC, including through wrappers such as `aws-lc-rs`.

To fix this, turn off the jitter source when you build AWS-LC.

> **Warning**
>
> There's no way to turn off the jitter source at runtime. Setting the variable or flag below in your running container does nothing; it must be set when AWS-LC is compiled.

### How to tell if you're affected

Your process dies with `SIGABRT` (signal 6) and prints nothing to `stderr`. The backtrace is the only clue. Look for one of these frames:

```text
jent_entropy_collector_alloc
jent_read_entropy
tree_jitter_get_root_seed
tree_jitter_initialize
```

In Rust builds, these names may have a version prefix, such as `aws_lc_<version>_`.

The crash doesn't happen at startup. It happens the first time something asks for randomness, which is often your first TLS handshake. This can make it look like a network bug.

You may use AWS-LC without having chosen it. It often comes in through TLS stacks, cloud SDKs, and native extension modules. To find out, run these checks on the executable or shared library that contains the crypto code:

```sh
# Is AWS-LC present? Prints something like "AWS-LC 5.5.0".
strings -a ./your-binary | grep -o 'AWS-LC[^"]*' | sort -u

# Is the jitter source compiled in? Any output means yes.
objdump -T ./libcrypto.so | grep jent_    # shared library
nm -a ./your-binary | grep jent_          # static binary, not stripped
```

If your binary is static and stripped, the second check can come back empty even when the jitter code is there. In that case, trust the first check.

For Rust, run `cargo tree -i aws-lc-sys` instead.

For interpreted languages, the crypto code lives in a native module that's loaded at runtime. List the shared libraries your running process has loaded, then run the checks on each one:

```sh
awk '/\.so/ {print $6}' /proc/<pid>/maps | sort -u
```

### Fix

For Rust (`aws-lc-rs` or `aws-lc-sys`), set `AWS_LC_SYS_NO_JITTER_ENTROPY=1` wherever `aws-lc-sys` is compiled. For example, in a Dockerfile:

```dockerfile
ENV AWS_LC_SYS_NO_JITTER_ENTROPY=1
RUN cargo build --release
```

The crate's build script reads this variable, and Cargo rebuilds `aws-lc-sys` when its value changes.

For C and C++, pass this flag to CMake:

```sh
cmake -DDISABLE_CPU_JITTER_ENTROPY=ON ...
```

If you link a prebuilt or distro-packaged `libcrypto`, you need to rebuild it yourself with this flag.

### Check the fix

Run the `jent_` check above again. It should print nothing, because the fixed build leaves out the jitter code entirely.

You can also check at build time, which is easier to add to CI. With CMake, the configure step prints:

```text
-- Entropy source configuration: CPU Jitter opt-out
-- Entropy source configured: Dynamic (default: Operating system)
```

A default build prints `Dynamic (default: CPU Jitter)` instead. With Rust, run `cargo build -vv 2>&1 | grep NO_JITTER_ENTROPY` to confirm the build script saw the variable.
