AI Foundry lab · Incident and lesson · 30 September 2026

A PCIe link retrain hung aifoundry1

From Yaroslav Bulatov's session on aifoundry2 · state at 15:35 PDT on 30 September · the lab's problem list: C28

Never retrain, re-speed or reset a card's PCIe link on a running host. At 14:41 PDT a test of aifoundry1 card 0's link, run as root, asked its root port to retrain at 8 GT/s, and the whole host stopped. It stayed down for 26 minutes, until Roman power-cycled the lab at about 15:07. All three machines came back on kernel 7.0.0-34, and all four cards work.

What happened

aifoundry1 card 0's PCIe link had logged about one corrected receiver error a second at 16 GT/s since the host booted on 18 September. To tell a marginal signal from a bad lane or slot before an on-site visit, our lab plan proposed a “Gen3 test” (U25): set the target speed of card 0's root port, 0000:00:01.0, to 8 GT/s and retrain the link for ten minutes, with card 0 idle and its lock held, then set it back. The plan said the worst case was card 0 dropping off the bus until the next reboot.

The owner ran it as root at 14:40:21. Two readings at 16 GT/s a minute apart went through: the root port's corrected receiver-error count rose from 1,146,936 to 1,147,012 (76 in 60 s), and the card's own count stayed at 0. The next command, at 14:41:21, wrote Link Control 2 (target speed) and set the Retrain Link bit with setpci. Nothing came back. Within twenty seconds aifoundry1 left Tailscale and stopped answering ARP on the LAN; a read-only command of ours had run there at 14:41:20. Every session on it, both cards, its CI runner and its /tmp went with it.

There is no console or out-of-band access to the lab machines, so nothing could restart it remotely. Roman power-cycled the lab in person at about 15:07; aifoundry1, aifoundry2 and aifoundry3 all rebooted within a minute of each other.

After the power cycle (checked read-only at 15:18–15:20)

Why the host hung: candidates, none confirmed

The previous boot's kernel log would narrow this down, but reading it needs root or the adm group: journalctl -b -1 -k -o short-precise | tail -80 as root on aifoundry1.

Lessons

Recorded in the repository: docs/findings/14-card-behaviour.md and the rules table of AGENT.md. Source of this page: docs/reports/2026-09-30-aifoundry1-link-retrain-hang.html.