mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] pthread_mutex_t shared between processes with different pid namespaces
@ 2025-01-28 13:22 Daniele Personal
  2025-01-28 15:02 ` Rich Felker
  0 siblings, 1 reply; 28+ messages in thread
From: Daniele Personal @ 2025-01-28 13:22 UTC (permalink / raw)
  To: musl

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.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-02-11 13:53 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-28 13:22 [musl] pthread_mutex_t shared between processes with different pid namespaces Daniele Personal
2025-01-28 15:02 ` Rich Felker
2025-01-28 16:13   ` Daniele Personal
2025-01-28 18:24   ` Florian Weimer
2025-01-31  9:31     ` Daniele Personal
2025-01-31 20:30       ` Markus Wichmann
2025-02-03 13:54         ` Daniele Personal
2025-02-01 16:03       ` Florian Weimer
2025-02-03 12:58         ` Daniele Personal
2025-02-03 17:25           ` Florian Weimer
2025-02-04 16:48             ` Daniele Personal
2025-02-04 18:53             ` Rich Felker
2025-02-05 10:17               ` Daniele Personal
2025-02-05 10:32                 ` Florian Weimer
2025-02-06  7:45                   ` Daniele Personal
2025-02-07 16:19                     ` Rich Felker
2025-02-08  9:20                       ` Daniele Dario
2025-02-08 12:39                         ` Rich Felker
2025-02-08 14:40                           ` Daniele Dario
2025-02-08 14:52                             ` Rich Felker
2025-02-10 16:12                               ` Daniele Personal
2025-02-10 18:14                                 ` Rich Felker
2025-02-11  9:34                                   ` Daniele Personal
2025-02-11 11:38                                     ` Rich Felker
2025-02-11 13:53                                       ` Daniele Personal
2025-02-10 18:44                                 ` Jeffrey Walton
2025-02-10 18:58                                   ` Rich Felker
2025-02-07 16:34                     ` Florian Weimer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).