Bug 265593 - emulators/virtualbox-ose: wil not start after upgrade to 6.1.36
Summary: emulators/virtualbox-ose: wil not start after upgrade to 6.1.36
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Graham Perrin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-03 09:50 UTC by Robert
Modified: 2023-06-25 09:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert 2022-08-03 09:50:15 UTC
After upgrading virtualbox from 6.1.32 to 6.1.36 VBoxSVC won't run as it allocates memory until it runs out of swapspace.

A Windows 10 instance (6GB RAM) run as a guest on a FreeBSD 12.3-p5 host (32GB RAM, 4GB swap) with virtualbox-ose-6.1.32 (vfs.zfs.arc_max is set to 12GB).
Now, after upgrade to 6.1.36 VBoxSVC starts, allocates memory up to over 30 GB until swapspace is exhausted.

I'm not conviced that it is releated to Virtualbox itself but rather to a library or kernel functionality.
It seems to be a recurring error as it keeps popping up at least since 2013.

Besides, the dependencies of the port are incomplete as e.g. qt5-dbus-5.15.2 got upgraded to 5.15.5 but not qt5-core-5.15.2.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2022-08-03 19:48:05 UTC
Hi, thanks for reporting.

This is strange and I have no idea what could be causing it, but have you also tested with other VMs, maybe with a VM with smaller memory requirements and see if that one balloons too?

> Besides, the dependencies of the port are incomplete as e.g. qt5-dbus-5.15.2 got upgraded to 5.15.5 but not qt5-core-5.15.2.

I don't understand what you mean with this. It is not the virtualbox port driving updates to its dependencies. Those are separate packages which pkg should update independently. If updates for those packages failed you should investigate your logs, maybe force them by hand.

A port only states its dependencies and maybe a minimum version, then the package forces the dependency to be installed, but updates to them are managed independently from then on by pkg.
Comment 2 Robert 2022-08-04 18:53:09 UTC
Hi,
for your first question: I tried starting Virtualbox to not start any VM at all 
but just to have a look at the configuration.
However, I received an error that some Qt libraries were incompatible.

For your second question:
To upgrade virtualbox I had just used "pkg upgrade virtualbox-ose" and some other 
pkgs were upgraded too -- as the mentioned qt5-dbus in my first entry.
After the upgrade I got the error mentioned above when starting Virtualbox.

Guessing that qt5-core would be the best candidate I tried to upgrade this pkg.
However, it stated that mysql-server would get removed. So I upgraded 
mysql-server instead, which in consequence also upgraded qt-core. You see, 
I don't know whether there are any dependencies configured, the system just 
sees them when upgrading, but did not fetch all the neccessary pkgs in the 
first place (no errors were thrown).

BTW, Virtualbox was able to start then, only to show the same behaviour as 
VBoxSVC before. It grabs as much memory available and gets killed after 
numerous "swap_pager_getswapspace(xx): failed" messages. Using top, I see 
that Virtualbox also relies on VBoxSVC which grabs the memory without 
starting any guest VM at all.

That was my reply yesterday ...
---- 
... today I cut down the VirtualBox.xml to my two most important VMs only, 
removing all the old stuff. And now Virtualbox and vboxheadless start again!
So it seems that the new VirtualBox version stumbles over some "bad" VM-config,
which were no problem for the last release.

Therefore, my next step will be to add back step by step the old entries 
and see, when the error of this ticket reoccurs.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2022-08-04 19:33:41 UTC
(In reply to Robert from comment #2)

I'm not sure that selectively upgrading packages the way you are doing is really a best practice.

For sure it's not really supported to mix and match things. Packages are like a closed set in which each package expects its dependencies to come from the same set. Maybe the pkg tool does not enforce it, but that does not mean it is expected to work flawlessly to do such a thing.

I suggest first you run a bare "pkg upgrade" and upgrade everything that needs upgrading.

Regarding the "old" configuration, I really can't help much. If there is a bug in virtualbox handling configurations this should be filed upstream. The port can only follow upstream development.

There are many factors that could have caused something confusing in the configuration. It happened to me also in the past some times. Sometimes a VM crashes and leaves back a botched xml file, some times there may be strange incompatibilities between versions.

If you were able to fix your file I think we can mark the issue as fixed.
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-06-25 01:18:08 UTC
(In reply to Robert from comment #0)

Reproducible with 6.1.44_2 or greater on 12.4-RELEASE-p3, with all packages updated?
Comment 5 Robert 2023-06-25 08:31:48 UTC
Hi,

the original behavior was probably due to a corrupted config file and was fixed by removing all unnecessary entries.

As for the update: it ran smoothly now.
Installed packages to be UPGRADED:
        cups: 2.4.2 -> 2.4.2_1
        dbus: 1.14.4,1 -> 1.14.6,1
        glib: 2.74.5,2 -> 2.76.2,2
        libvncserver: 0.9.13_1 -> 0.9.14
        qt5-core: 5.15.7p177 -> 5.15.8p157
        qt5-dbus: 5.15.7p177 -> 5.15.8p157
        qt5-gui: 5.15.7p177 -> 5.15.8p157
        qt5-opengl: 5.15.7p177 -> 5.15.8p157
        qt5-printsupport: 5.15.7p177 -> 5.15.8p157
        qt5-widgets: 5.15.7p177 -> 5.15.8p157
        qt5-x11extras: 5.15.7p0 -> 5.15.8p0
        readline: 8.2.0 -> 8.2.1
        virtualbox-ose: 6.1.36 -> 6.1.44_2

However, with the update to 12.4-RELEASE-p3 and the above update, my VNCviewer (TightVNC Viewer on Windows) 
is broken now ("Error in TightVNC Viewer: Pseudo encoding 912 is not supported") -- I'm using Xvfb with x11vnc.
Therefore I can not start VirtualBox right now.

Regards,
Robert
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2023-06-25 09:34:01 UTC
Thank you, 

(In reply to Robert from comment #5)

> … the original behavior was probably due to a corrupted config file 
> and was fixed by removing all unnecessary entries. …

For newer symptoms, with causes that are most likely different, please make a new bug report. 

Thank you