![]() |
|
Message-ID: <b602b57212d44e7f90708ba9ed6aad02597fc885.camel@gmail.com> Date: Tue, 28 Jan 2025 14:22:31 +0100 From: Daniele Personal <d.dario76@...il.com> To: musl@...ts.openwall.com Subject: pthread_mutex_t shared between processes with different pid namespaces Hello everyone, I'm working on a library linked by some processes in order to exchange information. Such library uses some pthread_mutex_t instances to safely read/write the information to exchange: the mutexes are created with the PTHREAD_PROCESS_SHARED and PTHREAD_MUTEX_ROBUST attributes and shared through shared memory mmapped by the processes. Now, for certain reasons, I have to run one of the processes in a container and I found that, after a random interval of time, the process in the container got stuck in a pthread_mutex_lock without any reason. After some investigation I figured out that if the container is started without pid namespace isolation everithing works like a charm. So the questions: is the pid namespace isolation a problem when working with shared mutexes or should I investigate in other directions? If the problem is pid namespace isolation, what could be done to make it working apart from sharing the same pid namespace? The actual development is based on musl 1.2.4 built with Yocto Scarthgap for aarch64 and arm. Thanks in advance for any help, Daniele.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.