From owner-cvs-src Mon Mar 17 17:31:36 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F38C837B404; Mon, 17 Mar 2003 17:31:32 -0800 (PST) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01EE843F85; Mon, 17 Mar 2003 17:31:31 -0800 (PST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h2I1VRX88288; Mon, 17 Mar 2003 20:31:27 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Mon, 17 Mar 2003 20:31:26 -0500 (EST) From: Jeff Roberson To: Kirk McKusick Cc: Poul-Henning Kamp , , El Vampiro , "Evgueni V. Gavrilov" , Mike Makonnen , , , Subject: Re: kern/42277 In-Reply-To: <200303172341.h2HNfRFL014201@beastie.mckusick.com> Message-ID: <20030317202944.A66343-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 17 Mar 2003, Kirk McKusick wrote: > Date: Mon, 17 Mar 2003 16:22:05 -0500 (EST) > From: Jeff Roberson > To: Poul-Henning Kamp > cc: Kirk McKusick , , > El Vampiro , > "Evgueni V. Gavrilov" , > Mike Makonnen , , > , > Subject: Re: kern/42277 > X-ASK-Info: Whitelist match > > UMA has a facility to track the previous owner of the memory. > Assuming that is the problem I could give you a way to cache this > information so we can print it out when we detect corruption. I > can work on this tonight. What is the repro? > > Cheers, > Jeff > > I have not had any success in reproducing the problem on my machines, > but I am mostly running on 5.X these days. Evgueni V. Gavrilov (copied > on this message) seems to be able to produce the problem about once a > day on his machines. He is also very willing to help out by testing > patches and sending back reports. So, if you are able to provide him > with a patch to collect the information, I am sure that he will run it > and send back the results. He and I have already gone through all the > 128-byte structures reported by `vmstat -m' looking for ones with a > short at 64-bytes and found no viable candidates. So, I was feeling > rather stuck. But it sounds like you have a viable way of tracking > this down. > > Kirk McKusick > I don't have any 4.x machines. You can do the following though.. Add a "struct malloc_type *" as the first field of your structure. In free() cache a pointer to the malloc_type * in the first location in the free memory. When you detect corruption print out the malloc_type member of your structure. This should be the last owner. You'll have to disable the INVARIANTS memory trashing though. Cheers, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message