Cannot load virtualbox kernel modules: Exec format error

If none of the more specific forums is the right place to ask

Cannot load virtualbox kernel modules: Exec format error

Postby styxxx » 2018-08-07 15:11

Hi,

for some unknown reason loading the virtualbox kernel modules suddenly fail. I already rebuilt the modules and even removed and reinstalled all virtualbox-related packages from the debian repositories without any effect. There were no error messages during install and building the modules, everything seemed to work.

Code: Select all
$ sudo modprobe --verbose vboxdrv
insmod /lib/modules/4.14.0-3-amd64/updates/dkms/vboxdrv.ko
modprobe: ERROR: could not insert 'vboxdrv': Exec format error


kern.log/dmesg says:
Code: Select all
[79848.516182] module: vboxdrv: Unknown rela relocation: 4

That's all.

It's the correct module version (Google told me that wrong kernel-modules-combinations can be the issue sometimes, but not the case here):
Code: Select all
$ uname -a
Linux notebookneu 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux


--force-modversion and --force-vermagic doesn't have any effect either. But when I tried yesterday I once got
Code: Select all
[72179.741385] vboxdrv: bad vermagic: kernel tainted.
[72179.741392] Disabling lock debugging due to kernel taint

But that was before I reinstalled virtualbox and it didn't happen afterwards. Still this might be related?

Installed packages:
Code: Select all
ii  virtualbox                                                       5.2.16-dfsg-3                          amd64        x86 virtualization solution - base binaries
ii  virtualbox-dkms                                                  5.2.16-dfsg-3                          all          x86 virtualization solution - kernel module sources for dkms
ii  virtualbox-qt                                                    5.2.16-dfsg-3                          amd64        x86 virtualization solution - Qt based user interface

ii  linux-headers-4.14.0-3-amd64                                     4.14.17-1                              amd64        Header files for Linux 4.14.0-3-amd64
ii  linux-headers-4.14.0-3-common                                    4.14.17-1                              all          Common header files for Linux 4.14.0-3
ii  linux-image-4.14.0-3-amd64                                       4.14.17-1                              amd64        Linux 4.14 for 64-bit PCs
ii  linux-kbuild-4.14                                                4.14.17-1                              amd64        Kbuild infrastructure for Linux 4.14

(I'm still running kernel 4.14 since the newer ones come with some issues rendering them unusable on my laptop :/ )

Anyone any idea? ;)
styxxx
 
Posts: 18
Joined: 2013-06-03 20:24

Re: Cannot load virtualbox kernel modules: Exec format error

Postby stevepusser » 2018-08-07 16:58

Hmmm...those package versions aren't in the stretch or stretch-backports repository. I think one should let us know if you're running testing or a FrankenDebian in the first sentence of a post asking for help. So...what is your system's situation?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9914
Joined: 2009-10-06 05:53

Re: Cannot load virtualbox kernel modules: Exec format error

Postby styxxx » 2018-08-07 17:07

Oh sorry, I totally forgot. :oops: You're right, I'm using Debian testing.
styxxx
 
Posts: 18
Joined: 2013-06-03 20:24

Re: Cannot load virtualbox kernel modules: Exec format error

Postby stevepusser » 2018-08-07 17:17

Does it help to force the rebuild of the driver with
Code: Select all
dpkg-reconfigure virtualbox-dkms

?
Watch the output to see if there are any build failures.

For what it's worth, it works for me on a Stretch base, 4.17.8 backported kernel, and backported vbox 5.2.16.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9914
Joined: 2009-10-06 05:53

Re: Cannot load virtualbox kernel modules: Exec format error

Postby styxxx » 2018-08-07 20:39

Thanks! I already tried that but did it again just now.
Everything seems normal, no errors. The module is built for two installed kernels including the used one. But I still get the same error when trying to modprobe it. :?

Code: Select all
-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.2.16
Kernel:  4.14.0-3-amd64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.14.0-3-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.14.0-3-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.14.0-3-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.14.0-3-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.............

DKMS: uninstall completed.

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.2.16
Kernel:  4.16.0-1-amd64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...............

DKMS: uninstall completed.

------------------------------
Deleting module version: 5.2.16
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-5.2.16 DKMS files...
Building for 4.14.0-3-amd64 4.16.0-1-amd64
Building initial module for 4.14.0-3-amd64
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.14.0-3-amd64/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.14.0-3-amd64/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.14.0-3-amd64/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.14.0-3-amd64/updates/dkms/

depmod............

DKMS: install completed.
Building initial module for 4.16.0-1-amd64
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.16.0-1-amd64/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.16.0-1-amd64/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.16.0-1-amd64/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.16.0-1-amd64/updates/dkms/

depmod.............

DKMS: install completed.




$ sudo modprobe --verbose vboxdrv
insmod /lib/modules/4.14.0-3-amd64/updates/dkms/vboxdrv.ko
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
styxxx
 
Posts: 18
Joined: 2013-06-03 20:24

Re: Cannot load virtualbox kernel modules: Exec format error

Postby stevepusser » 2018-08-08 01:05

Hmmm...if it's a regression in just one kernel version that's no longer in Debian, I doubt that the developers will be motivated to fix it. Can you get it working in the current Buster kernel despite the rendering issues? Then we'd know.

The rendering issues are also something that should be fixed before Buster is released.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9914
Joined: 2009-10-06 05:53

Re: Cannot load virtualbox kernel modules: Exec format error

Postby keneda212 » 2018-09-09 08:30

Hello
I have search the same error code, and the only research I found on internet is here
but when I have compare my informations with this topic I have see one thing : I was still in linux image 4.3 !
in fact, when I have build my debian, I think I haven't use the linux image amd64 but this image, and it was never update since
after the upgrade in the last linux image 4.17 now, virtual box works \o/
so thanks from a french man for this topic ;-)
keneda212
 
Posts: 1
Joined: 2018-09-09 07:57

Re: Cannot load virtualbox kernel modules: Exec format error

Postby styxxx » 2018-09-10 16:19

Totally forgot about this. But I tested other kernels that are currently installed: only the latest kernel seems to work. Using older ones always fail (for exampke 4.14, 4.15), although all the modules are installed without errors. Very strange.
styxxx
 
Posts: 18
Joined: 2013-06-03 20:24

Re: Cannot load virtualbox kernel modules: Exec format error

Postby stevepusser » 2018-09-10 16:53

For what it's worth, a backported virtualbox 5.2.18 works fine on my backported 4.18.6 kernel, too. https://build.opensuse.org/package/show ... ource-4.18
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9914
Joined: 2009-10-06 05:53

Re: Cannot load virtualbox kernel modules: Exec format error

Postby xchen » 2018-09-14 13:28

It is due to a change in the kernel:

https://www.reddit.com/r/linuxquestions ... s_anymore/
https://git.kernel.org/pub/scm/linux/ke ... 1ebf2fb4cd

It has nothing to do with virtualbox. All dkms modules have this problem if your kernel is not up-to-date and you are compiling modules with binutils >= 2.31 (debian testing/unstable).
xchen
 
Posts: 1
Joined: 2018-09-14 13:20


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable