Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705862 > unrolled thread
| Started by | John Stultz <john.stultz@linaro.org> |
|---|---|
| First post | 2017-08-07 23:10 +0200 |
| Last post | 2017-08-11 19:30 +0200 |
| Articles | 13 — 3 participants |
Back to article view | Back to linux.kernel
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
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2017-08-07 23:10 +0200 |
| Subject | unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ubXrJ-5Uw-33@gated-at.bofh.it> |
So, with recent testing with my HiKey board, I've been noticing some quirky behavior with my USB eth adapter. Basically, pluging the usb eth adapter in and then removing it, when plugging it back in I often find that its not detected, and the system slowly spits out the following message over and over: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 I've tried to go through and bisect it, but apparently the issue isn't always reproducible, as I'm apparently getting lots of false negatives (where I can't always reproduce boot to boot the issue on the same kernel). I've done three bisection passes (always restarting with the "first bad commit" from the previous bisection as the initial bad commit for the following pass), and it does seem to keep moving back. But it seems much easier to trigger with newer kernels then older (and so far I've not seen it with 4.12). Wanted to see if anyone had any ideas what might be going wrong, and how I should further debug this. The last bisect log I generated was: # good: [6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c] Linux 4.12 git bisect good 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c # bad: [98fdd857a3bd6a3bf0003d3f68f07c25c85dcde3] net: ethernet: ti: cpsw: move skb timestamp to packet_submit git bisect bad 98fdd857a3bd6a3bf0003d3f68f07c25c85dcde3 # good: [48b6bbef9a1789f0365c1a385879a1fea4460016] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net git bisect good 48b6bbef9a1789f0365c1a385879a1fea4460016 # good: [a2e8bbd2ef5457485f00b6b947bbbfa2778e5b1e] bpf: Fix test_obj_id.c for llvm 5.0 git bisect good a2e8bbd2ef5457485f00b6b947bbbfa2778e5b1e # good: [273889e306256e95ea55d5ebaef99310cf589def] Merge tag 'mlx5-updates-2017-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux git bisect good 273889e306256e95ea55d5ebaef99310cf589def # bad: [8f46d46715a12f509e13200033a1ed4d6cf335ff] cxgb4: Use Firmware params to get buffer-group map git bisect bad 8f46d46715a12f509e13200033a1ed4d6cf335ff # bad: [f5c306470ed0a8f03ba7017f397da2555b5800d4] Merge tag 'mlx5-updates-2017-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux git bisect bad f5c306470ed0a8f03ba7017f397da2555b5800d4 # bad: [e289ef0ded13021db292be9aef134451546e7c60] net: dsa: mv88e6xxx: clarify SMI PHY functions git bisect bad e289ef0ded13021db292be9aef134451546e7c60 # bad: [836d57e5c08e13bb206dcd559d96ee9355e8316e] liquidio: implement vlan filter enable and disable git bisect bad 836d57e5c08e13bb206dcd559d96ee9355e8316e # bad: [ad65a2f05695aced349e308193c6e2a6b1d87112] ipv6: call dst_hold_safe() properly git bisect bad ad65a2f05695aced349e308193c6e2a6b1d87112 # good: [0830106c53900181d336350581119af09e123bf3] ipv4: take dst->__refcnt when caching dst in fib git bisect good 0830106c53900181d336350581119af09e123bf3 # good: [b838d5e1c5b6e57b10ec8af2268824041e3ea911] ipv4: mark DST_NOGC and remove the operation of dst_free() git bisect good b838d5e1c5b6e57b10ec8af2268824041e3ea911 # bad: [9514528d92d4cbe086499322370155ed69f5d06c] ipv6: call dst_dev_put() properly git bisect bad 9514528d92d4cbe086499322370155ed69f5d06c # good: [1cfb71eeb12047bcdbd3e6730ffed66e810a0855] ipv6: take dst->__refcnt for insertion into fib6 tree git bisect good 1cfb71eeb12047bcdbd3e6730ffed66e810a0855 # first bad commit: [9514528d92d4cbe086499322370155ed69f5d06c] ipv6: call dst_dev_put() properly But again, reverting the "ipv6: call dst_dev_put() properly" commit doesn't seem to completely resolve the issue on newer kernels (though it may make it harder to trigger), and I suspect with further bisection passes I might move further back. Ideas? I don't seem to have similar issues with USB mass storage devices, so it seems to be networking specific. thanks -john
[toc] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2017-08-07 23:20 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ubXBn-5Yw-13@gated-at.bofh.it> |
| In reply to | #1705862 |
On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: > So, with recent testing with my HiKey board, I've been noticing some > quirky behavior with my USB eth adapter. > > Basically, pluging the usb eth adapter in and then removing it, when > plugging it back in I often find that its not detected, and the system > slowly spits out the following message over and over: > unregister_netdevice: waiting for eth0 to become free. Usage count = 1 The other bit is that after this starts printing, the board will no longer reboot (it hangs continuing to occasionally print the above message), and I have to manually reset the device. thanks -john
[toc] | [prev] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-08-10 01:40 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucIJX-5Sx-9@gated-at.bofh.it> |
| In reply to | #1705865 |
(Cc'ing Wei whose commit was blamed) On Mon, Aug 7, 2017 at 2:15 PM, John Stultz <john.stultz@linaro.org> wrote: > On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: >> So, with recent testing with my HiKey board, I've been noticing some >> quirky behavior with my USB eth adapter. >> >> Basically, pluging the usb eth adapter in and then removing it, when >> plugging it back in I often find that its not detected, and the system >> slowly spits out the following message over and over: >> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 > > The other bit is that after this starts printing, the board will no > longer reboot (it hangs continuing to occasionally print the above > message), and I have to manually reset the device. > So this warning is not temporarily shown but lasts until a reboot, right? If so it is a dst refcnt leak. How reproducible is it for you? From my reading, it seems always reproduced when you unplug and plug your usb eth interface? Is there anything else involved? For example, network namespace. Thanks.
[toc] | [prev] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2017-08-10 01:50 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucITE-5Z7-15@gated-at.bofh.it> |
| In reply to | #1708066 |
On Wed, Aug 9, 2017 at 4:34 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote: > (Cc'ing Wei whose commit was blamed) > > On Mon, Aug 7, 2017 at 2:15 PM, John Stultz <john.stultz@linaro.org> wrote: >> On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: >>> So, with recent testing with my HiKey board, I've been noticing some >>> quirky behavior with my USB eth adapter. >>> >>> Basically, pluging the usb eth adapter in and then removing it, when >>> plugging it back in I often find that its not detected, and the system >>> slowly spits out the following message over and over: >>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >> >> The other bit is that after this starts printing, the board will no >> longer reboot (it hangs continuing to occasionally print the above >> message), and I have to manually reset the device. >> > > So this warning is not temporarily shown but lasts until a reboot, > right? If so it is a dst refcnt leak. Correct, once I get into the state it lasts until a reboot. > How reproducible is it for you? From my reading, it seems always > reproduced when you unplug and plug your usb eth interface? > Is there anything else involved? For example, network namespace. So with 4.13-rc3/4 I seem to trigger it easily, often with the first unplug of the USB eth adapter. But as I get back closer to 4.12, it seemingly becomes harder to trigger, but sometimes still happens. So far, I've not been able to trigger it with 4.12. I don't think network namespaces are involved? Though its out of my area, so AOSP may be using them these days. Is there a simple way to check? I'll also do another bisection to see if the bad point moves back any further. thanks -john
[toc] | [prev] | [next] | [standalone]
| From | Wei Wang <weiwan@google.com> |
|---|---|
| Date | 2017-08-10 02:40 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucJG1-6yK-1@gated-at.bofh.it> |
| In reply to | #1708074 |
On Wed, Aug 9, 2017 at 4:44 PM, John Stultz <john.stultz@linaro.org> wrote: > On Wed, Aug 9, 2017 at 4:34 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote: >> (Cc'ing Wei whose commit was blamed) >> >> On Mon, Aug 7, 2017 at 2:15 PM, John Stultz <john.stultz@linaro.org> wrote: >>> On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: >>>> So, with recent testing with my HiKey board, I've been noticing some >>>> quirky behavior with my USB eth adapter. >>>> >>>> Basically, pluging the usb eth adapter in and then removing it, when >>>> plugging it back in I often find that its not detected, and the system >>>> slowly spits out the following message over and over: >>>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >>> >>> The other bit is that after this starts printing, the board will no >>> longer reboot (it hangs continuing to occasionally print the above >>> message), and I have to manually reset the device. >>> >> >> So this warning is not temporarily shown but lasts until a reboot, >> right? If so it is a dst refcnt leak. > > Correct, once I get into the state it lasts until a reboot. > >> How reproducible is it for you? From my reading, it seems always >> reproduced when you unplug and plug your usb eth interface? >> Is there anything else involved? For example, network namespace. > > So with 4.13-rc3/4 I seem to trigger it easily, often with the first > unplug of the USB eth adapter. > > But as I get back closer to 4.12, it seemingly becomes harder to > trigger, but sometimes still happens. > > So far, I've not been able to trigger it with 4.12. > > I don't think network namespaces are involved? Though its out of my > area, so AOSP may be using them these days. Is there a simple way to > check? > > I'll also do another bisection to see if the bad point moves back any further. > > thanks > -john Hi John, Does your USB adapter get an IPv6 address? If you see the problem starts to happen on commit 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all the following commits: (from new to old) 1eb04e7c9e63 net: reorder all the dst flags a4c2fd7f7891 net: remove DST_NOCACHE flag b2a9c0ed75a3 net: remove DST_NOGC flag 5b7c9a8ff828 net: remove dst gc related code db916649b5dd ipv6: get rid of icmp6 dst garbage collector 587fea741134 ipv6: mark DST_NOGC and remove the operation of dst_free() ad65a2f05695 ipv6: call dst_hold_safe() properly 9514528d92d4 ipv6: call dst_dev_put() properly and try if it starts to work? By only reverting 9514528d92d4 definitely won't work as all the later commits depend on this one. Thanks a lot. Wei
[toc] | [prev] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2017-08-10 02:50 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucJPH-6D0-1@gated-at.bofh.it> |
| In reply to | #1708100 |
On Wed, Aug 9, 2017 at 5:36 PM, Wei Wang <weiwan@google.com> wrote: > > Does your USB adapter get an IPv6 address? Yes, it does. > If you see the problem starts to happen on commit > 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all > the following commits: > (from new to old) > 1eb04e7c9e63 net: reorder all the dst flags > a4c2fd7f7891 net: remove DST_NOCACHE flag > b2a9c0ed75a3 net: remove DST_NOGC flag > 5b7c9a8ff828 net: remove dst gc related code > db916649b5dd ipv6: get rid of icmp6 dst garbage collector > 587fea741134 ipv6: mark DST_NOGC and remove the operation of dst_free() > ad65a2f05695 ipv6: call dst_hold_safe() properly > 9514528d92d4 ipv6: call dst_dev_put() properly > > and try if it starts to work? I'll give that a shot! Thanks so much for the help! I really appreciate it! -john
[toc] | [prev] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2017-08-10 03:30 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucKsq-768-11@gated-at.bofh.it> |
| In reply to | #1708100 |
On Wed, Aug 9, 2017 at 5:36 PM, Wei Wang <weiwan@google.com> wrote: > On Wed, Aug 9, 2017 at 4:44 PM, John Stultz <john.stultz@linaro.org> wrote: >> On Wed, Aug 9, 2017 at 4:34 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote: >>> (Cc'ing Wei whose commit was blamed) >>> >>> On Mon, Aug 7, 2017 at 2:15 PM, John Stultz <john.stultz@linaro.org> wrote: >>>> On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: >>>>> So, with recent testing with my HiKey board, I've been noticing some >>>>> quirky behavior with my USB eth adapter. >>>>> >>>>> Basically, pluging the usb eth adapter in and then removing it, when >>>>> plugging it back in I often find that its not detected, and the system >>>>> slowly spits out the following message over and over: >>>>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >>>> >>>> The other bit is that after this starts printing, the board will no >>>> longer reboot (it hangs continuing to occasionally print the above >>>> message), and I have to manually reset the device. >>>> >>> >>> So this warning is not temporarily shown but lasts until a reboot, >>> right? If so it is a dst refcnt leak. >> >> Correct, once I get into the state it lasts until a reboot. >> >>> How reproducible is it for you? From my reading, it seems always >>> reproduced when you unplug and plug your usb eth interface? >>> Is there anything else involved? For example, network namespace. >> >> So with 4.13-rc3/4 I seem to trigger it easily, often with the first >> unplug of the USB eth adapter. >> >> But as I get back closer to 4.12, it seemingly becomes harder to >> trigger, but sometimes still happens. >> >> So far, I've not been able to trigger it with 4.12. >> >> I don't think network namespaces are involved? Though its out of my >> area, so AOSP may be using them these days. Is there a simple way to >> check? >> >> I'll also do another bisection to see if the bad point moves back any further. So I went through another bisection around and got 9514528d92d4 ipv6: call dst_dev_put() properly as the first bad commit again. > If you see the problem starts to happen on commit > 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all > the following commits: > (from new to old) > 1eb04e7c9e63 net: reorder all the dst flags > a4c2fd7f7891 net: remove DST_NOCACHE flag > b2a9c0ed75a3 net: remove DST_NOGC flag > 5b7c9a8ff828 net: remove dst gc related code > db916649b5dd ipv6: get rid of icmp6 dst garbage collector > 587fea741134 ipv6: mark DST_NOGC and remove the operation of dst_free() > ad65a2f05695 ipv6: call dst_hold_safe() properly > 9514528d92d4 ipv6: call dst_dev_put() properly And reverting this set off of 4.13-rc4 seems to make the issue go away. Is there anything I can test to help narrow down the specific problem with that patchset? thanks -john
[toc] | [prev] | [next] | [standalone]
| From | Wei Wang <weiwan@google.com> |
|---|---|
| Date | 2017-08-10 03:40 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucKC5-79t-1@gated-at.bofh.it> |
| In reply to | #1708125 |
On Wed, Aug 9, 2017 at 6:26 PM, John Stultz <john.stultz@linaro.org> wrote: > On Wed, Aug 9, 2017 at 5:36 PM, Wei Wang <weiwan@google.com> wrote: >> On Wed, Aug 9, 2017 at 4:44 PM, John Stultz <john.stultz@linaro.org> wrote: >>> On Wed, Aug 9, 2017 at 4:34 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote: >>>> (Cc'ing Wei whose commit was blamed) >>>> >>>> On Mon, Aug 7, 2017 at 2:15 PM, John Stultz <john.stultz@linaro.org> wrote: >>>>> On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: >>>>>> So, with recent testing with my HiKey board, I've been noticing some >>>>>> quirky behavior with my USB eth adapter. >>>>>> >>>>>> Basically, pluging the usb eth adapter in and then removing it, when >>>>>> plugging it back in I often find that its not detected, and the system >>>>>> slowly spits out the following message over and over: >>>>>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >>>>> >>>>> The other bit is that after this starts printing, the board will no >>>>> longer reboot (it hangs continuing to occasionally print the above >>>>> message), and I have to manually reset the device. >>>>> >>>> >>>> So this warning is not temporarily shown but lasts until a reboot, >>>> right? If so it is a dst refcnt leak. >>> >>> Correct, once I get into the state it lasts until a reboot. >>> >>>> How reproducible is it for you? From my reading, it seems always >>>> reproduced when you unplug and plug your usb eth interface? >>>> Is there anything else involved? For example, network namespace. >>> >>> So with 4.13-rc3/4 I seem to trigger it easily, often with the first >>> unplug of the USB eth adapter. >>> >>> But as I get back closer to 4.12, it seemingly becomes harder to >>> trigger, but sometimes still happens. >>> >>> So far, I've not been able to trigger it with 4.12. >>> >>> I don't think network namespaces are involved? Though its out of my >>> area, so AOSP may be using them these days. Is there a simple way to >>> check? >>> >>> I'll also do another bisection to see if the bad point moves back any further. > > So I went through another bisection around and got 9514528d92d4 ipv6: > call dst_dev_put() properly as the first bad commit again. > >> If you see the problem starts to happen on commit >> 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all >> the following commits: >> (from new to old) >> 1eb04e7c9e63 net: reorder all the dst flags >> a4c2fd7f7891 net: remove DST_NOCACHE flag >> b2a9c0ed75a3 net: remove DST_NOGC flag >> 5b7c9a8ff828 net: remove dst gc related code >> db916649b5dd ipv6: get rid of icmp6 dst garbage collector >> 587fea741134 ipv6: mark DST_NOGC and remove the operation of dst_free() >> ad65a2f05695 ipv6: call dst_hold_safe() properly >> 9514528d92d4 ipv6: call dst_dev_put() properly > > > And reverting this set off of 4.13-rc4 seems to make the issue go away. > > Is there anything I can test to help narrow down the specific problem > with that patchset? > Thanks John for confirming. Let me spend some time on the commits and I will let you know if I have some debug image for you to try. Wei > thanks > -john
[toc] | [prev] | [next] | [standalone]
| From | Wei Wang <weiwan@google.com> |
|---|---|
| Date | 2017-08-10 07:50 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ucOw2-1gs-13@gated-at.bofh.it> |
| In reply to | #1708129 |
[Multipart message — attachments visible in raw view] — view raw
Hi John, Is it possible to try the attached patch? I am not sure if it actually fixes the issue. But I think it is worth a try. Also, could you get me all the ipv6 routes when you plug in the usb using "ip -6 route show"? (If you have multiple routing tables configured, could you dump them all?) Thanks a lot. Wei On Wed, Aug 9, 2017 at 6:36 PM, Wei Wang <weiwan@google.com> wrote: > On Wed, Aug 9, 2017 at 6:26 PM, John Stultz <john.stultz@linaro.org> wrote: >> On Wed, Aug 9, 2017 at 5:36 PM, Wei Wang <weiwan@google.com> wrote: >>> On Wed, Aug 9, 2017 at 4:44 PM, John Stultz <john.stultz@linaro.org> wrote: >>>> On Wed, Aug 9, 2017 at 4:34 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote: >>>>> (Cc'ing Wei whose commit was blamed) >>>>> >>>>> On Mon, Aug 7, 2017 at 2:15 PM, John Stultz <john.stultz@linaro.org> wrote: >>>>>> On Mon, Aug 7, 2017 at 2:05 PM, John Stultz <john.stultz@linaro.org> wrote: >>>>>>> So, with recent testing with my HiKey board, I've been noticing some >>>>>>> quirky behavior with my USB eth adapter. >>>>>>> >>>>>>> Basically, pluging the usb eth adapter in and then removing it, when >>>>>>> plugging it back in I often find that its not detected, and the system >>>>>>> slowly spits out the following message over and over: >>>>>>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >>>>>> >>>>>> The other bit is that after this starts printing, the board will no >>>>>> longer reboot (it hangs continuing to occasionally print the above >>>>>> message), and I have to manually reset the device. >>>>>> >>>>> >>>>> So this warning is not temporarily shown but lasts until a reboot, >>>>> right? If so it is a dst refcnt leak. >>>> >>>> Correct, once I get into the state it lasts until a reboot. >>>> >>>>> How reproducible is it for you? From my reading, it seems always >>>>> reproduced when you unplug and plug your usb eth interface? >>>>> Is there anything else involved? For example, network namespace. >>>> >>>> So with 4.13-rc3/4 I seem to trigger it easily, often with the first >>>> unplug of the USB eth adapter. >>>> >>>> But as I get back closer to 4.12, it seemingly becomes harder to >>>> trigger, but sometimes still happens. >>>> >>>> So far, I've not been able to trigger it with 4.12. >>>> >>>> I don't think network namespaces are involved? Though its out of my >>>> area, so AOSP may be using them these days. Is there a simple way to >>>> check? >>>> >>>> I'll also do another bisection to see if the bad point moves back any further. >> >> So I went through another bisection around and got 9514528d92d4 ipv6: >> call dst_dev_put() properly as the first bad commit again. >> >>> If you see the problem starts to happen on commit >>> 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all >>> the following commits: >>> (from new to old) >>> 1eb04e7c9e63 net: reorder all the dst flags >>> a4c2fd7f7891 net: remove DST_NOCACHE flag >>> b2a9c0ed75a3 net: remove DST_NOGC flag >>> 5b7c9a8ff828 net: remove dst gc related code >>> db916649b5dd ipv6: get rid of icmp6 dst garbage collector >>> 587fea741134 ipv6: mark DST_NOGC and remove the operation of dst_free() >>> ad65a2f05695 ipv6: call dst_hold_safe() properly >>> 9514528d92d4 ipv6: call dst_dev_put() properly >> >> >> And reverting this set off of 4.13-rc4 seems to make the issue go away. >> >> Is there anything I can test to help narrow down the specific problem >> with that patchset? >> > > Thanks John for confirming. > Let me spend some time on the commits and I will let you know if I > have some debug image for you to try. > > Wei > > >> thanks >> -john
[toc] | [prev] | [next] | [standalone]
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Date | 2017-08-10 20:20 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ud0dQ-Jr-17@gated-at.bofh.it> |
| In reply to | #1708228 |
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. > I am not sure if it actually fixes the issue. But I think it is worth a try. > Also, could you get me all the ipv6 routes when you plug in the usb > using "ip -6 route show"? (If you have multiple routing tables > configured, could you dump them all?) # ip -6 route show 2601:1c2:1002:83f0::/64 dev eth0 proto kernel metric 256 expires 345599sec pref medium fe80::/64 dev eth0 proto kernel metric 256 pref medium default via fe80::200:caff:fe11:2233 dev eth0 proto ra metric 1024 expires 1799sec hoplimit 64 pref medium After unplugging the device (and getting the unregister_netdevice errors): # ip -6 route show # thanks -john
[toc] | [prev] | [next] | [standalone]
| From | Wei Wang <weiwan@google.com> |
|---|---|
| Date | 2017-08-10 22:10 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <ud1Wi-2eA-5@gated-at.bofh.it> |
| In reply to | #1708950 |
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. > Thanks for confirming. I have been going through the code and not yet found any leaks. I am also trying to reproduce the issue myself. Martin seems to also see this issue. I will continue investigating. >> I am not sure if it actually fixes the issue. But I think it is worth a try. >> Also, could you get me all the ipv6 routes when you plug in the usb >> using "ip -6 route show"? (If you have multiple routing tables >> configured, could you dump them all?) > > # ip -6 route show > 2601:1c2:1002:83f0::/64 dev eth0 proto kernel metric 256 expires > 345599sec pref medium > fe80::/64 dev eth0 proto kernel metric 256 pref medium > default via fe80::200:caff:fe11:2233 dev eth0 proto ra metric 1024 > expires 1799sec hoplimit 64 pref medium > > > After unplugging the device (and getting the unregister_netdevice errors): > # ip -6 route show > # > Thanks for the logs. > > thanks > -john
[toc] | [prev] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-08-11 18:50 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <udlih-5Uh-3@gated-at.bofh.it> |
| In reply to | #1708950 |
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);
}
}
[toc] | [prev] | [next] | [standalone]
| From | Wei Wang <weiwan@google.com> |
|---|---|
| Date | 2017-08-11 19:30 +0200 |
| Subject | Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 |
| Message-ID | <udlV0-6mk-25@gated-at.bofh.it> |
| In reply to | #1709838 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web