Bug 270094 - emulators/virtualbox-ose: virtualbox gui core dumps
Summary: emulators/virtualbox-ose: virtualbox gui core dumps
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL:
Keywords: crash, needs-qa
Depends on:
Blocks:
 
Reported: 2023-03-10 18:08 UTC by Yuri Dolgoruki
Modified: 2023-05-25 02:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (vbox)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Dolgoruki 2023-03-10 18:08:11 UTC
Hi Devs and Others!

Today I'm try to install virtualbox on recent -CURRENT (FreeBSD BSD-RYZEN 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n261377-c57dfd92c876: Tue Mar  7 23:53:58 +08 2023)

With such options: +AIO, -ALSA, +DBUS, -DEBUG, -GUESTADDITIONS, -MANUAL, +NLS, -OPUS, -PYTHON, +QT5, -R0LOGGING, +UDPTUNNEL, -VDE, +VNC, -VPX, -WEBSERVICE, +X11

And after installing I'm add my user to vboxusers group, add vboxdrv_load="YES" to /boot/loader.conf and vboxnetadp_enable="YES" in /etc/rc.conf. dbus also started and DE are IceWM.

So when I try to start virtualbox - it segfault with *.core file. Without any messages in console.

What is it bug or my own environment issue?
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-03-13 23:06:06 UTC
For me with recent CURRENT, the GUI (Oracle VM VirtualBox Manager) opens without crashing. 

% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #34 main-n261465-22bf2a479f68: Sun Mar 12 05:18:09 GMT 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400082 1400082
%
Comment 2 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2023-04-22 18:33:42 UTC
Hello,

I'm also experiencing a reproducible crash with virtualbox on FreeBSD-CURRENT. I even tried to update the port to 6.1.44 but it didn't help.

I've found the problem when working on minikube, VBoxManage will crash when trying to create a VM.

For me both VBoxSVC and VBoxManage (called by minikube) crash.

This is the stackstrace for VBoxSVC, it's caused by a NULL pointer. It happens when I try to create a VM using the GUI.

VirtualBox::registerMachine (this=0x843b67000, aMachine=...)
    at /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.44/src/VBox/Main/src-server/VirtualBoxImpl.cpp:2047
2047        rc = aMachine->COMGETTER(Name)(name.asOutParam());
(gdb) bt
#0  VirtualBox::registerMachine (this=0x843b67000, aMachine=...)
    at /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.44/src/VBox/Main/src-server/VirtualBoxImpl.cpp:2047
#1  0x00000000006ac332 in VirtualBoxWrap::RegisterMachine (this=0x843b67000, aMachine=0x0)
    at /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.44/out/freebsd.amd64/release/obj/VBoxAPIWrap/VirtualBoxWrap.cpp:1585
#2  0x000000083a77132a in ?? () from /usr/local/lib/virtualbox/components/VBoxXPCOMIPCC.so
#3  0x000000083a76ec7e in ?? () from /usr/local/lib/virtualbox/components/VBoxXPCOMIPCC.so
#4  0x00000008219957b8 in ?? () from /usr/local/lib/virtualbox/VBoxXPCOM.so
#5  0x00000008219c6ed1 in ?? () from /usr/local/lib/virtualbox/VBoxXPCOM.so
#6  0x0000000824795afc in ?? () from /usr/local/lib/virtualbox/VBoxRT.so
#7  0x00000008248481fe in ?? () from /usr/local/lib/virtualbox/VBoxRT.so
#8  0x000000082899bac8 in thread_start (curthread=0x83d9e3400) at /usr/src/lib/libthr/thread/thr_create.c:292
#9  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x859e80000
(gdb) 


This is my system:
FreeBSD capeta 14.0-CURRENT FreeBSD 14.0-CURRENT #1 main-n262312-2e6cdfe29355: Wed Apr 19 09:35:50 IST 2023     danilo@capeta:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64
Comment 3 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2023-05-24 11:57:18 UTC
After reading this bug report [1] I tried to rebuild emulators/virtualbox-ose-nox11 with clang14 and it worked. Apparently clang15 from current is messing up with something...

[1] - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270189