[ switched lists ]
Jan Harkes wrote:
>
> On Fri, Mar 23, 2001 at 05:17:16PM +0100, Andi Kleen wrote:
> > On Fri, Mar 23, 2001 at 05:10:56PM +0100, Jan Harkes wrote:
> > > btw. There definitely is a network receive buffer leak somewhere in
> > > either the 3c905C path or higher up in the network layers (2.4.0 or
> > > 2.4.1). The normal path does not leak anything.
> >
> > What do you mean with "normal path" ?
> >
> > And are you sure it was a leak? TCP can buffer quite a bit of skbs, but it
> > should be bounded based on the number of sockets.
> >
> > -Andi
>
> No corrupted packets. I was pretty sure it was a leak once I noticed
> that most of my memory got allocated here:
>
> Top 10 of the not yet freed allocations taken from /proc/memleak in an
> IKD-patched 2.4.2 kernel a couple of weeks ago:
>
> memleak/01-02-27__15:44:19
> 74603 buffer.c:1234
> 42956 3c59x.c:2232
> 13025 dcache.c:598
> 12392 inode.c:665
> 5921 dcache.c:603
> 4480 ll_rw_blk.c:397
> 2304 raid5.c:154
> 2105 mmap.c:276
> 2064 af_unix.c:1340
> 1312 file_table.c:62
>
I tried to reproduce this memory leak and failed. Added some
code to netif_rx() to corrupt incoming packets:
--- linux-2.4.2-ac24/net/core/dev.c Sat Mar 24 14:28:25 2001
+++ ac/net/core/dev.c Sat Mar 24 17:53:18 2001
@@ -1194,6 +1194,21 @@
struct softnet_data *queue;
unsigned long flags;
+{
+ extern int akpm;
+ if (akpm) {
+ static int stomper;
+
+ stomper++;
+ if (stomper >= akpm) {
+ stomper = 0;
+ if (skb->len > 100) {
+ skb->ip_summed = CHECKSUM_NONE;
+ skb->data[88]++;
+ }
+ }
+ }
+}
if (skb->stamp.tv_sec == 0)
get_fast_time(&skb->stamp);
`akpm' is a sysctl. I set it to 17. TCP and NFS throughput
were of course quite horrid, but no sign in /proc/slabinfo
of any memory leaks. Tested both 2.4.3-pre7 and 2.4.2-ac24.
Can you suggest any other way of reproducing this? Have I missed
something?
Do you think your broken ethernet switch was corrupting
data at layer2 (ethernet checksum will catch it) or at
layer 3 (IP checksums)?
|