All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alex Bligh <alex@alex.org.uk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
	coreteam@netfilter.org, linux-kernel@vger.kernel.org,
	containers@lists.linux-foundation.org,
	Linux Containers <containers@lists.osdl.org>
Subject: Re: [PATCH] Fix repeatable Oops on container destroy with conntrack
Date: Mon, 12 Sep 2011 20:33:57 +0200	[thread overview]
Message-ID: <20110912183357.GC3641@1984> (raw)
In-Reply-To: <E0902A9541FD5D118EA02B31@Ximines.local>

Hi Alex,

On Mon, Sep 12, 2011 at 11:32:18AM +0100, Alex Bligh wrote:
> I /think/ it is the correct fix, in that it certainly fixes the oops,
> and it's relatively low overhead. I ran the torture test for 24 hours
> without a problem.
> 
> My only concern is that eventually my torture test died as the
> machine (512MB VM) had run out of memory - this was after about 30
> hours. Save for having no free memory, the box is happy.
> It looks like there is something (possibly something
> entirely different) leaking memory. It does not appear to be
> conntrack. Whatever, a slow memory leak causing death on a tiny
> VM over 5,000 iterations is better than an oops after 5. Memory
> stats below. I will leave the vm up in case anyone wants other
> stats.

Seems like a different issue.

> On the suggestion to move the check for ->nfnl into
> nfnetlink_has_listeners(), the problem with that is that
> if item->report is non-NULL, nfnetlink_has_listeners()
> will not be called, and the early return will not be made.
> This will merely delay the oops until elsewhere (nfnetlink_send
> for example). The check is currently as follows:
> 
>        if (!item->report && !nfnetlink_has_listeners(net, group))
>                return 0;
> 
> I am a very long way from being a netlink expert, but I am not
> entirely sure what the point of progressing further is if there
> are no listeners if item->report is non-null. Certainly there is
> no point in progressing if net->nfnl NULL (as this will oops
> before item->report is meaningfully used - it's just passed
> as a parametner to nfnetlink_send which will crash). It's
> almost as if that test should be || not &&.
> 
> Perhaps we should check net->nfnl in both places.
> 
> I think there might be similar issues with ctnetlink_expect_event.

Yes, this is what Alexey was pointing out in the previous email and
why he suggested to move it to nfnetlink_has_listeners (to cover the
expectation case).

But you're right, we cannot move it to nfnetlink_has_listeners because
of the item->report case. Please, include the expectation part and
resend the patch.

  reply	other threads:[~2011-09-12 18:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-10 18:48 [PATCH] Fix repeatable Oops on container destroy with conntrack Alex Bligh
2011-09-10 18:48 ` Alex Bligh
2011-09-10 18:48 ` Alex Bligh
2011-09-12  7:25 ` Alexey Dobriyan
2011-09-12  9:37   ` Pablo Neira Ayuso
2011-09-12 10:32     ` Alex Bligh
2011-09-12 18:33       ` Pablo Neira Ayuso [this message]
2011-09-12 19:06         ` Alex Bligh
2011-09-13 20:44           ` Alex Bligh
2011-09-13 20:44             ` Alex Bligh
2011-09-14  1:35             ` Pablo Neira Ayuso
2011-09-14  8:01               ` Alex Bligh
2011-09-28 21:08                 ` Pablo Neira Ayuso
2011-09-30 15:54                   ` Alex Bligh
  -- strict thread matches above, loose matches on Subject: below --
2011-09-10 18:48 Alex Bligh
2011-09-10 18:48 Alex Bligh

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=20110912183357.GC3641@1984 \
    --to=pablo@netfilter.org \
    --cc=adobriyan@gmail.com \
    --cc=alex@alex.org.uk \
    --cc=containers@lists.linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=coreteam@netfilter.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=netfilter@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.