Comment 27 for bug 1021471

Revision history for this message
Stefan Bader (smb) wrote :

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.