CUDA build: host zerocopy acks routed to the device handler (setNcpyOpInfo declared with 24 parameters, defined with 25)
I maintainer di solito rispondono entro 1 giorno
@adityapb ci sta già lavorando.
Dal 18/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
On a CUDA-enabled charm-on-reconverse build, four host-side zerocopy tests fail with 2 processes (1 node or 2): zerocopy_with_qd and bcast_nonzero_root hang under a flood of CkRdmaDevice> WARNING: ack for unknown id, dereg_and_nodereg segfaults in CkRdmaDeviceRecvHandler, zc_post_async aborts with "Called send on corrupted callback". All pass single-process, and all pass on a non-CUDA build (Delta jobs 22108646/22108647 versus 22110164/22110165). Found 2026-09-15 while rerunning the site tier on Delta (#3982).
Mechanism
Charm++ declares setNcpyOpInfo itself, in the CMK_RECONVERSE branch of src/util/cmirdmautils.h, with 24 parameters. Reconverse's definition (contrib/reconverse/src/cmirdmautils.cpp, declared in include/cmirdmautils.h) has 25: a trailing void *deviceRdmaOpInfo, stored into NcpyOperationInfo. Both are extern "C", so the call in performEmApiRget (src/ck-core/ckrdma.C) links against the wrong arity and the callee reads its last argument from a stack slot the caller never wrote. Every entry-method zerocopy operation therefore carries stack garbage in deviceRdmaOpInfo.
On builds with CMK_CUDA || CMK_HIP, CkRdmaDirectAckHandler (ckrdma.C:311) treats a non-null deviceRdmaOpInfo as "this completion belongs to a device transfer" and routes the ack to CkRdmaDeviceRecvHandler, which casts the pointer to a DeviceRdmaOp. A bogus tag gives the unknown-id flood; the device handler does its own QD accounting, so the host operation's QdProcess never runs (the hangs); dereferencing gives the segfault and the corrupted callback. Confirmed with a diagnostic print (Delta job 22110118): opMode=1 (CMK_EM_API) acks arriving in the device branch with deviceRdmaOpInfo pointing into the caller's stack.
Fix
PR #3984 passes the argument (guarded by CMK_RECONVERSE, since classic's signature keeps 24 parameters). With it, the four tests and the rest of tests/charm++/zerocopy pass with 2 processes on the CUDA build (job 22110493).
Follow-ups this exposes
- The declaration duplication is the defect class. Charm++ carries its own copies of reconverse declarations (
src/util/cmirdmautils.h, and theCmiNcpyBuffer/NcpyOperationInfomirrors) instead of including reconverse's headers. Anextern "C"signature can drift without any compiler diagnostic, as it did here. Charm++ on reconverse should includecontrib/reconverse/include/cmirdmautils.hand drop the copy. - Use
opMode, not a pointer sentinel, to tell device completions from host ones.NcpyOperationInfo::opModeis always written bysetNcpyOpInfo(values 0-8 used; 9-255 free), so aCMK_DEVICE_APImode cannot be stack garbage. That flips the invariant from "every host path must remember to null a field" to "the device path must set its mode", which fails loudly on a path the GPU tests exercise instead of intermittently on host paths.setReverseModeForNcpyOpInfoneeds a no-op case for it.deviceRdmaOpInfostays as payload. - Hygiene: reconverse's
CmiNcpyBufferdefault constructor leavesdeviceRdmaOpInfouninitialized (include/conv-rdma.h:206); the two explicit constructors set it. Reachable throughCmiDeviceBuffer::lci_ncpy_buffer,pup_util.C:191, and reconverse's owntests/rdma_ping. One-line initializer; patch held for the reconverse side. - No CI runs any test on a CUDA build.
reconverse-cuda.yamlcompiles only. Host tests on a CUDA build are a configuration NAMD's GPU build on reconverse uses; a GPU runner or a manual site-run step for CUDA builds would have caught this. - Separate, pre-existing:
tests/charm++/zerocopy/zc_post_modify_sizewith 2 processes segfaults on both the fixed and unfixed CUDA builds (jobs 22110662, 22110700), and it is not in the CI tier; likely the same defect as reconverse#223. - A CUDA-enabled build cannot run on a node without a GPU at all: LCI's accelerator layer calls
cuInitat startup and aborts. Worth its own issue if not intended.
🤖 Generated with Claude Code
- Lingua principale
- C++
- Stelle
- 241
- Fork
- 62
- Merge medio
- 1g 1h
- PR unite (30g)
- 121
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di charmplusplus/charm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmplusplus/charm#4210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
charmplusplus/charm#4160 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
charmplusplus/charm#3619 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
charmplusplus/charm#4204 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 49/100
charmplusplus/charm#4200 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di charmplusplus/charm
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] VPN auth dialog spawned by the secret agent fails with "TLS support is not available" on NixOSApertabug nixos umbriel
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
noctalia-dev/noctalia#5310 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docdb kind/bug priority/medium status/awaiting-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37426 ·
I maintainer di solito rispondono entro 1 giorno
-
[Engine] Two prompt block scorers enabled at once: WMMA silently wins and no log line is printedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Niko1221/Strata#5693 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
torch.special.gammainc/gammaincc lose up to 7 digits in float64 for a > 20 near x: single-precision pi in the asymptotic seriesForse già presa @SowndaryaS0201 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pytorch/pytorch#204127 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno