Failure call of cudaIpcOpenEventHandle

Process A and Process B exchange data via CUDA IPC shared memory. Process A generates data and sends the shared memory handle to Process B, which then processes the data. Occasionally, Process A has to delete the data before Process B finishes processing it. As a result, when Process B calls cudaIpcOpenEventHandle to open the data, an error occurs: “an illegal memory access was encountered (700)”. And get error like “Jun 24 08:10:25 DL_RDA kernel: NVRM: Xid (PCI:0000:ac:00): 31, pid=551347, name=mainb, Ch 00000009, intr 00000000. MMU Fault: ENGINE GRAPHICS GPC1 GPCCLIENT_T1_9 faulted @ 0x7fa1_0a800000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_READ”

After this, communication via shared memory no longer works, and the only way to recover is to restart both Process A and Process B. This issue sometimes appears only after the programs have been running for about a week. How should this problem be handled and resolved?

Can you avoid deleting the data prematurely?