All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kaiwen Xu <kaiwen.xu@hulu.com>
To: Jakub Sitnicki <jkbs@redhat.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.
Date: Thu, 16 Mar 2017 11:18:39 -0700	[thread overview]
Message-ID: <20170316181839.GA61894@kevinmbp.test.hulu.com> (raw)
In-Reply-To: <87fuidv6ts.fsf@redhat.com>

On Thu, Mar 16, 2017 at 11:45:03AM +0100, Jakub Sitnicki wrote:
> On Thu, Mar 16, 2017 at 10:12 AM GMT, Kevin Xu wrote:
> > Do you mean the message looping endlessly?
> 
> No, the message is emitted just once. Around 100 seconds after
> destroying a few namespaces. Occurs not so often, maybe once per ten
> runs.
> 
> -Jakub
> 

I saw that happening from time to time during my test as well, I suspect
it was because some TCP sockets stays in either TCP_TIME_WAIT or
TCP_FIN_WAIT1. But eventually those sockets get destroyed and lo gets
deleted as well.

The patch was fixing an issue I am seeing, that the message gets looped
forever, and causing a deadlock on new network ns creation.

Kevin

> > If so, then I suppose it's a different bug.
> >
> > Kevin
> >
> >> On Mar 16, 2017, at 3:01 AM, Jakub Sitnicki <jkbs@redhat.com> wrote:
> >>
> >>> On Thu, Mar 16, 2017 at 08:08 AM GMT, Kevin Xu wrote:
> >>> In some rare cases, inet_sk_rx_dst_set() may be called multiple times
> >>> on the same dst, causing reference count leakage. Eventually, it
> >>> prevents net_device to be destroyed. The bug then manifested as
> >>>
> >>> unregister_netdevice: waiting for lo to become free. Usage count = 1
> >>>
> >>> in the kernel log, preventing new network namespace creation.
> >>>
> >>> The patch works around the issue by checking whether the socket already
> >>> has the same dst set.
> >>>
> >>> Signed-off-by: Kevin Xu <kaiwen.xu@hulu.com>
> >>> ---
> >>
> >> FWIW, with this patch applied I'm still sometimes seeing:
> >>
> >> [  125.928095] unregister_netdevice: waiting for lo to become free. Usage count = 1
> >>
> >> -Jakub

  reply	other threads:[~2017-03-16 18:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  8:08 [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst Kevin Xu
2017-03-16 10:01 ` Jakub Sitnicki
2017-03-16 10:12   ` Kevin Xu
2017-03-16 10:45     ` Jakub Sitnicki
2017-03-16 18:18       ` Kaiwen Xu [this message]
2017-03-16 18:42         ` Cong Wang
2017-03-16 18:16 ` David Miller
2017-03-19  1:48   ` [PATCH net v2] " Kevin Xu
2017-03-19  3:49     ` Cong Wang
2017-03-19  4:03       ` Kaiwen Xu
2017-03-20  4:09         ` Cong Wang
2017-03-20 21:23           ` Kaiwen Xu
2017-03-16 21:33 ` [PATCH] [PATCH net] " Eric Dumazet
2017-03-16 23:13   ` Cong Wang
2017-03-16 23:29     ` Eric Dumazet

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=20170316181839.GA61894@kevinmbp.test.hulu.com \
    --to=kaiwen.xu@hulu.com \
    --cc=davem@davemloft.net \
    --cc=jkbs@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.