The lost atomic update on LoongArch LA664
In February 2026, Wang Miao encountered an issue while packaging the normaliz software for Debian on a LoongArch server. The software's built-in test was stuck in an infinite loop, which Wang Miao traced back to the use of OpenMP's #pragma omp atomic for accumulating a shared variable. The loop's exit condition required the accumulated value to reach a specific number, but the result was always less than that number, causing the infinite loop.
Despite the complexity of the code, the team was unable to reduce the issue to a minimal example that could be easily understood, so they shelved the matter. Half a year later, in August, Wang Miao returned to investigate, and they employed an AI-assisted approach to create a stable minimal reproduction of the issue. This investigation revealed that the CPU's atomic add instruction occasionally fails to be atomic, which led to the discovery of a new CPU erratum.
Loongson, the manufacturer of the LoongArch processor, acknowledged the issue and released a test firmware fix before National Day (October 1), which should resolve the problem.
Brief written by urgent.news from Lobsters's own syndicated text. Machine-written — may contain errors; check the original before relying on it.