cdrecord triggers memory leak in kernel space

From: Jeff King
Date: Tue Jun 29 2004 - 10:44:37 EST


Package: cdrecord
Version: 4:2.0+a30.pre1-1
Severity: normal

I am running cdrecord as root with the following options:
cdrecord dev=/dev/hdc -v -dao -pad -audio *.wav

One CD burns OK. When I try to burn another, about mid-way through the
burn I notice random apps being killed. Sure enough, dmesg reports this:
Out of Memory: Killed process 6700 (firefox-bin).
Out of Memory: Killed process 6587 (xterm).
Out of Memory: Killed process 2806 (netbiff).
Out of Memory: Killed process 2861 (xterm).
I'm fairly sure it's triggered by the cdrecord command, as I'm not doing
anything else out of the ordinary and it happens consistently. Looking
at the output of "free", something is using all of my memory:

total used free shared buffers cached
Mem: 1036972 1004756 32216 0 3000 72616
-/+ buffers/cache: 929140 107832
Swap: 0 0 0

Running "top" or "ps" shows that userland processes aren't responsible
for this:
$ sum=0
$ ps -AF | awk '{print $6}' | tail +2 | while read f
sum=$(($sum + $f))
echo $sum
done
...
75288

I've used cdrecord many times in the past and not run into this problem.
Here are the things I'm doing differently recently:
- move to 2.6.6 kernel; this is the first burn I've done with it, but I
have done others with the 2.6 kernel series
- use the /dev/hdc device syntax; I believe I have done this before
and it worked OK, but I'm not sure
- used -dao mode. This is DEFINITELY the first time I have tried using
-dao mode.

Because of the massive amount of memory being gobbled, I can only guess
that the buffer isn't being freed by the kernel for whatever reason. I
suspect this is probably actually a kernel issue, but I thought I'd
start here in case there have been other reports.

-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-1-k7-smp
Locale: LANG=C, LC_CTYPE=C

Versions of packages cdrecord depends on:
ii debconf 1.4.29 Debian configuration management sy
ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an
ii makedev 2.3.1-70 Creates device files in /dev

-- debconf information:
* cdrecord/SUID_bit: false
cdrecord/MAKEDEV:
cdrecord/MAKEDEVNEW: true
cdrecord/do_it_yourself:



-------------------------------------------------------------------------------
Information forwarded to debian-bugs-dist@xxxxxxxxxxxxxxxx, Joerg Jaspert
<joerg@xxxxxxxxxx>:
Bug#256871; Package cdrecord. Full text available.
-------------------------------------------------------------------------------
Acknowledgement sent to Andreas Metzler <ametzler@xxxxxxxxxxxxxxxxxx>:
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; 29 Jun 2004 17:11:28 +0000