Subject: SIGSEGV during __bt_search
To: None <port-mac68k@netbsd.org>
From: Tyler Mitchell <fission@ldx.ca>
List: port-mac68k
Date: 03/18/2005 01:55:23
Hi,

I (finally) got around to finishing the NetBSD 2.0 setup on my Apple 
PowerBook 165.

The problem is, some processes segfault consistently, always while in 
printf (which calls __bt_search, which is where it dies).  Programs that 
I've found that break so far: ps -u (but not ps -ax), w, uptime,
swapctl -l, awk (various incantations), vmstat, and many others.

For example:

# gdb ps
 	[ ... ]
(gdb) set args -u
(gdb) run
Starting program: /bin/ps -u
(no debugging symbols found)...(no debugging symbols found)...
USER PID %CPU   %MEM  VSZ  RSS TT STAT STARTED    TIME COMMAND
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x040c3164 in __bt_search () from /lib/libc.so.12
(gdb) bt
#0  0x040c3164 in __bt_search () from /lib/libc.so.12
#1  0x040c4b68 in __dtoa () from /lib/libc.so.12
#2  0x040c14c0 in vfprintf_unlocked () from /lib/libc.so.12
#3  0x040c11ac in vfprintf_unlocked () from /lib/libc.so.12
#4  0x040c00a8 in vprintf () from /lib/libc.so.12
#5  0x040b5560 in printf () from /lib/libc.so.12
#6  0x00003fe6 in doubleprintorsetwidth ()
#7  0x00005430 in pmem ()
#8  0x00006232 in main ()
#9  0x000033f4 in __start ()
(gdb)



# gdb uptime
 	[ ... ]
(gdb) run
Starting program: /usr/bin/uptime
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x040a7164 in __bt_search () from /usr/lib/libc.so.12
(gdb) bt
#0  0x040a7164 in __bt_search () from /usr/libc/libc.so.12
#1  0x040a8b68 in __dtoa () from /usr/libc/libc.so.12
#2  0x040a54c0 in vprintf_unlocked () from /usr/lib/libc.so.12
#3  0x040a51ac in vprintf_unlocked () from /usr/lib/libc.so.12
#4  0x040a40a8 in vprintf () from /usr/lib/libc.so.12
#5  0x04099560 in printf () from /usr/lib/libc.so.12
#6  0x00004286 in pr_header ()
#7  0x00003b50 in main ()
#8  0x00003128 in __start ()


Does anyone have any ideas?  I don't think it should be running out of 
memory... I've tried it with and without swap, and the machine has 12MB of 
main memory.

-- 
Tyler Mitchell <fission@ldx.ca> . . . . . . . . http://www.ldx.ca/