Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2003 20:31:26 -0500 (EST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Kirk McKusick <mckusick@beastie.mckusick.com>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, <dwmalone@FreeBSD.org>, El Vampiro <vampiro@rootshell.ru>, "Evgueni V. Gavrilov" <aquatique@rusunix.org>, Mike Makonnen <mtm@identd.net>, <src-committers@FreeBSD.org>, <cvs-src@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: kern/42277 
Message-ID:  <20030317202944.A66343-100000@mail.chesapeake.net>
In-Reply-To: <200303172341.h2HNfRFL014201@beastie.mckusick.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Mar 2003, Kirk McKusick wrote:

> 	Date: Mon, 17 Mar 2003 16:22:05 -0500 (EST)
> 	From: Jeff Roberson <jroberson@chesapeake.net>
> 	To: Poul-Henning Kamp <phk@phk.freebsd.dk>
> 	cc: Kirk McKusick <mckusick@mckusick.com>, <dwmalone@FreeBSD.org>,
> 	   El Vampiro <vampiro@rootshell.ru>,
> 	   "Evgueni V. Gavrilov" <aquatique@rusunix.org>,
> 	   Mike Makonnen <mtm@identd.net>, <src-committers@FreeBSD.org>,
> 	   <cvs-src@FreeBSD.org>, <cvs-all@FreeBSD.org>
> 	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




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