Re: Bug#256871: cdrecord triggers memory leak in kernel space

From: Jeff King
Date: Tue Jul 06 2004 - 16:02:11 EST


On Tue, 6 Jul 2004, Joerg Schilling wrote:

The problem is not that Linux incorrectly believes that there is no memory.
The problem is that Linux _before_ believes that there is _plenty_ of memory
although there is none left over.

I understand your complaints about memory overcommits. However, in my case,
the OOM killing is not the problem, but rather a symptom that comes from not
realizing that memory is available. The problem is that Linux incorrectly
believes there is no memory. The sequence is something like this:

1. I have 1G of memory. There is about 850M free (as reported by free, not
counting buffers). Userland is using 100M or so of that (as reported by ps).

2. I run cdrecord. It burns the CD correctly, then exits.

3. There is now only 100M free. Userland is still using 100M of memory.
Running cdrecord again causes OOM killing because of memory overcommits.

Where did all of the memory go? If it's in use by the kernel, on whose
behalf? There are no programs running after the burn that were not running
before the burn. I believe that the kernel has marked some memory as used on
behalf of cdrecord and failed to free it when the program exited.

At this point it's just a theory. I will attempt to gather evidence later
this week when I return home to either justify or disprove my theory.

-Peff



-------------------------------------------------------------------------------
Information forwarded to debian-bugs-dist@xxxxxxxxxxxxxxxx, Joerg Jaspert
<joerg@xxxxxxxxxx>:
Bug#256871; Package cdrecord. Full text available.
-------------------------------------------------------------------------------
Acknowledgement sent to Jeff King <peff-debbug@xxxxxxxx>:
Extra info received and forwarded to list. Copy sent to Joerg Jaspert
<joerg@xxxxxxxxxx>. Full text available.
-------------------------------------------------------------------------------

Message received at 256871@xxxxxxxxxxxxxxx:

Received: (at 256871) by bugs.debian.org; 9 Jul 2004 07:37:43 +0000