Re: NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) (was Re: sysfs bug when using tun with network namespaces)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Hi,

On Wed, 4 Aug 2010 14:46:18 -0700
Greg KH <greg@kroah.com> wrote:


Just in case I provide the complete scenario again below.

If I can help somehow (provide further information, test something...)
of course I'll happily do so.

In an network namespace I can use an tun/tap tunnel through ssh and
when closing that namespace then eveything is fine.

But when using openvpn (also tunnel trough tun/tap) in an network
namespace and then closing that namespace I get:

unregister_netdevice: waiting for lo to become free
[repeated]

Please see the following two examples showing that difference:

# > unshare -n /bin/bash
# > # how to setup veth device pair to get connectivity into namespace not shown here
# > tunctl -u ml -t tap1
# > ssh -o Tunnel=Ethernet -w 1:1 somewhere
[ running some traffic over tap1 not shown here ]
^d # logging out from somewhere
# > tunctl -d tap1
# > exit # logging out from shell in network namespace

Now the veth device pair used automagically vanishes and nothing
from that different network namespace remains - very well.

but

# > unshare -n /bin/bash
# > # how to setup veth device pair to get connectivity into namespace not shown here
# > openvpn --config some.config
[ running some traffic over vpn device not shown here ]
^c # stopping openvpn
# > lsof -i
# > netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address
State Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
# > ps ax|grep openvpn|grep -v grep
# > # cannot find anything that suggests there is anything left from that openvpn session 
# > exit # logging out from shell in network namespace

Now I get

Jul 10 20:02:36 doris kernel: unregister_netdevice: waiting for lo to
become free. Usage count = 3 [repeated]

Now one might say it is fault of openvpn (used OpenVPN 2.1_rc20
i586-suse-linux - the one in openSuSE 11.2 package - EDIT: meanwhile it
is 2.1.1, openSuSE 11.3 ), openvpn didn't close some ressource and ssh
does fine.

But: should'nt kernel clean up after process when it exits?
And/or: Should'nt kernel clean up if last process in network namespace
exits - there is nothing left which might use that interface?!


-- 
MfG,

Michael Leun

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sysfs bug when using tun with network namespaces, Michael Leun, (Thu Jul 8, 9:40 am)
Re: sysfs bug when using tun with network namespaces, Michael Leun, (Sat Jul 10, 1:15 am)
Re: sysfs bug when using tun with network namespaces, Michael Leun, (Sat Jul 10, 7:52 am)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Michael Leun, (Wed Aug 4, 3:11 pm)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Eric W. Biederman, (Thu Aug 5, 12:57 pm)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Menil Jean-Philippe, (Mon Dec 6, 9:08 am)
Re: NET_NS: unregister_netdevice: waiting for lo to become ..., Menil Jean-Philippe, (Tue Dec 7, 3:40 am)