Skip to content

[Bug] Allreduce L3 cases intermittently hit an AICore UB out-of-bounds in full-suite onboard runs #1489

Description

@ChaoWao

Platform

a2a3 (Ascend 910B/C hardware)

Runtime Variant

tensormap_and_ringbuffer

Description

Two L3 collective cases — TestAllreduceOnephaseP2 (2 ranks) and TestAllreduceRingP4 (4 ranks) — intermittently fail with an AICore VEC addressing fault, not a timeout:

VEC instruction error: the ub address out of bounds
  core id 15, blk:1, errcode 0x4000000000000000
→ aicpu exception → 507018 → sched_error_code=100 SCHEDULER_TIMEOUT

The 507018 / SCHEDULER_TIMEOUT tail is the consequence, not the mechanism: per .claude/rules/running-onboard.md, 507018 is a generic host-side code, and here the device log names a UB out-of-bounds as the thing that actually fired. A vector unit reading outside its UB allocation is a real addressing bug, so this should not be filed away as scheduling noise even though it presents as flaky.

Only reproduced in a full pytest examples tests/st run with many devices in flight; never in isolation.

This is likely to get more frequent, not less. The failures were seen while validating a wide parallel scheduler, and #1309 has since removed the user-facing block_dim knob — every run now takes the whole device (24 clusters on a2a3) instead of whatever a case pinned. Whatever contention widens this window is now the default configuration for every case in the suite.

Steps to Reproduce

# Full suite, 8 devices — the failing cases are multi-device L3 running
# concurrently with unrelated cases under the resource scheduler.
task-submit --timeout 3600 --max-time 3600 --device auto --device-num 8 \
    --run "python -m pytest examples tests/st --platform a2a3 --device \$TASK_DEVICE"

Observed once in a full-suite run; a second full-suite run immediately after passed 54/54, and pytest tests/st/worker/collectives/allreduce --platform a2a3 alone passed 10/10 on the same build. Expect to repeat the full suite several times to hit it.

To capture the device-side evidence, redirect the device log out of the shared default first:

LOGDIR="$PWD/outputs/allreduce_ub/ascend"; mkdir -p "$LOGDIR"
export ASCEND_PROCESS_LOG_PATH="$LOGDIR"

Expected Behavior

TestAllreduceOnephaseP2 and TestAllreduceRingP4 pass regardless of what else is running concurrently on other devices. Kernel UB addressing must not depend on scheduler width or on unrelated cases sharing the box.

Actual Behavior

VEC instruction error: the ub address out of bounds
  core id 15, blk:1, errcode 0x4000000000000000
→ aicpu exception → 507018 → sched_error_code=100 SCHEDULER_TIMEOUT

TestAllreduceOnephaseP2 (2 devices) and TestAllreduceRingP4 (4 devices) both failed in the same run.

Git Commit ID

d60b8acdd6f11ee0b3ec1e5bb1b32a1c3e0e9c26

CANN Version

(not recorded at the time of the run)

Driver Version

npu-smi 26.0.rc1

Host Platform

Linux (aarch64)

Additional Context

First observed 2026-07-24 during a full onboard a2a3 suite run validating the prepare_launch_shape / available_*_count change on #1458. The commit above is current main; nothing merged since addresses this path.

Ruled out as caused by that PR: src/a2a3/runtime/host_build_graph/host/runtime_maker.cpp is the only bind-time reader of worker_count, so moving the core-geometry publication ahead of the bind is a no-op for tensormap_and_ringbuffer — which is the runtime both of these collectives use (@scene_test(level=3, runtime="tensormap_and_ringbuffer")).

What would narrow it down: the failing core id 15, blk:1 plus the UB offset in the device log should identify which kernel and which tile index overran. Both cases share _ALLREDUCE_MODES incores under tests/st/worker/collectives/allreduce/kernels/aiv/, so a rank-count-dependent or peer-count-dependent UB offset computation is the first place to look — the two failing configurations are 2-rank onephase and 4-rank ring, while other collective cases in the same run passed.

Related (both closed, for error-class context only): #1036 (AICore VEC UB-not-aligned → 507018, single-rank, reproducible), #897 (allreduce SCHEDULER_TIMEOUT, root cause was idle threads, not a VEC fault).

Tracked locally in KNOWN_ISSUES.md since 2026-07-24; filing here so it is visible.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions