Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Mar 2011 10:13:03 -0700
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        Yamagi Burmeister <lists@yamagi.org>
Cc:        freebsd-net@freebsd.org, yongari@freebsd.org
Subject:   Re: Kernel memory corruption(?) with age(4)
Message-ID:  <20110331171302.GA11981@michelle.cdnetworks.com>
In-Reply-To: <alpine.BSF.2.00.1103310859310.3082@saya.home.yamagi.org>
References:  <alpine.BSF.2.00.1103301620110.17846@saya.home.yamagi.org> <20110330173145.GB8601@michelle.cdnetworks.com> <alpine.BSF.2.00.1103302137330.1646@maka.home.yamagi.org> <20110330202858.GC8601@michelle.cdnetworks.com> <alpine.BSF.2.00.1103310859310.3082@saya.home.yamagi.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Mar 31, 2011 at 09:05:19AM +0200, Yamagi Burmeister wrote:
> On Wed, 30 Mar 2011, YongHyeon PYUN wrote:
> 
> >>Okay, I did a test run with RX checksum, TX checksum and both disabled.
> >>In all three cases the crash occurs within about 20 minutes. I'm either
> >>not sure that age(4) is the problem but it has definedly something to do
> >>with the problem, since with another nic driver the same scenario is
> >>rock solid...
> >>
> >
> >OK.
> >
> >>The workload: It's a NFS3 server (FreeBSDs non-experimental
> >>implementation), serving and receiving file with about 250 to 500
> >>megabytes at about 20mb/s. The clients are FreeBSD 7 and 8 systems and
> >>are mounting the shares via TCP. The connection is 1000mbit/s via a
> >>"dumb" gigabit switch.
> >>
> >
> >That's too broad to narrow down the issue. :-(
> >I'm not sure but your box seem to have more than 4GB memory. Could
> >you limit the available memory to 3GB via loader.conf and test it
> >again?
> 
> All boxes are quadcore machines with 8GB RAM, running FreeBSD/amd64.
> After limiting the memory via hw.physmem to 3GB the problems are gone.
> The box is running crashfree for more than 6 hours and has served over
> 300GB of data via age(4).
> 

Thanks for testing. Remove the hw.physmem configuration and try
attached patch and let me know how it goes.

--7AUc2qLy4jB3hD7Z
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="age.dma.diff"

Index: sys/dev/age/if_age.c
===================================================================
--- sys/dev/age/if_age.c	(revision 220116)
+++ sys/dev/age/if_age.c	(working copy)
@@ -2452,6 +2452,9 @@
 		/* Update the consumer index. */
 		sc->age_cdata.age_rr_cons = rr_cons;
 
+		bus_dmamap_sync(sc->age_cdata.age_rx_ring_tag,
+		    sc->age_cdata.age_rx_ring_map,
+		    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 		/* Sync descriptors. */
 		bus_dmamap_sync(sc->age_cdata.age_rr_ring_tag,
 		    sc->age_cdata.age_rr_ring_map,

--7AUc2qLy4jB3hD7Z--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110331171302.GA11981>