Re: bhyve core dump related to llvm 14

From: Michael Dexter <editor_at_callfortesting.org>
Date: Wed, 10 Aug 2022 04:24:59 UTC
On 7/21/22 8:31 AM, Chuck Tuffli wrote:
> I have a virtual machine used to test the NVMe emulation in bhyve. All
> of the tests in the VM pass running under FreeBSD 13.1-R, but the same
> VM running under -current causes bhyve(8) to dump core because of a
> segmentation fault.
> 
> git bisect identified the last "good" commit on main as
>      cb2ae6163174 sysvsem: Fix a typo
> After this commit, there are a half-dozen commits related to merging
> the llvm project release/14.x


Chuck and I put our heads together to find a way to reproduce this issue 
and came up with this:

Attache a 1gb disk image as emulation type "nvme" to a VM of any recent 
version, and run this command:

nvmecontrol io-passthru -o 0x2 -l 4096 -4 0x2ffff0 -r nvme0ns1

This fails gracefully on 13.0R and 13.1R, but panics the bhyve process 
with a 14-CURRENT host after the LLVM 14 import.

I have detailed reproduction steps and the debug output in this bug report:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265749

Michael