[ SRU ]virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.1: virtualbox kernel module failed to build - error: implicit declaration of function ‘set_pages_x’

Bug #1729568 reported by Jarek Zgoda on 2017-11-02
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
High
Unassigned
Xenial
Undecided
Unassigned
virtualbox-hwe (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned

Bug Description

[ Test case ]
* Install virtualbox-guest-dkms or virtualbox-dkms on a new hwe linux kernel

[ Regression potential ]
* Minimal, this is taken from later kernel modules (usual ifdefs in the kernel module)

[ Other info ]
* the kernel module needs the usual updates.
This happened after kernel update to 4.13.0-16-generic

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for virtualbox-5.0.40 for kernel 4.13.0-16-generic (x86_64)
 czw, 2 lis 2017, 11:44:13 CET
 make: Wejście do katalogu '/usr/src/linux-headers-4.13.0-16-generic'
   AR /var/lib/dkms/virtualbox/5.0.40/build/built-in.o
   AR /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/built-in.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/linux/SUPDrv-linux.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/SUPDrv.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/SUPDrvGip.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/SUPDrvSem.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/SUPDrvTracer.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/SUPLibAll.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/alloc-r0drv.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/initterm-r0drv.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/memobj-r0drv.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/mpnotification-r0drv.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/powernotification-r0drv.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
   CC [M] /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
 In file included from /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:31:0:
 /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.c: In function ‘VBoxHost_RTMemContAlloc’:
 /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/the-linux-kernel.h:313:47: error: implicit declaration of function ‘set_pages_x’ [-Werror=implicit-function-declaration]
  # define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages)
                                                ^
 /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:444:13: note: in expansion of macro ‘MY_SET_PAGES_EXEC’
              MY_SET_PAGES_EXEC(&paPages[iPage], 1);
              ^
 /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.c: In function ‘VBoxHost_RTMemContFree’:
 /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/the-linux-kernel.h:314:47: error: implicit declaration of function ‘set_pages_nx’ [-Werror=implicit-function-declaration]
  # define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages)
                                                ^
 /var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:492:13: note: in expansion of macro ‘MY_SET_PAGES_NOEXEC’
              MY_SET_PAGES_NOEXEC(&paPages[iPage], 1);
              ^
 cc1: some warnings being treated as errors
 scripts/Makefile.build:302: polecenia dla obiektu '/var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o' nie powiodły się
 make[2]: *** [/var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o] Błąd 1
 scripts/Makefile.build:575: polecenia dla obiektu '/var/lib/dkms/virtualbox/5.0.40/build/vboxdrv' nie powiodły się
 make[1]: *** [/var/lib/dkms/virtualbox/5.0.40/build/vboxdrv] Błąd 2
 Makefile:1546: polecenia dla obiektu '_module_/var/lib/dkms/virtualbox/5.0.40/build' nie powiodły się
 make: *** [_module_/var/lib/dkms/virtualbox/5.0.40/build] Błąd 2
 make: Opuszczenie katalogu '/usr/src/linux-headers-4.13.0-16-generic'
DKMSKernelVersion: 4.13.0-16-generic
Date: Thu Nov 2 11:44:20 2017
DuplicateSignature: dkms:virtualbox-dkms:5.0.40-dfsg-0ubuntu1.16.04.1:/var/lib/dkms/virtualbox/5.0.40/build/vboxdrv/r0drv/linux/the-linux-kernel.h:313:47: error: implicit declaration of function ‘set_pages_x’ [-Werror=implicit-function-declaration]
Package: virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.1
PackageVersion: 5.0.40-dfsg-0ubuntu1.16.04.1
SourcePackage: virtualbox
Title: virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.1: virtualbox kernel module failed to build

Jarek Zgoda (jarek-zgoda) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtualbox (Ubuntu):
status: New → Confirmed
Vlad Orlov (monsta) on 2017-11-05
tags: added: xenial

I just uploaded a possible fixed package here:
https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa

Can you please test it once it is built?

Changed in virtualbox (Ubuntu):
status: Confirmed → In Progress

Uploaded in unapproved queue

Changed in virtualbox (Ubuntu):
status: In Progress → Fix Committed
importance: Undecided → High
summary: - virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.1: virtualbox kernel module
- failed to build - error: implicit declaration of function ‘set_pages_x’
+ [ SRU ]virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.1: virtualbox kernel
+ module failed to build - error: implicit declaration of function
+ ‘set_pages_x’
description: updated
Changed in virtualbox-hwe (Ubuntu):
status: New → Invalid
Changed in virtualbox-hwe (Ubuntu Xenial):
status: New → Fix Committed
Changed in virtualbox (Ubuntu Xenial):
status: New → Fix Committed
Changed in virtualbox (Ubuntu):
status: Fix Committed → Fix Released
Stephan Springer (geryon) wrote :

The kernel build works now, thanks!

dpkg -l | grep \ virtualbox
ii virtualbox 5.0.40-dfsg-0ubuntu1.16.04.2 amd64
ii virtualbox-dkms 5.0.40-dfsg-0ubuntu1.16.04.2 all
ii virtualbox-ext-pack 5.0.40-0ubuntu1.16.04.1 all
ii virtualbox-guest-additions-iso 5.0.40-0ubuntu1.16.04.1 all
ii virtualbox-guest-utils 5.0.40-dfsg-0ubuntu1.16.04.2 amd64
ii virtualbox-guest-x11 5.0.40-dfsg-0ubuntu1.16.04.2 amd64
ii virtualbox-qt 5.0.40-dfsg-0ubuntu1.16.04.2 amd64

Stephan Springer (geryon) wrote :

I'm not sure whether this is the correct fix. Trying to start a Windows 7 VM with this fix froze my machine completely.

Can you please try again with the 16.04.3 packages from my ppa?

Stephan Springer (geryon) wrote :

Sorry, but starting the VM still freezes the machine completely with the 16.04.3 packages. I'm also seeing warnings at login that the Virtualbox kernel service is not running.

Is there anything I could help to debug this?

$ uname -a
Linux *** 4.13.0-16-generic #19~16.04.3-Ubuntu SMP Mon Oct 16 18:59:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Hello Jarek, or anyone else affected,

Accepted virtualbox into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/virtualbox/5.0.40-dfsg-0ubuntu1.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-xenial
Loys Ollivier (syol04) wrote :
Download full text (9.1 KiB)

Doesn't work for me :(

$ sudo apt install virtualbox/xenial-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '5.0.40-dfsg-0ubuntu1.16.04.2' (Ubuntu:16.04/xenial-proposed [amd64]) for 'virtualbox'
The following additional packages will be installed:
  dkms libgsoap8 libvncserver1 virtualbox-dkms
Suggested packages:
  vde2 virtualbox-guest-additions-iso
Recommended packages:
  virtualbox-qt
The following NEW packages will be installed:
  dkms libgsoap8 libvncserver1 virtualbox virtualbox-dkms
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 1 027 kB/15,5 MB of archives.
After this operation, 71,6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dkms all 2.2.0.3-2ubuntu11.5 [66,3 kB]
Get:2 http://fr.archive.ubuntu.com/ubuntu xenial/universe amd64 libgsoap8 amd64 2.8.28-1 [216 kB]
Get:3 http://fr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libvncserver1 amd64 0.9.10+dfsg-3ubuntu0.16.04.1 [122 kB]
Get:4 http://fr.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox-dkms all 5.0.40-dfsg-0ubuntu1.16.04.1 [623 kB]
Fetched 1 027 kB in 0s (5 918 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 325949 files and directories currently installed.)
Preparing to unpack .../dkms_2.2.0.3-2ubuntu11.5_all.deb ...
Unpacking dkms (2.2.0.3-2ubuntu11.5) ...
Selecting previously unselected package libgsoap8:amd64.
Preparing to unpack .../libgsoap8_2.8.28-1_amd64.deb ...
Unpacking libgsoap8:amd64 (2.8.28-1) ...
Selecting previously unselected package libvncserver1:amd64.
Preparing to unpack .../libvncserver1_0.9.10+dfsg-3ubuntu0.16.04.1_amd64.deb ...
Unpacking libvncserver1:amd64 (0.9.10+dfsg-3ubuntu0.16.04.1) ...
Selecting previously unselected package virtualbox-dkms.
Preparing to unpack .../virtualbox-dkms_5.0.40-dfsg-0ubuntu1.16.04.1_all.deb ...
Unpacking virtualbox-dkms (5.0.40-dfsg-0ubuntu1.16.04.1) ...
Selecting previously unselected package virtualbox.
Preparing to unpack .../virtualbox_5.0.40-dfsg-0ubuntu1.16.04.2_amd64.deb ...
Unpacking virtualbox (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up dkms (2.2.0.3-2ubuntu11.5) ...
Setting up libgsoap8:amd64 (2.8.28-1) ...
Setting up libvncserver1:amd64 (0.9.10+dfsg-3ubuntu0.16.04.1) ...
Setting up virtualbox-dkms (5.0.40-dfsg-0ubuntu1.16.04.1) ...
Loading new virtualbox-5.0.40 DKMS files...
First Installation: checking all kernels...
Building only for 4.14.0-041400-generic
Building initial module for 4.14.0-041400-generic
ERROR (dkms apport): kernel package linux-headers-4.14.0-041400-generic is not supported
Error! Bad return status for module build on kernel: 4.14.0-041400-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.0.40/build/make.log for more information.
Job for virtualbox.service failed because the control process exited with error code. See "systemctl status ...

Read more...

yes, 4.14 is not supported. this is normal.

Stephan Springer (geryon) wrote :

My system still freezes completely on Linux 4.13 when starting a VM. With kernel 4.11 it works. See comments #7 and #9.

Hence marking verification-failed.

tags: added: verification-failed verification-failed-xenial
removed: verification-needed verification-needed-xenial
Brian Murray (brian-murray) wrote :

Hello Jarek, or anyone else affected,

Accepted virtualbox-hwe into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/virtualbox-hwe/5.0.40-dfsg-0ubuntu1.16.04.1~16.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-xenial
removed: verification-failed verification-failed-xenial

@Stephan can you please try it?

Stephan Springer (geryon) wrote :

I could only install virtualbox-guest-dkms-hwe, virtualbox-guest-utils-hwe and virtualbox-guest-source-hwe, not virtualbox-guest-x11-hwe due to dependency conflicts. I hope that's not a problem …

I can't boot into 4.13 at the moment, so I'll report on that later.

Stephan Springer (geryon) wrote :

Sorry, the computer still freezes completely in the moment when I click on the “Start” button in VirtualBox (right when the boot window opens), when running a 4.13 kernel on the host. It still works on a 4.11 kernel.

Do I need to do anything else besides installing the three packages mentioned above?

This is a separate bug, lets move with this fix and please open a new one!

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial

Right now linux-hwe is fine, linux-hwe-edge might need some more fixes, but this shouldn't block this bug from being closed

@geryon, can you please try what Vlad mentioned here?

"Boot issue solved by removing intel-microcode package - no idea why it was installed."

I think you just need to disable iommu, but removing that package might be even better, or trying the one from bionic might also help us
https://launchpad.net/ubuntu/+source/intel-microcode

Vlad Orlov (monsta) wrote :

Yes, for me kernel 4.10 runs fine after removing intel-microcode. Should I test with hwe-edge too?

Vlad Orlov (monsta) wrote :

I don't have IOMMU virtualization though, my host machine has old Core 2 Duo CPU where VT-d wasn't implemented yet.

Stephan Springer (geryon) wrote :

No problem, I have created bug 1736116 for the freeze.

no longer affects: virtualbox (Arch Linux)
Vlad Orlov (monsta) wrote :

I confirm both updates work in Xenial VM with current linux-generic-hwe-edge (4.13.x):

- virtualbox-guest-* version 5.0.40-dfsg-0ubuntu1.16.04.2
- virtualbox-guest-*-hwe version 5.0.40-dfsg-0ubuntu1.16.04.1~16.04.4 (with HWE xorg)

While testing this, I forgot to disable xenial-proposed before installing hwe-edge kernel, so now I have linux-image-4.13.0-18-generic version 4.13.0-18.21~16.04.1 which is also from xenial-proposed. :)

@geryon you might have hit some new CPU new kernel bug, you should probably try the proposed pocket, as suggested above, and maybe virtualbox 5.2 from my ppa
https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/virtualbox-ppa

Robie Basak (racb) wrote :

Thank you for the verification report. Since this has been tested with virtualbox-hwe together, I'd like to release them together, but virtualbox-hwe still needs another two days of aging.

Vlad Orlov (monsta) wrote :

Three days passed, let's go.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox-hwe - 5.0.40-dfsg-0ubuntu1.16.04.1~16.04.4

---------------
virtualbox-hwe (5.0.40-dfsg-0ubuntu1.16.04.1~16.04.4) xenial; urgency=medium

  * Provide vboxguest-hwe, to avoid clash with old package
    (residual config is not purged on removal LP: #1708315)

virtualbox (5.0.40-dfsg-0ubuntu1.16.04.3) xenial; urgency=medium

  * Tweak and reduce previous patch

virtualbox (5.0.40-dfsg-0ubuntu1.16.04.2) xenial; urgency=medium

  * Fix kernel module build with new kernel 4.13 (LP: #1729568)

 -- Gianfranco Costamagna <email address hidden> Fri, 10 Nov 2017 09:53:26 +0100

Changed in virtualbox-hwe (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for virtualbox-hwe has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Vlad Orlov (monsta) wrote :

Thanks - but virtualbox (without -hwe) needs an update too.

yep, for people experiencing kernel 4.14 sadness:
ppa:costamagnagianfranco/virtualbox-ppa has the new fixed virtualbox

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox - 5.0.40-dfsg-0ubuntu1.16.04.2

---------------
virtualbox (5.0.40-dfsg-0ubuntu1.16.04.2) xenial; urgency=medium

  * Fix kernel module build with new kernel 4.13 (LP: #1729568)

 -- Gianfranco Costamagna <email address hidden> Mon, 06 Nov 2017 18:41:59 +0100

Changed in virtualbox (Ubuntu Xenial):
status: Fix Committed → Fix Released
Vlad Orlov (monsta) wrote :

Thanks, now it's complete.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments