On Sat, Feb 12, 2022 at 03:32:30PM +0000, Etienne Dechamps etienne@edechamps.fr wrote:
I'm not sure I understand everything that's going on in this thread but it does seem very relevant. You guys might want to double-check the behavior in the particular scenario described there. I'm mostly sending this to make sure everything is cross-linked.
Thanks for the report with strace.
AFAICT, it's caused by setresuid() after unshare(), i.e. all root's tasks are (wrongly) compared against the lowered RLIMIT_NPROC.
This is tackled by my RFC patch 2/6 [1] or Eric's variant but 3/8 (equivalent fix for this case but I haven't run that build).
Michal
[1] I could run your test (LimitNPROC=1 actually) against kernel with my patches and the service starts.