LKML Archive mirror
 help / color / mirror / Atom feed
From: Vaneet Narang <v.narang@samsung.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Maninder Singh <maninder1.s@samsung.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"willemb@google.com" <willemb@google.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"eyal.birger@gmail.com" <eyal.birger@gmail.com>,
	"tklauser@distanz.ch" <tklauser@distanz.ch>,
	"fruggeri@aristanetworks.com" <fruggeri@aristanetworks.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	PANKAJ MISHRA <pankaj.m@samsung.com>,
	Geon-ho Kim <gh007.kim@samsung.com>,
	Hak-Bong Lee <hakbong5.lee@samsung.com>
Subject: Re: [PATCH] af_packet: Raw socket destruction warning fix
Date: Fri, 05 Feb 2016 05:23:35 +0000 (GMT)	[thread overview]
Message-ID: <1841100414.696991454649811187.JavaMail.weblogic@epmlwas05b> (raw)

Hi,

>>
>> Issue is coming for 3.10.58.
>

Sorry for late reply, we were trying to reproduce the issue but its not that frequent.

>What driver are you using (is that in-tree)?

we are facing issue with wireless driver. Is it possible that wireless driver
can cause any issue because rmem accounting is done by kernel.

>Can you reproduce the same issue
>with a latest -net kernel, for example (or, a 'reasonably' recent one like 4.3 or
>4.4)? There has been quite a bit of changes in err queue handling (which also
>accounts rmem) as well.

It difficult to port on 4.3 as of now but can you suggest some patches which can
be helpful. One more thing, can https://lkml.org/lkml/2015/9/15/634. change 
in linux kernel cause this issue. Just an observation (could be incorrect), after 
including this change we are facing this issue.

>How reliably can you trigger the issue? Does it trigger
>with a completely different in-tree network driver as well with your tests?

This issue is not easily reproducible. This issue gets reproduced in long term
testing. Yes wireless network driver is not in tree.

>Would be useful to track/debug sk_rmem_alloc increases/decreases to see from which path
>new rmem is being charged in the time between packet_release() and packet_sock_destruct()
>for that socket ...

As i mentioned, its not easily reproducible but we have added some debug patch in 
packet_sock_destruct to check the value of rmem_alloc. 
So as per logs, At the entry point rmem_alloc was 0 but after error queue purge 
it becomes some 576(seems a new packet added). Not sure which queue. 
Is it possible that kernel can still add packets in receive queue when socket is already closed, 
can you point the kernel code where this is avoided or is there any way this gets added to error
queue. 
As per my understanding rmem_alloc gets increased only if packets gets added to receive queue
or error queue. Is it any other queue which also changes rmem_alloc?

Thanks,
Vaneet Narang
.....................

             reply	other threads:[~2016-02-05  5:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  5:23 Vaneet Narang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-10 12:43 [PATCH] af_packet: Raw socket destruction warning fix Vaneet Narang
2016-02-10 14:56 ` Eric Dumazet
2016-01-21 11:40 Maninder Singh
2016-01-26  0:13 ` Daniel Borkmann
2016-01-18 10:11 Vaneet Narang
2016-01-18 11:08 ` Daniel Borkmann
2016-01-18  6:37 Maninder Singh
2016-01-18  9:44 ` Daniel Borkmann
2016-01-18 10:29   ` Daniel Borkmann
2016-02-05 11:26   ` 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=1841100414.696991454649811187.JavaMail.weblogic@epmlwas05b \
    --to=v.narang@samsung.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dwmw2@infradead.org \
    --cc=edumazet@google.com \
    --cc=eyal.birger@gmail.com \
    --cc=fruggeri@aristanetworks.com \
    --cc=gh007.kim@samsung.com \
    --cc=hakbong5.lee@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maninder1.s@samsung.com \
    --cc=netdev@vger.kernel.org \
    --cc=pankaj.m@samsung.com \
    --cc=tklauser@distanz.ch \
    --cc=willemb@google.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).