I have been poking about with the bhyve virtualization code in FreeBSD 10-current, and managed to crash FreeBSD during its bootstrap process due to the fact that if_detach is called from boot time configuration code, before the internal domain system initialization has happened.
I added the following patch to work around the problem. As the large comment notes, it might not be quite correct but it does allow the boot to proceed (of course the "dead" network device is soon a problem anyway...). The fix mirrors (more or less) the code in if_attach_internal(). Feel free to accept, ignore, or modify the patch. :-) Chris diff --git a/sys/net/if.c b/sys/net/if.c --- a/sys/net/if.c +++ b/sys/net/if.c @@ -845,6 +845,15 @@ if_purgeaddrs(ifp); + /* + * torek: it's not entirely clear to me where and how this + * should go, but if domain_init_status < 2 then there should + * be no inet, inet6, etc items, and this is where the crash + * happens during boot, so let's try this: + */ + if (domain_init_status < 2) + return; + #ifdef INET in_ifdetach(ifp); #endif _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"