netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Willem de Bruijn <willemb@google.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	syzkaller <syzkaller@googlegroups.com>,
	Dan Streetman <ddstreet@canonical.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	tommi.t.rantala@nokia.com, alexey.kodanev@oracle.com,
	Neil Horman <nhorman@tuxdriver.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	linux-sctp
Subject: Re: net: hang in unregister_netdevice: waiting for lo to become free
Date: Sat, 3 Feb 2018 13:15:05 +0100	[thread overview]
Message-ID: <CADvbK_fKDbUnAkdLrgm6rgj895Gb06AK7HaT0s9VD=zdF+vf6Q@mail.gmail.com> (raw)
In-Reply-To: <CADvbK_dgEa5g0ynY4F8pX6LuuBwW4e42rK_TFuRhY1=2G5zinw@mail.gmail.com>

On Thu, Feb 1, 2018 at 1:49 AM, Xin Long <lucien.xin@gmail.com> wrote:
> On Tue, Jan 30, 2018 at 11:59 PM, David Ahern <dsahern@gmail.com> wrote:
>> On 1/30/18 1:57 PM, David Ahern wrote:
>>> On 1/30/18 1:08 PM, Daniel Borkmann wrote:
>>>> On 01/30/2018 07:32 PM, Cong Wang wrote:
>>>>> On Tue, Jan 30, 2018 at 4:09 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
>>>>>> Hello,
>>>>>>
>>>>>> The following program creates a hang in unregister_netdevice.
>>>>>> cleanup_net work hangs there forever periodically printing
>>>>>> "unregister_netdevice: waiting for lo to become free. Usage count = 3"
>>>>>> and creation of any new network namespaces hangs forever.
>>>>>
>>>>> Interestingly, this is not reproducible on net-next.
>>>>
>>>> The most recent change on netns refcnt was 4ee806d51176 ("net: tcp: close
>>>> sock if net namespace is exiting") in net/net-next from 5 days ago, maybe
>>>> fixed due to that?
>>>>
>>>
>>> This appears to be the commit introducing the refcnt leak:
>>>
>>> $ git bisect bad
>>> dbc2b5e9a09e9a6664679a667ff81cff6e5f2641 is the first bad commit
>>> commit dbc2b5e9a09e9a6664679a667ff81cff6e5f2641
>>> Author: Xin Long <lucien.xin@gmail.com>
>>> Date:   Fri May 12 14:39:52 2017 +0800
>>>
>>>     sctp: fix src address selection if using secondary addresses for ipv6
>>>
>>>
>>> v4.14 is bad. Running bisect in the background while doing other things....
>>>
>>
>> Interesting. The commit that avoids the refcnt leak is
>>
>> commit 955ec4cb3b54c7c389a9f830be7d3ae2056b9212
>> Author: David Ahern <dsahern@gmail.com>
>> Date:   Wed Jan 24 19:45:29 2018 -0800
>>
>>     net/ipv6: Do not allow route add with a device that is down
>>
>> That commit does not intentionally address the problem so it is just
>> masking the problematic code introduced by the commit above.
> Thanks, David A.
>
> I'm still on a trip. will look into this asap.

Alexey and Tommi already had the patches for this issue on
both SCTP v4 and v6 dst_get, Thanks.

  reply	other threads:[~2018-02-03 12:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 12:09 net: hang in unregister_netdevice: waiting for lo to become free Dmitry Vyukov
2018-01-30 18:32 ` Cong Wang
2018-01-30 20:08   ` Daniel Borkmann
2018-01-30 20:57     ` David Ahern
2018-01-30 22:59       ` David Ahern
2018-02-01  0:49         ` Xin Long
2018-02-03 12:15           ` Xin Long [this message]
2018-02-19 18:59             ` Dmitry Vyukov
2018-02-20  7:56               ` Tommi Rantala
2018-02-20  8:14                 ` Dmitry Vyukov
2018-02-20 16:26                   ` Neil Horman
2018-02-21 14:53                     ` Tommi Rantala
2018-04-12 12:15                       ` Dmitry Vyukov
2018-04-13 11:37                         ` Neil Horman
2018-04-13 12:43                         ` Dan Streetman
2018-04-13 15:54                           ` Dmitry Vyukov
2018-04-16  7:35                             ` Dmitry Vyukov
2018-04-16 19:42                               ` Dan Streetman
2018-05-10  6:46                                 ` Dmitry Vyukov
2018-05-10 10:23                                   ` Dan Streetman
2018-05-11  9:19                                     ` Dmitry Vyukov
2018-05-11 11:40                                       ` Dan Streetman

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='CADvbK_fKDbUnAkdLrgm6rgj895Gb06AK7HaT0s9VD=zdF+vf6Q@mail.gmail.com' \
    --to=lucien.xin@gmail.com \
    --cc=alexey.kodanev@oracle.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=ddstreet@canonical.com \
    --cc=dsahern@gmail.com \
    --cc=dvyukov@google.com \
    --cc=ebiederm@xmission.com \
    --cc=edumazet@google.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=syzkaller@googlegroups.com \
    --cc=tommi.t.rantala@nokia.com \
    --cc=willemb@google.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).