Created attachment 261516 [details] Screenshot: preparing to load vboxguest Built from source. vboxguest will not load, the kernel panics.
What has changed on this host?
Host ==== grahamperrin@mowa219-gjp4-zbook-freebsd ~> freebsd-version -kru ; uname -mvKU 15.0-CURRENT 15.0-CURRENT 15.0-CURRENT FreeBSD 15.0-CURRENT main-n278117-be8e84c2e924 GENERIC-NODEBUG amd64 1500048 1500048 grahamperrin@mowa219-gjp4-zbook-freebsd ~> Guest ===== Nothing changed, it's a fresh installation from a pkgbase-enabled DVD.
> it's a fresh installation Probably something in the base was broken again with backward compatibility. Port work fine some time ago. I can only suggest trying previous versions - below 1500048.
Re: comment 0 Dump header from device: /dev/ada0p3 Architecture: amd64 Architecture Version: 2 Dump Length: 275509248 Blocksize: 512 Compression: none Dumptime: 2025-06-23 21:10:52 +0100 Hostname: blah Magic: FreeBSD Kernel Dump Version String: FreeBSD 15.0-CURRENT #0 main-n278150-2c186228096a-dirty: Mon Jun 23 03:12:36 BST 2025 grahamperrin@mowa219-gjp4-zbook-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC Panic String: mutex Giant owned at /usr/src/sys/kern/kern_synch.c:481 Dump Parity: 3604680018 Bounds: 2 Dump Status: good
I think I'm seeing the same error with a snapshot from yesterday. This prevents desktop-installer from completing if the user accepts the default 'y' response to installing guest additions. Dump header from device: /dev/ada0p3 Architecture: amd64 Architecture Version: 2 Dump Length: 116293632 Blocksize: 512 Compression: none Dumptime: 2025-07-16 15:28:39 -0500 Hostname: Magic: FreeBSD Kernel Dump Version String: FreeBSD 15.0-CURRENT main-n278795-b2bf651a797b GENERIC Panic String: mutex Giant owned at /home/pkgbuild/worktrees/main/sys/kern/kern_synch.c:481 Dump Parity: 1615742292 Bounds: 0 Dump Status: good
(In reply to Jason W. Bacon from comment #5) #ifdef INVARIANTS if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) mtx_assert(&Giant, MA_NOTOWNED); <=== this line is 481 #endif
(In reply to Vladimir Druzenko from comment #6) Looks like that code hasn't changed since 14.x, and yet the guest additions work fine on 14.3-RELEASE. Any idea what might be causing that assert to fail on current?
(In reply to Jason W. Bacon from comment #7) Even if build 14.x kernel with INVARIANTS?
(In reply to Vladimir Druzenko from comment #8) Generic kernel in both cases. So INVARIANTS is defined by default on 15.x, but not on 14.x?
(In reply to Jason W. Bacon from comment #9) Found this explaining INVARIANTS. https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/#kerneldebug-deadlocks I'll try a buildkern on 14.x when I can block some time.
On a 14.3-RELEASE VM, I did make buildkernel KERNCONF=GENERIC-DEBUG make installkernel KERNCONF=GENERIC-DEBUG GENERIC-DEBUG enables INVARIANTS among other things. Upon rebooting, it panicked just like the 15-CURRENT VM. Commenting out vboxguest_enable="YES" in /etc/rc.conf allowed it to boot again. So this is not specific to 15.x. There seems to be a more general problem that is ignored by the GENERIC kernel.
(In reply to Jason W. Bacon from comment #11) Maybe it need CFLAGS+=-DINVARIANTS like *-kmod port: https://cgit.freebsd.org/ports/commit/emulators/virtualbox-ose-kmod?id=f3a57fc3f648b7ea7a2f01e0539e81b5514b663e Can you test this?
Not seeing the problem on 15 beta5. Maybe have to install a current snapshot again.
Adding CFLAGS+=--DINVARIANTS to either -additions or -additions-70 results in link_elf_obj: symbol kassert_panic undefined linker_load_file: /boot/modules/vboxguest.ko - unsupported file type
(In reply to Jason W. Bacon from comment #13) I think the kernel for 15.0-beta5 build without debug (without INVARIANTS). If build DEBUG kernel on 15.0 (released today), then probably need to build emulators/virtualbox-ose-additions* with CFLAGS+=--DINVARIANTS.
(In reply to Vladimir Druzenko from comment #15) Oops, forgot to mention my attempts to use -DINVARIANTS were on 16-current.
Can you test something from this: +---+-------------+----------------------+-----------------------+-------+ | № | Version | INVARIANTS in kernel | CFLAGS+=--DINVARIANTS | work? | +---+-------------+----------------------+-----------------------+-------+ | 1 |16.0-CURRENT | yes | yes | | | 2 |16.0-CURRENT | no | yes | | | 3 |16.0-CURRENT | yes | no | | | 4 |16.0-CURRENT | no | no | | | 5 |15.0-RELEASE | yes | yes | | | 6 |15.0-RELEASE | no | yes | | | 7 |15.0-RELEASE | yes | no | | | 8 |15.0-RELEASE | no | no | | | 9 |14.3-RELEASE | yes | yes | | |10 |14.3-RELEASE | no | yes | | |11 |14.3-RELEASE | yes | no | | |12 |14.3-RELEASE | no | no | yes | +---+-------------+----------------------+-----------------------+-------+ 12th I know result - tested on multiple VMs.