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

From: Jeff King
Date: Fri Jul 09 2004 - 02:37:43 EST


OK, I tested a few different configurations. My procedure was more or less to
run cdrecord -dummy and keep an eye on total memory free (using 'free'). I
considered the problem to occur if memory usage (minus buffers) increased
steadily as cdrecord ran, and then stayed high when the program exited. The
rate of memory gobbling generally seemed to be several hundred kilobytes per
second (one would guess if it is a leak of a data buffer, that it would be
dropping about 176400 * 4 (the speed of the writer), which is close to what I
saw). The machine was otherwise idle.

Here's what I found:
- cdrecord.mmap versus cdrecord.shm made no difference
- problem occurred on kernel 2.6.7-1-k7-smp
- problem also occurred on kernel 2.6.7-1-k7 (non-smp)
- problem did not occur with -tao, but did occur with -dao; no other command
line options seemed to effect whether it occurred

Other fun facts:
- I tried using cdrdao; problem also occurred there
- all tests were done using ide-cd kernel module (dev=ATA:1,0,0)

I think it's probably not related to the mmap'ing of the buffer memory
(because it happens with cdrecord.shm), but rather to some problem within the
kernel CD driver. Seeing what functional differences -dao and -tao have
(which should hopefully lead us in the right direction) is kind of hard. The
strace output is just a bunch of ioctls. :) I'm hoping somebody more familiar
with the code can comment on how the behavior differs, and we can hopefully
produce a very short program that triggers the kernel behavior.

-Peff



-------------------------------------------------------------------------------

Debian bug tracking system administrator <owner@xxxxxxxxxxxxxxx>. Last
modified: Sun, 25 Jul 2004 09:45:23 UTC

Debian Bug tracking system
copyright 1999 Darren O. Benham, 1997, 2003 nCipher Corporation Ltd, 1994-7 Ian
Jackson.

--Kj7319i9nmIyA2yE--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/