set_robust_list() missing

20 views
Skip to first unread message

Adon

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

Before my question, I'd like to thank for the work!

I tried to migrate to the libminijail library, and when the PID namespace is ON, we all know that SYS_clone will be used instead of fork().

Everything works great, but I realize I lost the ability to recover from dead mutex. When there's a dead process, EOWNERDEAD is no longer returned when calling pthread_mutex_lock().

A little digging shows that fork() in glibc is making a call to SYS_set_robust_list after the SYS_clone.

Is there a way libminijail can also help making an equiv. SYS_set_robust_list? 

p.s. I tried looking around, but I'm not familiar enough to know how to reference to THREAD_SELF like glibc. pthread_self() seems to be very close, but I can't figure out yet given it's casted to become pthread_t (or unsigned long int).

Thanks,
Adon

Reply all
Reply to author
Forward
0 new messages