From: Patrick McHardy <kaber@trash.net>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>, caiqian@redhat.com
Subject: Re: Fwd: Re: [BUG] Fatal exception in interrupt - nf_nat_cleanup_conntrack during IPv6 tests
Date: Wed, 10 Apr 2013 16:57:29 +0200 [thread overview]
Message-ID: <20130410145729.GC23626@macbook.localnet> (raw)
In-Reply-To: <20130410145621.GD11266@breakpoint.cc>
On Wed, Apr 10, 2013 at 04:56:21PM +0200, Florian Westphal wrote:
> Patrick McHardy <kaber@trash.net> wrote:
> > On Wed, Apr 10, 2013 at 11:32:04AM +0200, Florian Westphal wrote:
> > > Patrick McHardy <kaber@trash.net> wrote:
> > > > On Wed, Apr 10, 2013 at 11:04:36AM +0200, Florian Westphal wrote:
> > > > > > [ 3599.241868] Code: 83 ec 08 0f b6 58 11 84 db 74 43 48 01 c3 48 83 7b 20 00 74 39 48 c7 c7 b8 65 32 a0 e8 98 fc 2e e1 48 8b 03 48 8b 53 08 48 85 c0 <48> 89 02 74 04 48 89 50 08 48 ba 00 02 20 00 00 00 ad de 48 c7
> > > > > > [ 3599.337037] RIP [<ffffffffa03227f2>] nf_nat_cleanup_conntrack+0x42/0x70 [nf_nat]
> > > > >
> > > > > Looks like we tried to remove bysource hash twice (rdx is
> > > > > LIST_POISON_2).
> > > > >
> > > > > I wonder if this would explain it:
> > > > >
> > > > > static void nf_nat_l4proto_clean(u8 l3proto, u8 l4proto)
> > > > > {
> > > > > [..]
> > > > > /* Step 1 - remove from bysource hash */
> > > > > clean.hash = true;
> > > > > for_each_net(net)
> > > > > nf_ct_iterate_cleanup(net, nf_nat_proto_clean, &clean);
> > > > >
> > > > > A nfct->timer fires and a conntrack is free'd before step 2 memsets the
> > > > > nat extension. In that case, we would try to delete nat->bysource
> > > > > again?
> > > >
> > > > Not sure I follow, we only invoke nf_nat_l4proto_clean() through
> > > > nf_nat_l4proto_unregister(), right?
> > > >
> > > > Did this happen during module unload?
> > >
> > > Looks like it, nf_nat_ipv4 is listed as F- in the oops trace. (afaics,
> > > "-" means "module going away").
> >
> > Yes, that seems like a real race condition. We probably could extend the
> > nf_nat_lock sections to avoid this, but I wonder wether we should just kill
> > those conntracks, the connections are not going to work after being
> > "de-nated" anymore anyway.
>
> I like it, just killing them would make it a lot more simple.
>
> The clear-nat-extension-on-module-unload dance is getting out of hand,
> and, as you point out, the connections are not going to work anyway...
Yeah, lets just do that. Do you want to take care of this?
next prev parent reply other threads:[~2013-04-10 14:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 9:04 Fwd: Re: [BUG] Fatal exception in interrupt - nf_nat_cleanup_conntrack during IPv6 tests Florian Westphal
2013-04-10 9:23 ` Patrick McHardy
2013-04-10 9:32 ` Florian Westphal
2013-04-10 9:41 ` Patrick McHardy
2013-04-10 14:56 ` Florian Westphal
2013-04-10 14:57 ` Patrick McHardy [this message]
2013-04-11 9:34 ` Florian Westphal
2013-04-11 10:40 ` Patrick McHardy
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=20130410145729.GC23626@macbook.localnet \
--to=kaber@trash.net \
--cc=caiqian@redhat.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@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 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 NNTP newsgroup(s).