Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800692 - sys-kernel/gentoo-sources-5.13.0.0-r1: VirtualBox cannot start EFI-based virtual machine
Summary: sys-kernel/gentoo-sources-5.13.0.0-r1: VirtualBox cannot start EFI-based virt...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://www.virtualbox.org/ticket/200...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-05 21:03 UTC by Andrew Udvare
Modified: 2021-08-22 06:58 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2021-07-05 21:03:18 UTC
If I use kernel 5.12.14 VirtualBox works fine for this scenario. With 5.13.0-r1 (or prior version), I get this message in dmesg:

Jul 05 16:58:14 limelight kernel:
                                  !!Assertion Failed!!
                                  Expression: pCritSect->s.Core.NativeThreadOwner == hNativeSelf
                                  Location  : /var/tmp/portage/app-emulation/virtualbox-6.1.22/work/VirtualBox-6.1.22/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp(575) int PDMCritSectLeave(PPDMCRITSECT)
Jul 05 16:58:14 limelight kernel: ffffac6f8606d000 <R3_STRING>: ffffffffffffffff != 00007f749dffb640; cLockers=-1 cNestings=1

A VirtualBox machine that is paused in 5.12.14 can somewhat start in 5.13 but does not start successfully.

Possibly related: https://www.virtualbox.org/ticket/20090

Thought maybe it was the other issue raised with 5.13.0 that led to -r1 but it turned out not to be.

I have to mask 5.13.0 till this is fixed.

Reproducible: Always

Steps to Reproduce:
1. emerge gentoo-sources:5.13.0-r1 virtualbox virtualbox-modules
2. In VirtualBox, create a new EFI-based machine.
3. Start it.
Actual Results:  
Fails to start.

Expected Results:  
Should start.

Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.1.0, glibc-2.33-r1, 5.13.0-gentoo-r1-limelight x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.13.0-gentoo-r1-limelight-x86_64-Intel-R-_Core-TM-_i7-5930K_CPU_@_3.50GHz-with-glibc2.33
KiB Mem:    32793152 total,  27854780 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 05 Jul 2021 18:36:55 +0000
Head commit of repository gentoo: 707102b0eb649b4dea3b5ddbddf4f344fe568637

Timestamp of repository brave-overlay: Fri, 02 Jul 2021 15:54:23 +0000
Head commit of repository brave-overlay: 0ec54a6d0819a172bc31fa4e0b334f6e319359e6

Timestamp of repository guru: Mon, 05 Jul 2021 16:06:20 +0000
Head commit of repository guru: 85504371cea25d16764ab22f0a9bd90f16314a92

Timestamp of repository menelkir: Sat, 03 Jul 2021 07:21:35 +0000
Head commit of repository menelkir: 558cda32d6e8327d4c9774cf2b96dd0ae1680986

Head commit of repository tatsh-overlay: d3bee8dfb6c249c8c520a3914a246773662979c1

Timestamp of repository torbrowser: Fri, 02 Jul 2021 15:53:54 +0000
Head commit of repository torbrowser: 722ba70952a657a67dbd84c181fea8c01a0aa879

sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p3) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0::gentoo
dev-lang/python:          2.7.18_p11::gentoo, 3.8.11::gentoo, 3.9.6::gentoo, 3.10.0_beta3::gentoo
dev-lang/rust:            1.53.0::gentoo
dev-util/cmake:           3.20.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r1::gentoo
sys-devel/gcc:            8.5.0::gentoo, 10.3.0-r1::gentoo, 11.1.0-r1::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: no

brave-overlay
    location: /var/db/repos/brave-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brave-overlay.git
    masters: gentoo

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo

menelkir
    location: /var/db/repos/menelkir
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/menelkir.git
    masters: gentoo

tatsh-overlay
    location: /var/db/repos/tatsh
    sync-type: git
    sync-uri: https://github.com/Tatsh/tatsh-overlay.git
    masters: gentoo
    sync-git-verify-commit-signature: no

torbrowser
    location: /var/db/repos/torbrowser
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/torbrowser.git
    masters: gentoo

