From: ebiederm@xmission.com (Eric W. Biederman)
To: Michael Leun <lkml20100708@newton.leun.net>
Cc: Greg KH <greg@kroah.com>,
netdev@vger.kernel.org, davem@davemloft.net,
linux-kernel@vger.kernel.org
Subject: Re: NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) (was Re: sysfs bug when using tun with network namespaces)
Date: Wed, 04 Aug 2010 17:12:29 -0700 [thread overview]
Message-ID: <m1lj8l29zm.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100805001105.5a3453ed@xenia.leun.net> (Michael Leun's message of "Thu\, 5 Aug 2010 00\:11\:05 +0200")
Michael Leun <lkml20100708@newton.leun.net> writes:
> Hi,
>
> On Wed, 4 Aug 2010 14:46:18 -0700
> Greg KH <greg@kroah.com> wrote:
>
>> Eric, here's a bug with the network namespace stuff, care to work on
>> resolving it?
>
> 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]
How many times?
> 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?!
We do, and the only place you will see:
unregister_netdevice: waiting for lo to become free. Usage count = 3 [repeated]
is when the a network namespace is being cleaned up.
However it looks like something is either taking a long time to get
cleaned up, or there is a bug and something is failing to get cleaned
up altogether thus resulting in an infinite stream of messages about waiting
for lo to become free.
I know of cases where a recent kernel can be slow to cleanup everything
attached to lo. I don't know of any cases where it will actually fail
to clean up lo. So I suspect all you are seeing is clean up process that
is slow and annoying not wrong.
Eric
next prev parent reply other threads:[~2010-08-05 0:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 16:40 sysfs bug when using tun with network namespaces Michael Leun
2010-07-09 23:57 ` Greg KH
2010-07-10 8:15 ` Michael Leun
2010-07-10 14:08 ` Greg KH
2010-07-10 14:52 ` Michael Leun
2010-07-10 21:53 ` NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) (was Re: sysfs bug when using tun with network namespaces) Michael Leun
2010-07-11 14:16 ` Greg KH
2010-07-11 17:29 ` FW: " Michael Leun
2010-08-04 13:35 ` Michael Leun
2010-08-04 21:46 ` Greg KH
2010-08-04 22:04 ` NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) Eric W. Biederman
2010-08-04 22:11 ` NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) (was Re: sysfs bug when using tun with network namespaces) Michael Leun
2010-08-05 0:12 ` Eric W. Biederman [this message]
2010-08-05 9:25 ` Michael Leun
2010-08-05 9:51 ` NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) Eric W. Biederman
2010-08-05 10:13 ` Michael Leun
2010-08-05 11:47 ` NET_NS: unregister_netdevice: waiting for lo to become free (adding ipv6 address to interface) Michael Leun
2010-08-05 19:57 ` Eric W. Biederman
2010-08-05 20:11 ` David Miller
2010-08-05 23:45 ` lkml20100708
2010-08-06 0:09 ` Michael Leun
2010-10-21 15:15 ` Michael Leun
2010-10-22 12:48 ` David Lamparter
2010-10-22 17:05 ` Michael Leun
2010-10-24 13:15 ` Michael Leun
2010-12-06 16:08 ` Menil Jean-Philippe
2010-12-06 21:22 ` Eric W. Biederman
2010-12-06 22:47 ` Michael Leun
2010-12-07 10:40 ` Menil Jean-Philippe
2010-08-05 16:57 ` NET_NS: unregister_netdevice: waiting for lo to become free (after using openvpn) Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1lj8l29zm.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml20100708@newton.leun.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome