Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 856811 - app-emulation/virtualbox-6.1.34-r4: virtual machines fail to start, they work fine in -r1
Summary: app-emulation/virtualbox-6.1.34-r4: virtual machines fail to start, they work...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard: introduced by the *FLAGS changes?
Keywords: PMASKED, PullRequest
Depends on:
Blocks: 856121
  Show dependency tree
 
Reported: 2022-07-07 07:45 UTC by Gabriele Svelto
Modified: 2022-08-13 19:24 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
`emerge --info` output (emerge-info.txt,7.06 KB, text/plain)
2022-07-07 09:02 UTC, Gabriele Svelto
Details
emerge --info (output,7.31 KB, text/plain)
2022-07-07 09:25 UTC, Alex Buell
Details
vm error on startup (6.1.34-r5__VBox.log,5.45 KB, text/x-log)
2022-07-07 15:37 UTC, Wadlax
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriele Svelto 2022-07-07 07:45:51 UTC
I've updated the app-emulation/virtualbox package to version 6.1.34-r4 and all my virtual machines stopped starting correctly. This message would show up in the logs:

00:00:00.390233 AssertLogRel /var/tmp/portage/app-emulation/virtualbox-6.1.34-r4/work/VirtualBox-6.1.34/src/VBox/Main/src-client/ConsoleImpl2.cpp(912) int Console::i_configConstructorInner(PUVM, PVM, util::AutoWriteLock*): !FAILED(hrc)

If I revert to version 6.1.34-r1 everything works fine.

Reproducible: Always




I'm on kernel version 5.15.41 built from gentoo-sources. SecureBoot is enabled and VirtualBox modules are signed using the same key as the kernel; I'm unsure if this matters but it might be worth mentioning it.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-07 07:47:37 UTC
Thanks. Do you get any other logs?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-07 07:56:12 UTC
COuld you also share:
1. emerge --info
2. Confirm whether downgrading suddenly makes it work again? Or not?
Comment 3 Gabriele Svelto 2022-07-07 09:02:46 UTC
Created attachment 790499 [details]
`emerge --info` output
Comment 4 Gabriele Svelto 2022-07-07 09:08:06 UTC
(In reply to Sam James from comment #1)
> Thanks. Do you get any other logs?

No, nothing else comes up in VirtualBox logs, when comparing with a successful run that line is the only difference between the two. I can attach the full logs if necessary.

(In reply to Sam James from comment #2)
> COuld you also share:
> 1. emerge --info
> 2. Confirm whether downgrading suddenly makes it work again? Or not?

Yes, downgrading makes everything work again just fine.
Comment 5 Alex Buell 2022-07-07 09:24:08 UTC
I am experiencing the same issue with virtualbox-6.1.34-r5. Reverting to 6.1.34-r1 resolved the issue. What's changed between the two? 

00:00:00.951137 VMSetError: /var/tmp/portage/app-emulation/virtualbox-6.1.34-r5/work/VirtualBox-6.1.34/src/VBox/VMM/VMMR3/VM.cpp(321) int VMR3Create(uint32_t, PCVMM2USERMETHODS, PFNVMATERROR, void*, PFNCFGMCONSTRUCTOR, void*, VM**, UVM**); rc=VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR
00:00:00.951140 VMSetError: The configuration constructor in main failed due to a COM error. Check the release log of the VM for further details.
00:00:00.951461 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={The configuration constructor in main failed due to a COM error. Check the release log of the VM for further details. (VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR)}, preserve=false aResultDetail=-6400
00:00:00.951524 Console: Machine state changed to 'PoweredOff'
00:00:00.999926 Power up failed (vrc=VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR, rc=NS_ERROR_FAILURE (0X80004005))
Comment 6 Alex Buell 2022-07-07 09:25:56 UTC
Created attachment 790502 [details]
emerge --info
Comment 7 Gabriele Svelto 2022-07-07 09:49:11 UTC
I gave 6.1.34-r5 a spin and it's also affected.
Comment 8 Adrien Dessemond 2022-07-07 12:17:04 UTC
Same issue here: 6.1.34-r3 and 6.1.34-r5 are broken. The last functional version is 6.1.34-r1.
Comment 9 Wadlax 2022-07-07 15:33:15 UTC
Good the 6.1.34-r1 still works :)

I can confirm that 6.1.34-r5 has VM startup error.

Emerged only 6.1.34-r1, and without restarting system - VM starts and works again.
Comment 10 Wadlax 2022-07-07 15:37:35 UTC
Created attachment 790547 [details]
vm error on startup

log has some records - ERROR [COM]: aRC=NS_ERROR_INVALID_POINTER
Comment 11 Larry the Git Cow gentoo-dev 2022-07-07 16:07:01 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a91772f80e721b8bad806190a85242beb43ac832

commit a91772f80e721b8bad806190a85242beb43ac832
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2022-07-07 16:06:50 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2022-07-07 16:06:50 +0000

    profiles: mask broken virtualbox revisions
    
    Bug: https://bugs.gentoo.org/856811
    Signed-off-by: David Seifert <soap@gentoo.org>

 profiles/package.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 12 kfm 2022-07-08 04:06:20 UTC
(In reply to Alex Buell from comment #5)
> I am experiencing the same issue with virtualbox-6.1.34-r5. Reverting to
> 6.1.34-r1 resolved the issue. What's changed between the two? 

The source-level differences between -r1 and -r3, which has been reported as broken, are due to the following.

1) -r3 applies $FILESDIR/virtualbox-6.1.34-no-pam.patch; -r1 doesn't
2) -r3 applies $FILESDIR/virtualbox-6.1.34-r3-python.patch; -r1 doesn't

The first of the above-mentioned patches is also applied to -r5.
Comment 13 kfm 2022-07-08 04:32:37 UTC
Further, at the ebuild level, the marked changes between -r1 and -r3 are as follows.

1) the creation of LocalConfig.kmk (referencing bug 843437)
2) the creation of AutoConfig.kmk (referencing bug 856121 and bug 785835)
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-10 22:55:13 UTC
For either myself or someone else who looks into this more: I'm guessing one of the variables used is either exclusively used for, or at least partly (exclusive vs partly affects the best way to fix it) some object(s)/components that need to be built with some special flags because of their low level nature.

It would be helpful if someone could bisect (not in the git sense) which of the changes Kerin listed actually cause the issue.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-11 02:45:17 UTC
(In reply to Sam James from comment #14)
> For either myself or someone else who looks into this more: I'm guessing one
> of the variables used is either exclusively used for, or at least partly
> (exclusive vs partly affects the best way to fix it) some
> object(s)/components that need to be built with some special flags because
> of their low level nature.
> 
> It would be helpful if someone could bisect (not in the git sense) which of
> the changes Kerin listed actually cause the issue.

Oh, I should add: ceamac, I'd try to just cherry-pick the Python changes, and if they work, put them in a new revision, and then handle the flags later.
Comment 16 Larry the Git Cow gentoo-dev 2022-07-12 03:10:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=605d086c0214e6ca8fa1ff5b62cc5d5e33a3aa47

commit 605d086c0214e6ca8fa1ff5b62cc5d5e33a3aa47
Author:     Viorel Munteanu <ceamac.paragon@gmail.com>
AuthorDate: 2022-07-11 08:17:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-12 03:09:58 +0000

    app-emulation/virtualbox: revert QA fix for CFLAGS
    
    It causes worse issues (the virtual machines do not start at all)
    
    This is an emergency fix, so we can unmask the package
    
    Bug: https://bugs.gentoo.org/843437
    Closes: https://bugs.gentoo.org/856811
    Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/26342
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{virtualbox-6.1.34-r5.ebuild => virtualbox-6.1.34-r6.ebuild}   | 7 -------
 profiles/package.mask                                              | 4 ----
 2 files changed, 11 deletions(-)
Comment 17 Larry the Git Cow gentoo-dev 2022-08-13 19:24:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b0dfde061d0197475629f95aa5d575b56c919e8

commit 6b0dfde061d0197475629f95aa5d575b56c919e8
Author:     Viorel Munteanu <ceamac.paragon@gmail.com>
AuthorDate: 2022-08-10 15:45:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-13 19:23:14 +0000

    app-emulation/virtualbox: filter flags
    
    With some combinations of CFLAGS/CXXFLAGS, the VM doesn't start
    
    Bug: https://bugs.gentoo.org/856811
    Closes: https://bugs.gentoo.org/864274
    Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/26814
    Signed-off-by: Sam James <sam@gentoo.org>

 .../virtualbox/virtualbox-6.1.36-r1.ebuild         | 648 +++++++++++++++++++++
 1 file changed, 648 insertions(+)