Subject: Repeatable panic building gcc3
To: None <port-macppc@netbsd.org>
From: Monroe Williams <monroe@pobox.com>
List: port-macppc
Date: 03/16/2003 18:23:10
This is pretty odd...

I'm trying to build the lang/gcc3 package on a NetBSD-macppc system (1.6
userland and 1.6-current kernel).  I have run into a very repeatable panic
during the build.  

It happens while "Configuring in powerpc--netbsd/libstdc++-v3", and the last
part of the build log is:

-----
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself...
-----

To get this far, I had to hack /usr/include/sys/times.h to get around
"undefined symbol: __times13".  (Changed "#ifdef __LIBC12_SOURCE__" to "#if
1".  This is quite possibly wrong, but doesn't seem like it could cause a
panic.)

On the console, it looks like this (hand-copied, so caveat whatever):

multiply freed item 0xd0371000
panic:  free: duplicated free
Stopped in pid 4690.1 (sh) at mumble mumble
db> bt
0xblahblah at panic+18c
0xblahblah at free+29c
0xblahblah at elf32_copyargs+144
0xblahblah at sys_execve+57c
0xblahblah at syscall_plain+10c
0xblahblah at s_sctrap+144
db>

I've seen this on three out of three attempts to build gcc3.  The first
time, I didn't have the build log where I could see it after the panic, but
the other two times it happened in exactly the same spot, with the same
backtrace.  Between the second and third attempts, I updated to the latest
-current sources and rebuilt my kernel, so I'm now at 1.6P.

My kernel config is not too far from GENERIC.  The machine is a Power Mac
7500 with a G4 upgrade, and L3 cache enabled with "options L3CR_CONFIG".
Root is on an ATA disk mounted with softdeps.  At the time of the panic, I'm
not anywhere near exhausting physical memory.

I haven't seen any other panics on this machine recently, and I use it quite
a bit.

Any ideas?

Thanks,
-- monroe
------------------------------------------------------------------------
Monroe Williams                                         monroe@pobox.com