* kmemleak and SLAB
@ 2011-10-04 6:31 Sitsofe Wheeler
2011-10-04 15:41 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Sitsofe Wheeler @ 2011-10-04 6:31 UTC (permalink / raw)
To: Catalin Marinas; +Cc: linux-kernel
Hi,
When I try to use kmemleak with the SLAB allocator set I receive this
message when booting 3.1-rc8:
[ 28.480569] kmemleak: Cannot allocate a kmemleak_object structure
[ 28.480593] kmemleak: Kernel memory leak detector disabled
[ 34.428037] CPA self-test:
[ 34.435881] 4k 259968 large 0 gb 0 x 259968[b0000000-ef77f000] miss 0
[ 34.447669] 4k 259968 large 0 gb 0 x 259968[b0000000-ef77f000] miss 0
[ 34.458402] 4k 259968 large 0 gb 0 x 259968[b0000000-ef77f000] miss 0
[ 34.458407] ok.
[ 38.754032] wlan0: no IPv6 routers present
[ 67.666048] kmemleak: Automatic memory scanning thread ended
All is fine when using SLUB. On another run I also got an error about an
ODEBUG oom so I wonder if this is indicative of another problem...
--
Sitsofe | http://sucs.org/~sits/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kmemleak and SLAB
2011-10-04 6:31 kmemleak and SLAB Sitsofe Wheeler
@ 2011-10-04 15:41 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2011-10-04 15:41 UTC (permalink / raw)
To: Sitsofe Wheeler; +Cc: linux-kernel
On 4 October 2011 07:31, Sitsofe Wheeler <sitsofe@yahoo.com> wrote:
> When I try to use kmemleak with the SLAB allocator set I receive this
> message when booting 3.1-rc8:
>
> [ 28.480569] kmemleak: Cannot allocate a kmemleak_object structure
> [ 28.480593] kmemleak: Kernel memory leak detector disabled
> [ 34.428037] CPA self-test:
> [ 34.435881] 4k 259968 large 0 gb 0 x 259968[b0000000-ef77f000] miss 0
> [ 34.447669] 4k 259968 large 0 gb 0 x 259968[b0000000-ef77f000] miss 0
> [ 34.458402] 4k 259968 large 0 gb 0 x 259968[b0000000-ef77f000] miss 0
> [ 34.458407] ok.
> [ 38.754032] wlan0: no IPv6 routers present
> [ 67.666048] kmemleak: Automatic memory scanning thread ended
>
> All is fine when using SLUB. On another run I also got an error about an
> ODEBUG oom so I wonder if this is indicative of another problem...
There could be another problem. The kmemleak error says that it could
not allocate the memory required for its internal data keeping. This
happens especially when the allocation is GFP_ATOMIC (it depends on
the context kmemleak is called from).
I have this commit in my tree (not yet pushed upstream):
http://linux-arm.org/git?p=linux-2.6.git;a=commitdiff;h=bcba31f1751bf9d9d1da72dd828dee697d52924f
If you apply this, kmemleak keeps its metadata for later reporting
(well, only if it was fully initialised before the error occured).
This way you can inspect /proc/slabinfo and /proc/meminfo etc. to see
why it ran out of memory.
--
Catalin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-04 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04 6:31 kmemleak and SLAB Sitsofe Wheeler
2011-10-04 15:41 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox