Subject: bin/29638: Problems with memory free in rcorder
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <ianzag@megasignal.com>
List: netbsd-bugs
Date: 03/09/2005 11:45:00
>Number: 29638
>Category: bin
>Synopsis: Problems with memory free in rcorder
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 09 11:45:00 +0000 2005
>Originator: Ian Zagorskih
>Release: NetBSD-current
>Organization:
NGEDC
>Environment:
$ uname -a
NetBSD IANZAG 2.99.13 NetBSD 2.99.13 (IANZAG-ACPI) #0: Wed Jan 12 12:30:41 NOVT 2005 toor@NBSD1:/usr/src/sys/arch/i386/compile/IANZAG-ACPI i386
>Description:
Looks like in some cases rcorder releases the same memory several times. Of course tests below are quite unusuall for standard rc.d content and explicitely include invalid entries with circular dependency but anyway..
>How-To-Repeat:
$ ls -l
total 4
-rwxr-xr-x 1 ianzag wheel 65 Mar 9 17:38 first
-rwxr-xr-x 1 ianzag wheel 64 Mar 9 17:39 second
$ cat first
#!/bin/sh
#
# PROVIDE: first
# REQUIRE: second
# BEFORE: second
$ cat second
#!/bin/sh
#
# PROVIDE: second
# REQUIRE: first
# BEFORE: first
$ rcorder *
rcorder: Circular dependency on file `second'.
rcorder: Circular dependency on provision `fake_prov_00000001' in file `second'.
rcorder: Circular dependency on file `first'.
rcorder: Circular dependency on provision `fake_prov_00000000' in file `first'.
rcorder: Circular dependency on file `second'.
rcorder: Circular dependency on provision `fake_prov_00000001' in file `second'.
rcorder in free(): warning: chunk is already free.
rcorder: Circular dependency on provision `first' in file `second'.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
first
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
second
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
rcorder: Circular dependency on file `first'.
rcorder in free(): warning: chunk is already free.
rcorder in free(): warning: chunk is already free.
>Fix:
No fix at this moment.