Subject: config(1) dumping core
To: None <current-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: current-users
Date: 12/10/2005 11:03:00
Hi,

I created a kernel config file which first includes GENERIC and then
removes all options and devices I don't want:

include "arch/i386/conf/GENERIC"
no options I386_CPU
no options I486_CPU
no options I586_CPU
[...]
no pci* at pchb?
no elansc* at pci?
no gpio* at elansc?
[...]

(the complete file can be fetched from http://salmi.ch/~jukka/nbsd/MORAY.gz)

Running config(1) with this file fails as follows:

$ ./config/obj/config -v -s /usr/src/sys -b MORAY /usr/src/sys/arch/i386/conf/MORAY
/usr/src/sys/arch/i386/conf/GENERIC:90: warning: undeclared option `LKM' added to IDENT
Memory fault (core dumped) 
$ gdb config/obj/config MORAY/config.core
GNU gdb 5.3nb1
[...]
This GDB was configured as "i386--netbsdelf"...
Core was generated by `config'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
#0  devbase_has_any_instance (dev=0x815d2c0, unit=-2, state=2, level=294)
    at /tmp/config/main.c:1539
1539                    return ht_enumerate(deaddevitab, devbase_has_dead_instances,
(gdb) bt
#0  devbase_has_any_instance (dev=0x815d2c0, unit=-2, state=2, level=294)
    at /tmp/config/main.c:1539
#1  0x0804e408 in check_dead_devi (key=0x808d5c0 "ucom*", value=0x808f900, 
    aux=0xbfa000b0) at /tmp/config/main.c:1576
#2  0x0804bf69 in ht_enumerate (ht=0x805f200, 
    cbfunc=0x804e3a8 <check_dead_devi>, arg=0xbfa000b0)
    at /tmp/config/hash.c:299
#3  0x0804e525 in do_kill_orphans (d=0x8156700, at=0x8156480, 
    parent=0x815d2c0, state=2) at /tmp/config/main.c:1661
#4  0x0804e473 in do_kill_orphans (d=0x815d2c0, at=0x8156380, 
    parent=0x8156340, state=2) at /tmp/config/main.c:1676
#5  0x0804e473 in do_kill_orphans (d=0x8156340, at=0x8156380, 
    parent=0x8156340, state=2) at /tmp/config/main.c:1676
#6  0x0804e473 in do_kill_orphans (d=0x8156340, at=0x8156380, 
    parent=0x8156340, state=2) at /tmp/config/main.c:1676
#7  0x0804e473 in do_kill_orphans (d=0x8156340, at=0x8156380, 
    parent=0x8156340, state=2) at /tmp/config/main.c:1676
#8  0x0804e473 in do_kill_orphans (d=0x8156340, at=0x8156380, 
    parent=0x8156340, state=2) at /tmp/config/main.c:1676
#9  0x0804e473 in do_kill_orphans (d=0x8156340, at=0x8156380, 
    parent=0x8156340, state=2) at /tmp/config/main.c:1676
[...]
#26128 0x0804e473 in do_kill_orphans (d=0x8156340, at=0x8156140, 
    parent=0x8156100, state=2) at /tmp/config/main.c:1676
#26129 0x0804e473 in do_kill_orphans (d=0x8156100, at=0x80d7700, 
    parent=0x80d79c0, state=2) at /tmp/config/main.c:1676
#26130 0x0804e473 in do_kill_orphans (d=0x80d79c0, at=0x8097d40, 
    parent=0x8097d00, state=2) at /tmp/config/main.c:1676
#26131 0x0804e473 in do_kill_orphans (d=0x8097d00, at=0x80d7640, 
    parent=0x80fa280, state=1) at /tmp/config/main.c:1676
#26132 0x0804e473 in do_kill_orphans (d=0x80fa280, at=0x8097d40, 
    parent=0x8097d00, state=1) at /tmp/config/main.c:1676
#26133 0x0804e473 in do_kill_orphans (d=0x8097d00, at=0x80d7640, 
    parent=0x8097c00, state=1) at /tmp/config/main.c:1676
#26134 0x0804e473 in do_kill_orphans (d=0x8097c00, at=0x0, parent=0x0, state=1)
    at /tmp/config/main.c:1676
#26135 0x0804e5b8 in kill_orphans_cb (key=0x8099100 "mainbus", 
    value=0x8097c00, aux=0x0) at /tmp/config/main.c:1683
#26136 0x0804bf69 in ht_enumerate (ht=0x805f1a0, 
    cbfunc=0x804e5a4 <kill_orphans_cb>, arg=0x0) at /tmp/config/hash.c:299
#26137 0x0804e5d4 in kill_orphans () at /tmp/config/main.c:1690
#26138 0x0804c3d7 in main (argc=7, argv=0xbfbfe7ec) at /tmp/config/main.c:350
#26139 0x08049316 in ___start ()
(gdb) quit


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~