New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will trigger glibc assertion if started with pid 2 #171
Comments
Here is the code ChromiumOS uses (or at least did at one time). So...if we have to I could imagine adapting this, but...it's pretty evil. Particularly given that this really long standing issue is already fixed in glibc git/rawhide. What makes this annoying is I can't seem to trigger the assertion when testing locally. I'm trying:
To run 1000 bwrap instances each of which run 5 processes in the container, to excercise any possible races in both bwrap core and anything with core vs container processes, but nope. |
Oh man. This is so spectacularly evil. Works ✅ reliably:
Fails 💣 every time:
I believe what's going on here is: we'll only hit this assertion if the outer pid happens to match the inner pid. Given that the inner pid is always 2, we'll trip this assertion if the outer pid is 2. In our scenario, have an outer container managed by nspawn, which creates a PID namespace, then in bwrap we go to create a pid namespace too. In the first case, one thing to note is that bash will automatically So...I think we can work around this reliably by simply changing the Fedora infra to prepend an additional shell around the whole process. For example, this works again:
|
Alternatively, use |
https://pagure.io/releng/issue/6602#comment-71459
https://sourceware.org/bugzilla/show_bug.cgi?id=17214
http://repo.or.cz/glibc.git/commit/c579f48edba88380635ab98cb612030e3ed8691e
The workarounds in the middle bug sound awful...but I didn't look in depth.
The text was updated successfully, but these errors were encountered: