Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2025 09:30:31 -0700
From:      "Chuck Tuffli" <chuck@tuffli.net>
To:        "Bakul Shah" <bakul@iitbombay.org>, "FreeBSD virtualization" <freebsd-virtualization@freebsd.org>
Subject:   Re: Assertion failed: (error == 0), function modify_bar_registration, file /usr/src/usr.sbin/bhyve/pci_emul.c, line 706.
Message-ID:  <acb7e065-3b79-476e-80b4-44287e79ba41@app.fastmail.com>
In-Reply-To: <B83D6E25-77BE-4CE0-9DBE-B32D75F9CB20@iitbombay.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sun, Sep 21, 2025, at 5:20 PM, Bakul Shah wrote:
> On a 15.0-ALPHA3 host, bhyve fails when I try to start a 9front VM.
> Error:
> 
> Assertion failed: (error == 0), function modify_bar_registration, file /usr/src/usr.sbin/bhyve/pci_emul.c, line 706.
> fbuf frame buffer base: 0x38bfae800000 [sz 33554432]

There doesn't appear to be an "easy button" to debug this, but this assert trips on an error in any of the BAR registrations. It would be instructive to understand the type of BAR (IO, memory, ROM, etc.) causing the error as that would indicate where to look next. If you run bhyve via a debugger (with symbols), it should stop on the assert, allowing you to investigate. But if the debugger approach is problematic, I'd sprinkle this function and others with EPRINTLN() (assuming that is something you are comfortable doing).

--chuck
[-- Attachment #2 --]
<!DOCTYPE html><html><head><title></title></head><body><div>On Sun, Sep 21, 2025, at 5:20 PM, Bakul Shah wrote:</div><blockquote type="cite" id="qt" style=""><div>On a 15.0-ALPHA3 host, bhyve fails when I try to start a 9front VM.</div><div>Error:</div><div><br></div><div>Assertion failed: (error == 0), function modify_bar_registration, file /usr/src/<a href="http://usr.sbin/bhyve/pci_emul.c">usr.sbin/bhyve/pci_emul.c</a>, line 706.</div><div>fbuf frame buffer base: 0x38bfae800000 [sz 33554432]<br></div></blockquote><div><br></div><div>There doesn't appear to be an "easy button" to debug this, but this assert trips on an error in any of the BAR registrations. It would be instructive to understand the type of BAR (IO, memory, ROM, etc.) causing the error as that would indicate where to look next. If you run bhyve via a debugger (with symbols), it should stop on the assert, allowing you to investigate. But if the debugger approach is problematic, I'd sprinkle this function and others with EPRINTLN() (assuming that is something you are comfortable doing).</div><div><br></div><div>--chuck</div></body></html>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?acb7e065-3b79-476e-80b4-44287e79ba41>