From: "David S. Miller" <davem@davemloft.net>
To: jesse.brandeburg@intel.com
Cc: bb@kernelpanic.ru, herbert@gondor.apana.org.au,
kernel@linuxace.com, nipsy@bitgnome.net, jrlundgren@gmail.com,
cat@zip.com.au, djani22@dynamicweb.hu, yoseph.basri@gmail.com,
mykleb@no.ibm.com, olel@ans.pl, michal@feix.cz,
chris@scorpion.nl, netdev@vger.kernel.org,
jesse.brandeburg@gmail.com, E1000-devel@lists.sourceforge.net,
ak@suse.de, jgarzik@pobox.com
Subject: Re: [e1000 debug] KERNEL: assertion (!sk_forward_alloc) failed...
Date: Fri, 14 Apr 2006 16:53:29 -0700 (PDT) [thread overview]
Message-ID: <20060414.165329.24988172.davem@davemloft.net> (raw)
In-Reply-To: <Pine.WNT.4.63.0604141553210.2116@jbrandeb-desk.amr.corp.intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Fri, 14 Apr 2006 15:55:10 -0700 (Pacific Daylight Time)
> I'm trying to isolate more of a reproduction case, I'll be sure to
> post if I can find anything with more detail.
I think I see the bug.
If tbench with large numbers of clients is part of what helps
reproduce it, the key might be hitting the memory limits in tcp_mem[]
and friends, or something to do with concurrent access to
sk->sk_forward_alloc.
I bet there is some race in there.
A lot of the action is in net/core/stream.c We modify
sk->sk_forward_alloc non-atomically but that should be ok
since we ought to be holding all of the correct locks when
we hit these accesses. But it is the first thing to audit.
Let's look at sk_stream_rfree() as that is invoked from SKB
freeing callbacks and is the most likely suspect for these
kinds of problems.
It is hooked up to the skb->destructor by sk_stream_set_owner_r() and
then invoked via __kfree_skb().
Nothing here takes any locks, and as stated above we modify
sk->sk_forward_alloc non-atomically, and this is therefore the bug.
Shit.
I'll think of how to fix this in the least invasive manner. I also
want to search the changelog history to see if this race was always
present or if it was "introduced".
Making sk->sk_forward_alloc an atomic_t would be incredibly expensive
so I'll try to find a way to avoid that. We may be able to just do
a bh_lock_sock()/bh_unlock_sock() around the body of sk_stream_rfree()
to fix this.
next prev parent reply other threads:[~2006-04-14 23:57 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-30 2:53 [e1000 debug] KERNEL: assertion (!sk_forward_alloc) failed Brandeburg, Jesse
2006-03-30 4:02 ` Yoseph Basri
2006-03-30 4:25 ` Phil Oester
2006-03-30 4:44 ` David S. Miller
2006-03-30 9:52 ` Herbert Xu
2006-03-30 10:02 ` Boris B. Zhmurov
2006-03-30 10:12 ` Herbert Xu
2006-03-30 12:53 ` JaniD++
2006-03-30 13:29 ` Boris B. Zhmurov
2006-03-31 9:12 ` David S. Miller
2006-03-31 10:16 ` Boris B. Zhmurov
2006-03-31 10:39 ` Herbert Xu
2006-03-31 10:45 ` David S. Miller
2006-03-31 10:51 ` Boris B. Zhmurov
2006-03-31 10:52 ` Herbert Xu
2006-03-31 11:02 ` Boris B. Zhmurov
2006-03-31 12:07 ` Boris B. Zhmurov
2006-03-31 11:15 ` Andi Kleen
2006-03-31 12:10 ` Mark Nipper
2006-03-31 12:23 ` Boris B. Zhmurov
2006-03-31 12:35 ` Herbert Xu
2006-03-31 12:36 ` Boris B. Zhmurov
2006-04-03 21:01 ` Mark Nipper
2006-04-03 21:39 ` Phil Oester
2006-04-03 22:00 ` Boris B. Zhmurov
2006-04-05 22:05 ` Jesse Brandeburg
2006-04-06 0:42 ` Jesse Brandeburg
2006-04-06 11:49 ` Boris B. Zhmurov
2006-04-14 20:28 ` Jesse Brandeburg
2006-04-14 21:02 ` David S. Miller
2006-04-14 22:32 ` Jesse Brandeburg
2006-04-14 22:42 ` David S. Miller
2006-04-14 22:46 ` Jesse Brandeburg
2006-04-14 22:52 ` David S. Miller
2006-04-14 22:55 ` Jesse Brandeburg
2006-04-14 23:53 ` David S. Miller [this message]
2006-03-31 12:46 ` Boris B. Zhmurov
2006-03-31 13:12 ` Christiaan den Besten
2006-03-31 13:30 ` Boris B. Zhmurov
2006-03-31 15:08 ` Boris B. Zhmurov
2006-03-31 15:19 ` Boris B. Zhmurov
2006-03-31 16:01 ` Mark Nipper
2006-03-31 17:19 ` Boris B. Zhmurov
2006-03-31 12:45 ` JaniD++
2006-03-31 9:13 ` David S. Miller
2006-03-30 8:08 ` Christiaan den Besten
2006-03-30 8:24 ` Mark Nipper
2006-03-30 10:29 ` Krzysztof Oledzki
2006-03-30 16:22 ` Phil Oester
2006-03-30 17:21 ` Krzysztof Oledzki
2006-03-30 8:39 ` Boris B. Zhmurov
2006-03-30 9:49 ` Johan Lundgren
2006-03-30 10:27 ` Krzysztof Oledzki
2006-03-31 8:57 ` Ingo Oeser
2006-03-31 9:12 ` David S. Miller
2006-03-31 9:16 ` Herbert Xu
2006-03-31 9:35 ` David S. Miller
2006-03-31 9:42 ` Herbert Xu
2006-03-31 12:02 ` JaniD++
2006-03-31 12:18 ` Ingo Oeser
2006-03-31 17:22 ` Jesse Brandeburg
2006-03-31 10:51 ` Mark Nipper
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=20060414.165329.24988172.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=E1000-devel@lists.sourceforge.net \
--cc=ak@suse.de \
--cc=bb@kernelpanic.ru \
--cc=cat@zip.com.au \
--cc=chris@scorpion.nl \
--cc=djani22@dynamicweb.hu \
--cc=herbert@gondor.apana.org.au \
--cc=jesse.brandeburg@gmail.com \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=jrlundgren@gmail.com \
--cc=kernel@linuxace.com \
--cc=michal@feix.cz \
--cc=mykleb@no.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=nipsy@bitgnome.net \
--cc=olel@ans.pl \
--cc=yoseph.basri@gmail.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 NNTP newsgroup(s).