Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710119

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

From Wei Wang <weiwan@google.com>
Newsgroups linux.kernel
Subject Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1
Date 2017-08-12 02:20 +0200
Message-ID <udsjM-1Rd-9@gated-at.bofh.it> (permalink)
References (6 earlier) <ucKC5-79t-1@gated-at.bofh.it> <ucOw2-1gs-13@gated-at.bofh.it> <ud0dQ-Jr-17@gated-at.bofh.it> <udlih-5Uh-3@gated-at.bofh.it> <udlV0-6mk-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

> If after Cong's fix, the issue still happens, could you help try the
> patch attached and collect all logs when you try the reproduce the
> issue? It would be great to have logs for both success case and the
> failure case.
>
> Thanks so much for your help.
>

I think we have a potential fix for this issue.
Martin and I found that when addrconf_dst_alloc() creates a rt6, it is
possible that rt6->dst.dev points to loopback device while
rt6->rt6i_idev->dev points to a real device.
When the real device goes down, the current fib6 clean up code only
checks for rt6->dst.dev and assumes rt6->rt6i_idev->dev is the same.
That leaves unreleased refcnt on the real device if rt6->dst.dev
points to loopback dev.

The attached potential fix is tested by Martin and made sure it fixes his issue.

John,
It will be great if you can also give it a try and see if it fixes the
issue on your side before I submit an official patch.

Thanks very much for the help from everyone.

Wei

On Fri, Aug 11, 2017 at 10:25 AM, Wei Wang <weiwan@google.com> wrote:
> On Fri, Aug 11, 2017 at 9:48 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> Hi,
>>
>> On Thu, Aug 10, 2017 at 11:12 AM, John Stultz <john.stultz@linaro.org> wrote:
>>> On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang <weiwan@google.com> wrote:
>>>> Hi John,
>>>>
>>>> Is it possible to try the attached patch?
>>>
>>> Thanks so much for the quick turn around!
>>>
>>> So I dropped all the reverts you suggested, and applied this one
>>> against 4.13-rc4, but I'm still seeing the problematic behavior.
>>
>> Does the following one-line fix make a difference?
>>
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index a640fbcba15d..c145a35763a0 100644
>> --- a/net/ipv6/route.c
>> +++ b/net/ipv6/route.c
>> @@ -141,7 +141,7 @@ static void rt6_uncached_list_del(struct rt6_info *rt)
>>                 struct uncached_list *ul = rt->rt6i_uncached_list;
>>
>>                 spin_lock_bh(&ul->lock);
>> -               list_del(&rt->rt6i_uncached);
>> +               list_del_init(&rt->rt6i_uncached);
>>                 spin_unlock_bh(&ul->lock);
>>         }
>>  }
>
>
> Thanks a lot Cong for proposing this fix.
>
> For the last few days, John has been helping me running debug image
> and we found out that the leaked dst is probably in addrconf.c.
> Martin and I are looking through the code and trying to put more debugs.
>
> John,
>
> If after Cong's fix, the issue still happens, could you help try the
> patch attached and collect all logs when you try the reproduce the
> issue? It would be great to have logs for both success case and the
> failure case.
>
> Thanks so much for your help.
>
> Wei

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

unregister_netdevice: waiting for eth0 to become free. Usage count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-07 23:10 +0200
  Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-07 23:20 +0200
    Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-10 01:40 +0200
      Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-10 01:50 +0200
        Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-10 02:40 +0200
          Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-10 02:50 +0200
          Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-10 03:30 +0200
            Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-10 03:40 +0200
              Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-10 07:50 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-10 20:20 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-10 22:10 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-11 18:50 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-11 19:30 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 David Ahern <dsahern@gmail.com> - 2017-08-12 02:20 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 02:30 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 David Ahern <dsahern@gmail.com> - 2017-08-12 05:40 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 21:40 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 02:20 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-12 02:40 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 02:50 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 John Stultz <john.stultz@linaro.org> - 2017-08-12 05:10 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 21:30 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 21:30 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Ido Schimmel <idosch@idosch.org> - 2017-08-12 20:20 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-12 21:50 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 David Ahern <dsahern@gmail.com> - 2017-08-13 18:30 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 Wei Wang <weiwan@google.com> - 2017-08-13 23:00 +0200
                Re: unregister_netdevice: waiting for eth0 to become free. Usage  count = 1 David Ahern <dsahern@gmail.com> - 2017-08-14 01:10 +0200

csiph-web