Unraveling a Postgres segfault that uncovered an Arm64 JIT compiler bug | Datadog
Jan 15, 2025Anthonin Bonnefoy, Mitch Ward, Gillian McGarvey

Summary
This post details the investigation and resolution of a critical segmentation fault in Datadog's Postgres clusters, which was traced back to a bug in the Arm64 JIT compiler (specifically within LLVM). The investigation involved isolating the issue, reproducing it on Arm64 instances, and debugging a Postgres build with JIT debugging support enabled. The root cause was identified as an infinite loop in the Arm64 JIT compilation process for certain expressions, leading to a segfault or a 100% CPU utilization.