Skip to content

accel/ane: stay wedged when a power cycle cannot restore the engine - #1446

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
ane/t600x-honest-wedge
Nov 10, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
ane/t600x-honest-wedge

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

On the M1 Pro (T6000), a job that times out without a completion event leaves the engine unable to run any later task. Recovery power-cycles the partitions, drains the retained task manager, reads it idle and logs tm recovered, wedged returns to 0, and every following job (a known-good one-task convolution included) times out the same way until reboot.

This decides per failure whether a power cycle can help:

  • timeout with no completion event on a SoC that retains the task manager (T600x): not recoverable without a reboot;
  • any SoC: the first job after a recovery failing the same way means the recovery did not restore the engine.

In those cases the engine stays wedged until reboot: wedged stays 1 (sysfs_notify), a new wedge_reason attribute says why, a change uevent carries ANE_WEDGED=1, submits are refused at once with -ECANCELED, recovery and reset return -EIO, and BO mappings stay preserved. Task errors (a finish line set) and bad event counts keep their recovery; a completed job ends the probation.

Tests:

  • KUnit ane-tm-recovery (8 cases) passes under arm64 QEMU; the other ANE suites are unchanged (ane-h16-program program_add128_slots_test fails the same way on the base commit).
  • tools/asahi/ane-tm-transient-fault-tests.py gains three hang cases and a probation case on the production poll; the previous ane_tm.c fails them.
  • tools/asahi/run-host-tests.py: 224/224.

M1 Pro (T6000), Linux, same config as the current default kernel, one-shot boot:

before after
deliberate hang (pool program, -110, no events) tm recovered, wedged 0 engine wedged until reboot, wedged 1, wedge_reason set, uevent ANE_WEDGED=1
known-good one-task conv after the hang 1 s timeout, another fake recovery, each time refused at once
reset fake success -EIO
after reboot conv passes conv passes (relL2 2.2e-4)

0 AVCs, Enforcing.

🤖 Generated with Claude Code

On the M1 Pro (T6000), a job that times out without one completion
event leaves the engine unable to run any later task: recovery
power-cycles every ANE partition, drains the retained task manager,
reads it idle and logs "tm recovered", wedged returns to 0, and then
every job, a known-good one-task convolution included, times out the
same way (-110, finish lines=0) until the next boot. The T600x tm/tq
register file keeps its state through the power cycle and through PMGR
reset pulses, and the drain only clears what a task error latches. So
the recovery reported success it did not have, and each later submit
cost a 1 s timeout and another fake recovery.

Decide per failure whether a power cycle can help:

- A timeout without completion events on a SoC that retains the task
  manager (T600x) cannot be recovered without a reboot.
- On every SoC, the first job after a recovery that fails the same way
  shows the recovery did not restore the engine.

In both cases the engine stays wedged until reboot: wedged stays 1 and
is notified, a new wedge_reason attribute says why, a change uevent
carries ANE_WEDGED=1, submissions are refused at once with -ECANCELED,
recovery and the reset attribute return -EIO, and BO mappings stay
preserved as for a failed reset. Task errors (a finish line set) and bad
event counts keep their one recovery attempt; a completed job clears the
probation. KUnit covers the decision, and the host harness for the
completion poll now also runs three hang cases against the production
code (the previous code fails them).

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant