Skip to content

fix(cuda-oxide): make check-error-example-status immune to SIGPIPE - #1630

Open
0z5a wants to merge 1 commit into
NVIDIA:mainfrom
0z5a:fix/error-example-guard-sigpipe
Open

0z5a wants to merge 1 commit into
NVIDIA:mainfrom
0z5a:fix/error-example-guard-sigpipe

Conversation

@0z5a

@0z5a 0z5a commented Oct 24, 2026

Copy link
Copy Markdown

Summary

check-error-example-status.sh runs under set -euo pipefail, and its contains() piped printf into grep -qx. grep -q exits at the first match. printf can then die of SIGPIPE, and pipefail turns the match into a miss.

On a GH200 (aarch64) host, just check-guards failed intermittently with:

error: error_enum_shared_pointer_layout is not in ERROR_EXAMPLES in smoketest.sh

That name is in the array. The name sits early in the list, so grep exits while printf still has lines to write.

This PR compares in a bash loop instead.

Changes

  • cuda-oxide/scripts/check-error-example-status.sh: contains() compares in a bash loop instead of piping printf into grep -qx.

Testing

Host Original guard, failures Fixed guard, failures
GH200 (aarch64), 50 runs each 13 0
B300 (x86_64), 20 runs of the original 0 —

Removing error_enum_shared_pointer_layout from ERROR_EXAMPLES still makes the fixed guard fail with that message.

GH200 (cc 9.0, aarch64) | driver 595.58 | CUDA 13.2 | rustc 1.99.1 | cuda-rust fc747196

check-oxide-artifacts-parity.sh:55 has the same grep … | grep -q shape under pipefail, but its producer writes at most four lines, and I did not see it fail.

  • just -f cuda-oxide/Justfile check passes -- fmt-check, clippy and check-intrinsics pass on GH200; the test stage did not fit on that host's disk, and this change touches only the guard script, run directly above
  • cargo oxide run <example> -- not applicable
  • New example added (if applicable) -- not applicable

Checklist

  • All commits signed off (git commit -s)
  • SPDX headers on new source files -- no new files

contains() piped printf into `grep -qx` under `set -euo pipefail`. grep -q
exits at the first match, printf can then die of SIGPIPE, and pipefail turns
the match into a miss. On an aarch64 (GH200) host the guard failed 13 times in
50 with "error_enum_shared_pointer_layout is not in ERROR_EXAMPLES in
smoketest.sh", a name that is in the array; on x86 it did not reproduce.

Compare in a bash loop instead. 50 runs on the same host: 0 failures; a name
really missing from ERROR_EXAMPLES is still reported.

Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
@0z5a
0z5a requested a review from nihalpasham as a code owner October 24, 2026 15:54
@copy-pr-bot

copy-pr-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
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