test: surface compute sanitizer logs - #4752
Conversation
Greptile SummaryThis PR replaces the simple
Confidence Score: 4/5Mostly safe to merge; the core signal-forwarding and log-isolation mechanics work correctly, but a one-line guard is missing that causes every signal-interrupted wait to produce a misleading sanitizer-failure message in CI output. The wrapper correctly forwards signals, scopes log filenames per-fork, and tails logs on genuine failures. The one defect is that when Files Needing Attention: build/sanitizer-java/bin/java — the signal-interrupted-wait false-positive at line 51 Important Files Changed
Reviews (6): Last reviewed commit: "test: preserve sanitizer wrapper signals" | Re-trigger Greptile |
|
I reproduced the current pre-commit.ci failure locally by merging this branch onto current origin/main: the clang-format hook modified native source files introduced by the latest main after the cudf submodule sync (#4777), not this sanitizer wrapper change. I opened #4778 with only the hook-generated formatting changes, and #4778 is now passing pre-commit.ci, Greptile, and signoff. Once that lands or the same formatting is applied on main, this PR's remaining red pre-commit should be resolved by rerun/rebase. |
|
Do not dump the entire log - it may be huge. Just take the last few lines that are enough for quick inspection. |
## Summary - Run the repository clang-format hook after the latest cudf submodule sync on `main` - Apply only the mechanical native-source formatting changes produced by the existing pre-commit configuration - Update the expired copyright years reported by `license-header-check` ## Why A local merge of #4752 onto current `origin/main` reproduced the current `pre-commit.ci - pr` failure: the `clang-format` hook modified native source files after the cudf sync in #4777. This PR applies those hook-generated changes directly on top of current `main`, then fixes the license-header files reported by the maintainer-triggered check. ## Validation - `pre-commit run clang-format --all-files --verbose` initially reproduced the same files-were-modified failure - GitHub `pre-commit.ci - pr` passes on head `ef703bfb` - Local equivalent `license-header-check` regex passes for the 23 included changed files - `uvx pre-commit run --files src/main/cpp/faultinj/faultinj.cu src/main/cpp/profiler/ProfilerJni.cpp src/main/cpp/profiler/init_nvtxw.cpp src/main/cpp/profiler/spark_rapids_profile_converter.cpp src/main/cpp/src/KudoGpuSerializerJni.cpp src/main/cpp/src/zorder.cu src/main/cpp/tests/exception_with_row_index.cpp src/main/cpp/tests/multiply.cpp --verbose` passes - `git diff --check` passes - `git diff --check origin/main...HEAD` passes --------- Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com> Co-authored-by: Nghia Truong <7416935+ttnghia@users.noreply.github.com>
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
84895da to
40d6012
Compare
|
Updated this PR for the latest review feedback:
Local validation passed:
|
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
40d6012 to
47ac57b
Compare
|
NOTE: release/26.08 has been created from main. Please retarget your PR to release/26.08 if it should be included in the release. |
|
Retargeted this PR to |
|
build |
abellina
left a comment
There was a problem hiding this comment.
I have one comment and I was wondering if we can force a failure to see the output to add this to the PR. For example, find some kernel we have and then clearly write or read to memory outside of the range. compute-sanitizer should catch and report, that way we can see what it looks like.
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
|
Thanks for the review. The two code changes are now in signed-off commit
Local fake-wrapper coverage verifies the success path, the failure path with only the final 80 log lines, the absolute log path, and TERM/HUP forwarding plus re-raise semantics. The repository license, signoff, ShellCheck, and Greptile checks are green on this head (pre-commit.ci is still pending at the time of this comment). For the requested real compute-sanitizer failure output: I checked the available automation before claiming proof. The public GitHub Actions jobs do not have a GPU, and the Blossom GPU premerge path runs I can prepare a short-lived proof-only commit that enables |
Summary
waitwith a forwarded signal status whenwaitwas signal-interruptedCloses #1337.
Validation
bash -n build/sanitizer-java/bin/javacompute-sanitizerwrapper test: verified stderr reports the sanitizer exit status, prints only the current fork'ssanitizer_for_pid_*.log, and limits a 120-line fake log to lines 041-120compute-sanitizerwrapper test: verified stderr stays empty and the wrapper exits 0compute-sanitizerwrapper test: sent TERM to the wrapper, verified the childcompute-sanitizerreceived TERM and the wrapper exited 143 after waiting for the childgit diff --check origin/main...HEADgit diff --checkuvx --from shellcheck-py shellcheck --format=gcc ... build/sanitizer-java/bin/javaagainst LF-normalized/committed contentuvx pre-commit run --files build/sanitizer-java/bin/java --verboseuvx pre-commit run --all-files --verboselicense-header-check,shell-check,signoff-check,Greptile Review, andpre-commit.ci - prall passedRevalidated on 2026-07-20 before retargeting to
release/26.08:git merge-tree $(git merge-base upstream/release/26.08 HEAD) upstream/release/26.08 HEADshowed no conflict markers or changed-in-both paths for this wrapper changebash -n build/sanitizer-java/bin/javagit diff --check upstream/release/26.08...HEADgit diff --checkcompute-sanitizerwrapper harness passed failure-log tailing/scoping, success quietness, and TERM forwarding casesbash -nplusuvx --from shellcheck-py shellcheck --shell=bash --format=gccon the committed LF blobSKIP=check-clang-format-version uvx pre-commit run --files build/sanitizer-java/bin/java --verbosepassed/skipped only non-applicable hooks; the unskipped always-run clang-format-version hook requiresthirdparty/cudf, which is not initialized in this local checkout