Repository navigation
accel/ane: stay wedged when a power cycle cannot restore the engine - #1446
Merged
Merged
Conversation
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]>
RyanTheTide
marked this pull request as ready for review
November 10, 2026 09:57
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,wedgedreturns 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:
In those cases the engine stays wedged until reboot:
wedgedstays 1 (sysfs_notify), a newwedge_reasonattribute says why, a change uevent carriesANE_WEDGED=1, submits are refused at once with -ECANCELED, recovery andresetreturn -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:
ane-tm-recovery(8 cases) passes under arm64 QEMU; the other ANE suites are unchanged (ane-h16-programprogram_add128_slots_testfails the same way on the base commit).tools/asahi/ane-tm-transient-fault-tests.pygains three hang cases and a probation case on the production poll; the previousane_tm.cfails them.tools/asahi/run-host-tests.py: 224/224.M1 Pro (T6000), Linux, same config as the current default kernel, one-shot boot:
tm recovered, wedged 0engine wedged until reboot, wedged 1, wedge_reason set, ueventANE_WEDGED=1reset0 AVCs, Enforcing.
🤖 Generated with Claude Code