As testing with lxc containers showed, the clever idea does not work
there because that is a case where there is at least one of the
addresses (actually it seems both) is set. So it more and more looks
like the real problem is that whenever the namespace is to be torn down,
there is nothing enforcing to immediately evicting and releasing
elements in the route cache that belong to the interfaces in that
namespace.

One observation I made while fiddling around with this a bit more. Running the 
test program, then abort it with ctrl-c starts the messages about lo having a 
refcount of 2. Trying to start the same test will hang on the first listen. 
That would indicate that something that still hold some required lock or mutex 
is still running (the tear down has not finished). This will end after a longer 
time (I have not measured but process blocked is triggered at least once). And 
after that time the test programs connect will work again. That could mean two 
things:
1. Cleanup did finally succeed
2. Cleanup was aborted, we leak the bits in the route cache but at least new 
net namespaces are possible.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1021471

Title:
  clone() hang when creating new network namespace (dmesg show
  unregister_netdevice: waiting for lo to become free. Usage count = 2)

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1021471/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to