Summary: | devel/libvirt: segmentation fault with bhyve | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | David Harrigan <dharrigan> |
Component: | Individual Port(s) | Assignee: | Roman Bogorodskiy <novel> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | arved, w.schwarzenfeld |
Priority: | --- | Keywords: | needs-patch |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
David Harrigan
2017-08-28 09:25:05 UTC
David, thanks for the detailed bug report, and sorry for the delay, I've been pretty busy recently. I hope to get to it this weekend.
> Happy to provide more information, just let me know what is required.
What's already there looks enough to get started, but if you have some spare time you could get a traceback from lldb. That would require rebuilding libvirt with -DWITH_DEBUG, reinstalling and reproducing this crash again to get a core file.
Once it's there:
lldb /usr/local/sbin/libvirtd -c /path/to/libvirtd.core and then "bt" in lldb prompt.
Oh, I've just noticed it's actually from Aug last year and wasn't auto-assigned because of a type in summary... Anyway, needs validation. Yeah, there's a bug. The bhyve driver expects network model to be specified, otherwise it crashes like in this case. I've sent a fix: https://www.redhat.com/archives/libvir-list/2018-March/msg00515.html I'll backport it to the port once it's reviewed and merged. By the way, interface type 'network' is not support by the bhyve driver, 'bridge' should be used instead. For example: <interface type='bridge'> <model type='virtio'/> <source bridge="bridge1"/> </interface> (In reply to Roman Bogorodskiy from comment #3) BTW, there are some other issues in this sample xml. Working configuration would look something like: <domain type="bhyve"> <name>generic</name> <uuid>ad086073-a314-4c99-b3d4-9d1f1d3ec2b3</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>2</vcpu> <os> <type arch="x86_64">hvm</type> <boot dev="cdrom"/> <boot dev="hd"/> <loader readonly="yes" type="pflash">/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</loader> </os> <clock offset="utc"/> <on_reboot>destroy</on_reboot> <devices> <emulator>bhyve</emulator> <disk type="file" device="disk"> <driver name='file' type='raw'/> <source file="/var/lib/libvirt/images/centos7.0.img"/> <target dev="hda" bus="sata"/> </disk> <disk type="file" device="cdrom"> <driver name='file' type='raw'/> <source file="/var/lib/libvirt/images/CentOS-7-x86_64-Minimal-1611.iso"/> <target dev="hdb" bus="sata"/> <readonly/> </disk> <interface type="bridge"> <mac address="00:16:3e:45:45:49"/> <model type='virtio'/> <source bridge="virbr0"/> </interface> <graphics type="vnc" port="-1" keymap="en-gb"/> <controller type='usb' model='nec-xhci'/> <input type='tablet' bus='usb'/> </devices> </domain> A commit references this bug: Author: novel Date: Tue Mar 13 14:38:12 UTC 2018 New revision: 464382 URL: https://svnweb.freebsd.org/changeset/ports/464382 Log: devel/libvirt: fix crash in bhyve driver Fix crash on domains with interfaces that have no model specified. PR: 221877 Reported by: David Harrigan Changes: head/devel/libvirt/Makefile head/devel/libvirt/files/patch-src_bhyve_bhyve__command.c Should be fixed now, thanks for report! |