Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2013 13:40:58 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: uma for acpi object cache
Message-ID:  <5106C63A.2000906@FreeBSD.org>
In-Reply-To: <51039423.2070203@FreeBSD.org>
References:  <20130122175629.GA1714@garage.freebsd.pl> <51008661.4060006@FreeBSD.org> <510101B4.4030409@FreeBSD.org> <51017D79.6060202@FreeBSD.org> <51018223.4030702@FreeBSD.org> <51019AAE.10501@FreeBSD.org> <51024475.20909@FreeBSD.org> <51039423.2070203@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-01-26 03:30:27 -0500, Andriy Gapon wrote:
> on 25/01/2013 10:38 Andriy Gapon said the following:
>> on 24/01/2013 22:33 Jung-uk Kim said the following:
>>> On 2013-01-24 13:49:07 -0500, Andriy Gapon wrote:
>>>> on 24/01/2013 20:29 Jung-uk Kim said the following:
>>>>> When utcache.c works, it works fairly well, actually. :-)
>>> 
>>>> Well, my primary motivation for the patch is all the reports
>>>> about mysterious panics that seem to involve the cache: 
>>>> http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7562 
>>>> http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7613 
>>>> http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7077
>>> 
>>>> There were a few more reports with the same theme. I hoped
>>>> that using uma(9) instead of hand-rolled code would lead to
>>>> better diagnostic and debugging cabilities.
>>> 
>>> Hmm...  I am not really sure local cache is to blame here.  If
>>> you really want to prove your theory, I think a simple
>>> modification to utcache.c should do:
>>> 
>>> Cache->LinkOffset = 8; Cache->ListName   = CacheName; 
>>> Cache->ObjectSize = ObjectSize; -    Cache->MaxDepth   =
>>> MaxDepth; +    Cache->MaxDepth   = 0;
>>> 
>>> *ReturnCache = Cache; return (AE_OK);
>>> 
>>> This should effectively kill object caching.
>> 
>> That's a very simple trick, I wonder why I didn't think about it
>> :-) Now I need to wait until one of the reporters resurfaces.
> 
> And just to clarify - I didn't and don't suspect the cache code
> itself. I suspect some code that uses the cache (directly or
> indirectly) - something like double-free or use-after-free, etc.

I haven't tried it for ages but ACPI_DBG_TRACK_ALLOCATIONS was meant
to track such problems.  Try adding it in acfreebsd.h.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBAgAGBQJRBsY6AAoJECXpabHZMqHO/sYH/0T/Imtxw70IwN5Ri7qP2C0G
+zkZeUosV8hUI8xmXOdQMtyYhBXQprAoewXvAAnx0iCTLYtjNDt0lMGvoyyMDqOW
bwupzYE+6GhaTDDc+8bfSxxMbDXgXqFuIqkohBnZPAQ7GdfLNwY2KHwGlA6T+o/s
XailQ+sq9zN4VJ6SDoNAvpi1+O9FsO1GJBfnIihdY/S8b99n2ffpOO2XcAIIPwCE
huxWnZ/GYVPmoVuvEKyc7CzzsGxRZfdQpJ5e7oPvwM5JAG7GEmc1VzRDPBtCFBWL
VO3sBH3ObKX2+H0LhU9tskCVsmuzD0U+/ygF3P8NRkuLP7Y/yQiAWIoZeEr1saI=
=05h0
-----END PGP SIGNATURE-----



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