I've been trying to determine why my highly-modular kernel keeps on crashing, and I think I have narrowed things down a bit.
My kernel does NOT have OPTIONS SYSV{SHM,SEM,MSG} included; I rely on autoloading of the sysv_ipc module if/when this stuff is needed, and let the module auto-unload. This all seems to work fine the first time around. However, when the module attempts to re-load, it fails to create certain sysctl entries. The entries for kern.ipc.sysvipc_info, ...shmmax, ...shmmni, and ...shmseg (all of which have fixed MIB numbers, defined in sysctl.h) have not problems, however the entries for ...msgmni, ...msgseg, ...semmni, ...semmns, and ...semmnu (all of which have dynamic MIB numbers) all report a failure from sysctl_createv() - reporting errno 17 - EEXIST. It appears that when the module was unloaded, the fixed entries were successfully torn down, but the dynamic entries were not. I have reboot the system for a clean restart, and after the sysv_ipc module gets unloaded (but _before_ any attempt to reload), using '/sbin/sysctl kern.ipc' results in a crash. It would seem that the "dangling" entries point to somewhere that is no longer valid. I don't have enough sysctl(9) background to quickly figure out the sysctl_teardown() code, so I was hoping someone else could take a quick look. +------------------+--------------------------+-------------------------+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +------------------+--------------------------+-------------------------+