linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* kmemleak fails to report detected leaks after allocation failure
@ 2011-07-19 21:14 Nick Bowler
  2011-07-20  8:30 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Bowler @ 2011-07-19 21:14 UTC (permalink / raw)
  To: linux-kernel, linux-mm; +Cc: Catalin Marinas

I just ran into a somewhat amusing issue with kmemleak.  After running
for a while (10 days), and detecting about 100 "suspected memory leaks",
kmemleak ultimately reported:

  kmemleak: Cannot allocate a kmemleak_object structure
  kmemleak: Automatic memory scanning thread ended
  kmemleak: Kernel memory leak detector disabled

OK, so something failed and kmemleak apparently can't recover from
this.  However, at this point, it appears that kmemleak has *also*
lost the ability to report the earlier leaks that it actually
detected.

  cat: /sys/kernel/debug/kmemleak: Device or resource busy

It seems to me that kmemleak shouldn't lose the ability to report leaks
that it already detected after it disables itself due to an issue that
was potentially caused by the very leaks that it managed to detect
(unlikely in this instance, but still...).

This was on a 2.6.39.2 kernel on x86_64.

I imagine that such a failure is unlikely to repeat itself, but I
figured I'd throw it out there.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kmemleak fails to report detected leaks after allocation failure
  2011-07-19 21:14 kmemleak fails to report detected leaks after allocation failure Nick Bowler
@ 2011-07-20  8:30 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2011-07-20  8:30 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org

On Tue, Jul 19, 2011 at 10:14:38PM +0100, Nick Bowler wrote:
> I just ran into a somewhat amusing issue with kmemleak.  After running
> for a while (10 days), and detecting about 100 "suspected memory leaks",
> kmemleak ultimately reported:
> 
>   kmemleak: Cannot allocate a kmemleak_object structure
>   kmemleak: Automatic memory scanning thread ended
>   kmemleak: Kernel memory leak detector disabled
> 
> OK, so something failed and kmemleak apparently can't recover from
> this.  However, at this point, it appears that kmemleak has *also*
> lost the ability to report the earlier leaks that it actually
> detected.
> 
>   cat: /sys/kernel/debug/kmemleak: Device or resource busy
> 
> It seems to me that kmemleak shouldn't lose the ability to report leaks
> that it already detected after it disables itself due to an issue that
> was potentially caused by the very leaks that it managed to detect
> (unlikely in this instance, but still...).

Very good point, I haven't thought of this. I'll try to improve this
part.

Thanks.

-- 
Catalin

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-20  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 21:14 kmemleak fails to report detected leaks after allocation failure Nick Bowler
2011-07-20  8:30 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).