[lxc-devel] setns/fork(glibc) weird interaction, lxc-attach may hang sporadically

Christian Seiler christian at iwakd.de
Tue Apr 23 18:30:07 UTC 2013


Hi again,

> util-linux is affected the same way as far as I can tell (haven't 
> tried
> it though), and should run into the assertion and fail for no good
> reason.

Btw. I just noticed: -F is actually worse than not using -F. If you use
the -F flag for nsenter, nsenter itself will not fork(), but directly
exec() to the specified program. That program will not completely be in
the pid namespace, but its children will be. So if that program then
uses fork(), because it's a shell for example, most of those forks will
work without a hitch, but some will fail for the exact same reason and
then that will be a whole other kind of mess...

-- Christian





More information about the lxc-devel mailing list