Installed sets: @admin, @android, @bashcomp, @blender, @cdr, @charles, @chrome, @cups, @dbeaver, @emulators, @exfat, @firefox, @fonts, @gimp, @git, @i3, @ibus, @java-ebuilder, @kde, @kernel, @kodi, @libimobiledevice, @libreoffice, @media, @misc, @mlocate, @mupen64plus, @n64decomp, @pass, @portage-utilities, @python, @rar, @retroarch, @ringcentral, @shellcheck, @stepmania, @thunderbird, @tmux, @torbrowser, @turbovnc, @vim, @virtualbox, @vlc, @vscode, @wine, @x11, @xirvik-vpn
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -ggdb -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/clonehero/Custom /opt/clonehero/Screenshots /opt/clonehero/Songs /opt/clonehero/settings.ini /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -ggdb -march=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 10 --load-average 10 --quiet-build=y --verbose-conflicts"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance cgroup clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://mirrors.rit.edu/gentoo/"
INSTALL_MASK="/etc/conf.d /etc/init.d /etc/cron.daily /etc/cron.monthly /lib/rc"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB en_US"
MAKEOPTS="--jobs=10 --load-average=10"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aacs acl acpi activities alsa amd64 aptx avahi bash-completion bluetooth bluray branding bzip2 cairo cdda cddb cdio cdr cjk clang cli colord crypt cuda cups curl dbus declarative dri dts dv dvd dvdr egl emboss encode exif faudio ffmpeg flac fluidsynth fortran gdbm gif gles2 gpm gsm gstreamer gui hardened heif ibus iconv icu idn ipv6 jemalloc joystick jpeg jpeg2k kde kipi kwallet lame lcms ldac libass libcaca libglvnd libnotify libretro libtirpc lm-sensors lto lz4 lzma mad man matroska mng mod modplug mp3 mp4 mpeg multilib ncurses nls nptl nvenc ogg opengl openmp opus pam pango pcre pdf pgo phonon plasma png policykit ppds pulseaudio qml qt5 rar readline samba screencast sdl seccomp semantic-desktop snappy speex spell split-usr ssl startup-notification svg syslog system-av1 system-binutils system-boost system-bootloader system-cmark system-crontab system-ffmpeg system-harfbuzz system-heimdal system-info system-ipxe system-jpeg system-jsoncpp system-lcms system-leveldb system-libcxx system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-man system-mathjax system-mesa system-mitkrb5 system-numpy system-python system-qemu system-seabios system-sqlite system-ssl system-tbb system-webp system-wfconfig system-wide system-wlroots system-zlib systemd taglib tcpd theora tiff truetype twolame udev udisks unicode upower usb v4l vaapi vcd vdpau vim-syntax vorbis vpx vulkan wavpack webengine webp widgets wmf wxwidgets x264 x265 xattr xcb xml xpm xv xvid xxhash zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev libinput joystick" KERNEL="linux" L10N="en en-GB en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

=================================================================
                        Package Settings
=================================================================

app-emulation/virtualbox-6.1.22::gentoo was built with the following:
USE="alsa opengl opus pam pulseaudio qt5 udev -debug -doc -dtrace -headless -java -lvm -pax-kernel -python -sdk -vboxwebsrv -vnc" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_9 -python3_8"


app-emulation/virtualbox-modules-6.1.22::gentoo was built with the following:
USE="-dist-kernel -pax-kernel" ABI_X86="(64)"


Log on start from dmesg:

Jul 05 16:58:12 limelight kernel: vboxdrv: 000000001754b37b VMMR0.r0
Jul 05 16:58:12 limelight kernel: vboxdrv: 0000000035d8015b VBoxDDR0.r0
Jul 05 16:58:12 limelight kernel: VBoxNetFlt: attached to 'eno1' / 54:a0:50:d5:78:37
Jul 05 16:58:12 limelight kernel: vboxdrv: 00000000cd72ff17 VBoxEhciR0.r0
Jul 05 16:58:12 limelight kernel: VMMR0InitVM: eflags=246 fKernelFeatures=0x0 (SUPKERNELFEATURES_SMAP=0)
Jul 05 16:58:12 limelight kernel: device eno1 entered promiscuous mode
Jul 05 16:58:14 limelight kernel: device eno1 left promiscuous mode
Jul 05 16:58:14 limelight kernel:
                                  !!Assertion Failed!!
                                  Expression: pCritSect->s.Core.NativeThreadOwner == hNativeSelf
                                  Location  : /var/tmp/portage/app-emulation/virtualbox-6.1.22/work/VirtualBox-6.1.22/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp(575) int PDMCritSectLeave(PPDMCRITSECT)
Jul 05 16:58:14 limelight kernel: ffffac6f8606d000 <R3_STRING>: ffffffffffffffff != 00007f749dffb640; cLockers=-1 cNestings=1
Jul 05 16:58:14 limelight kernel: vboxnetflt: 0 out of 10 packets were not sent (directed to host)

I tried to change from bridged ethernet to a normal device or completely disable it and it made no difference.
Comment 1 Andrew Udvare 2021-07-14 09:58:01 UTC
There may be a workaround and I will try it later: https://www.virtualbox.org/ticket/20090?cversion=1&cnum_hist=4#comment:30
Comment 2 Andrew Udvare 2021-07-14 17:14:23 UTC
The workaround works for me.

Build 5.13 with CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=n and VirtualBox will stay working with EFI-based VMs.
Comment 3 Max Steel 2021-07-21 09:32:47 UTC
Upgrading Virtualbox to 6.1.24 (see Bug #803203) should also resolve this issue.
Comment 4 Mike Pagano gentoo-dev 2021-08-21 14:49:04 UTC
Looks like you have this resolved with later versions