Re: Soft lockup on shutdown in nf_ct_iterate_cleanup()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Martin Josefsson
Date: Sunday, February 25, 2007 - 11:38 am

On Sun, 2007-02-25 at 18:31 +0100, Patrick McHardy wrote:


What about this case:

1. Conntrack entry is created and placed on the unconfirmed list
2. The event cache bumps the refcount of the conntrack entry
3. module removal of ip_conntrack unregisters all hooks
4. packet is dropped by an iptables rule
5. packet is freed but we still have a refcount on the conntrack entry

Now there's no way to get that refcount to decrease as that only happens
when the event cache receives another packet or the current packet makes
it through the stack as you wrote above. And neither of this will happen
since we unregistered the hooks providing the packets and dropped the
packet.

I ran into this case a while ago during stresstesting and rewrote the
event cache to not increase the refcount, but this has the drawback that
events caused by dropped packets won't be reported. This may not be a
good thing...

Old patch can be found here:
http://performance.netfilter.org/patches/nf_conntrack_ecache-fix

--=20
/Martin
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Soft lockup on shutdown in nf_ct_iterate_cleanup(), Chuck Ebbert, (Tue Feb 20, 6:10 pm)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Chuck Ebbert, (Wed Feb 21, 5:56 pm)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Patrick McHardy, (Sat Feb 24, 6:58 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Chuck Ebbert, (Sat Feb 24, 9:18 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Patrick McHardy, (Sun Feb 25, 10:31 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Martin Josefsson, (Sun Feb 25, 11:38 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Patrick McHardy, (Sun Feb 25, 12:03 pm)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Chuck Ebbert, (Mon Feb 26, 10:14 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Patrick McHardy, (Mon Feb 26, 10:53 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Chuck Ebbert, (Mon Feb 26, 2:21 pm)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Patrick McHardy, (Wed Feb 28, 11:09 am)
Re: Soft lockup on shutdown in nf_ct_iterate_cleanup(), Chuck Ebbert, (Wed Feb 28, 1:30 pm)