Repository navigation
Conversation
Signed-off-by: Yaser Afshar <yaser.afshar@intel.com>
Signed-off-by: Yaser Afshar <yaser.afshar@intel.com>
Signed-off-by: Yaser Afshar <yaser.afshar@intel.com>
Signed-off-by: Yaser Afshar <yaser.afshar@intel.com>
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Review complete — no issues found. |
|
🤖 CI Triage Agent — TL;DR: Full analysisSummary: Root cause: A hang, not a slow test. The test starts at Implicated commit: unknown — not the PR commit. [REDACTED:Hex High Entropy String] / PR #12441 ("UCT/ZE/IPC: Allow peers to import IPC handles without CMA") touches only the ZE IPC transport, which is not exercised by this File: test/gtest/ucp/test_ucp_request.cc:512 (test definition) / :392 (the Suggested fix: Re-run the job to confirm the failure is not reproducible for this PR — the diff cannot affect Related: PR #12441 (#12441, the PR under test — unrelated to the failure); possibly relevant to the restart/flush path: #12266 "UCP/FLUSH: Flush the other lanes after the pending lane", #12322 "UCP/RMA: Fix restart of partially sent PUT requests"
|
What?
Call
ucs_sys_ptrace_enable_peers()fromuct_ze_ipc_md_open(), and add a regression test.Follow-up to #12165, which did the same for cuda_ipc.
Why?
A ze_ipc importer duplicates the exporter's dma-buf fd with
pidfd_getfd(), which must pass the ptrace access check against the exporter. Under Yamaptrace_scope1, a peer on the same node that is not an ancestor of the exporter passes only if the exporter calledprctl(PR_SET_PTRACER), or if the peer hasCAP_SYS_PTRACE. Before this change, ze_ipc did not grant theexception itself. CMA can grant it during resource discovery, but if no applicable exception is in place, an unprivileged peer can get
EPERMfrompidfd_getfd()and the import fails. ze_ipc has no fallback for a failed import: UCT put/get return an error. In our UCPtag_bwrun over ze_ipc, the rendezvous then did not complete and both sides waited until the timeout.How?
Call the helper in
md_open, the same as cuda_ipc and CMA, guarded bySYS_pidfd_openandSYS_pidfd_getfd, like the import path.The exception is process-wide. Under Yama
ptrace_scope=1,PR_SET_PTRACER_ANYremoves Yama's ancestry restriction for otherwise permitted callers, not just UCX peers. Closing the MD does not restore the previous setting. UCP opens every MD before it filtersUCX_TLS, so excluding ze_ipc fromUCX_TLSdoes not prevent this call.UCX_MODULES=^zesuppresses this ZE call, but CMA can still grant the same process-wide exception: it sets it while querying its resources, regardless ofUCX_TLS.New test
test_ze_ipc_rma_xproc.md_open_allows_peersruns in an exec'd copy of the test, so that the test's ownprctl()calls (the reset and the retry below) do not change the gtest process. That copy:pidfd_getfd(), and skips onENOSYSorEPERM(missing syscall or a syscall filter);CAP_SYS_PTRACE);EPERM, retries withPR_SET_PTRACER_ANYset by the test. The test fails if that retry succeeds, because the MD should have granted access, and skips if access is still denied.Any other error fails the test. It skips unless
ptrace_scopeis 1. If another library in the process grants the exception while the MD opens, the test also passes without the fix.For both comparisons below, Yama
ptrace_scopewas 1,CAP_SYS_PTRACEwas dropped, and no exception granted by another component was in effect when access was checked.On B60 and B70, the regression test failed without the fix and passed with it, including with CMA disabled. Separately, on B60 with CMA disabled, UCT put/get and UCP
tag_bwover ze_ipc failed without the fix and passed with it.Simulated
EPERMandENOSYSproduced the expected skips. The existing ZE gtest suite completed successfully on both nodes, with 10 skips per run.