[Python] Python mmap can read from local/ but Rust shared_memory fails with "MapOpenFailed(2)

Discussão em 'Python' iniciado por Stack, Fevereiro 20, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to share memory between a Python process (using mmap) and a Rust process (using the shared_memory crate). However, I encountered an issue:

    In Python, I can successfully read data from the shared memory file in local/ using mmap.

    In Rust, when I try to open the same shared memory, I get the following error: "MapOpenFailed(2)" I have verified that the file exists and has the correct permissions. What could be the reason for this issue? Could it be related to how shared_memory in Rust accesses memory compared to Python’s mmap?

    I was trying to get data from ETS2 telemetry. I encountered an error in Rust, but everything worked out in Python.

    Continue reading...

Compartilhe esta Página