[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6f78dadc-9fdc-7f37-7a2a-037b778c4366@cumulusnetworks.com>
Date: Sat, 10 Sep 2016 10:12:45 -0600
From: David Ahern <dsa@...ulusnetworks.com>
To: Jojy Varghese <jojy.varghese@...il.com>,
David Miller <davem@...emloft.net>
Cc: Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net_namespace: fixed net_device reference leak
On 9/8/16 6:35 PM, Jojy Varghese wrote:
> Thanks for the feedback guys. I appreciate it.
>
> I am working with 4.4.3 kernel. I will try to reproduce the issue
> with the kernel tree at
> https://git.kernel.org/cgit/linux/kernel/git/davem/net.git.
>
> In the meantime, the only data I have now is :
> - "dst-ifdown" does not look correct since it will never release
> reference to loopback device.
> - One way to fix might be to assign the 'dst''s net device to the
> init net device. I thought adding reference to init net device's
> loopback might be safe.
>
> Any suggestion on debugging further is much appreciated.
>
Last 2 times I chased down netdev refcnts I used the attach patch. It adds tracepoints to dev_hold and dev_put.
perf record -e net:dev_hold,net:dev_put -a -g -- <run your test>
You probably will need to increase memory for perf buffers (e.g., -m 8192).
It will dump a lot of data but you will find the missing put; you just have to be patient wading through the data and matching up hold and put references. python/perl script with perf script can make that easier.
---
Have you looked at whether there are open sockets? e.g., perhaps a dst reference is cached on a socket
View attachment "0001-Add-tracepoints-to-dev_hold-and-dev_put.patch" of type "text/plain" (2875 bytes)
Powered by blists - more mailing lists