SYS_clone vs fork - set_robust_list missing

26 views
Skip to first unread message

Adon

unread,
May 16, 2022, 12:16:39 PM5/16/22
to minijail
Hi,

I'd like to first thank for sharing the work with the public! Truly appreciate it.

As you know, when PID namespace is applied, the code would use SYS_clone instead of fork. As a matter of fact, this would lose the set_robust_list call that is also executed under the hood with the glibc fork() favor. As a result, we lost our ability to catch and recover from dead process which locked on a mutex (EOWNERDEAD no longer returned). 

Could you consider adding that into the library? Or would you suggest some workaround to this problem?

Thanks,
Adon

Mike Frysinger

unread,
May 16, 2022, 12:34:34 PM5/16/22
to Adon, minijail
hmm, i vaguely recall reading a discussion on clone & glibc usage somewhere (unrelated to minijail).
tl;dr is that once a code base calls clone(), glibc no longer supports the runtime.  which is reasonable.

our own minijail code says that creating minijails w/pid namespaces in a multi-threaded process is unsupported.  is that what you're trying to do ?

this doesn't mean single-threaded processes are guaranteed to work either, it just seems like so far it's worked well enough that we haven't worried about it.
-mike

--
You received this message because you are subscribed to the Google Groups "minijail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minijail+u...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/minijail/46893d34-1333-4809-9bed-0c0fc157e53fn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages