[ 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
164
This bug affects 38 people
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
Fix Released
High
Unassigned
Declined for Artful by Gianfranco Costamagna
Xenial
Fix Released
Undecided
Unassigned
virtualbox-hwe (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Artful by Gianfranco Costamagna
Xenial
Fix Released
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

Revision history for this message
Jarek Zgoda (jarek-zgoda) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in virtualbox (Ubuntu):
status: New → Confirmed
Vlad Orlov (monsta)
tags: added: xenial
Revision history for this message
Stephan Springer (geryon) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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
Revision history for this message
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

Revision history for this message
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.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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

Revision history for this message
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

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

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
Revision history for this message
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...

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

yes, 4.14 is not supported. this is normal.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

@Stephan can you please try it?

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

@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

Revision history for this message
Vlad Orlov (monsta) wrote :

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

Revision history for this message
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.

Revision history for this message
Stephan Springer (geryon) wrote :

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

no longer affects: virtualbox (Arch Linux)
Revision history for this message
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. :)

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

@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

Revision history for this message
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.

Revision history for this message
Vlad Orlov (monsta) wrote :

Three days passed, let's go.

Revision history for this message
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
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update 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.

Revision history for this message
Vlad Orlov (monsta) wrote :

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

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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

Revision history for this message
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
Revision history for this message
Vlad Orlov (monsta) wrote :

Thanks, now it's complete.

Revision history for this message
Mat (snoopymat) wrote :

I had installed the security patches of Ubuntu 16.04 (64 bit; Unity desktop) on 2018-01-10, ~ 20:30. After needed reboot a window had been opened showing (in German) that a problem had been occurred. After reporting the error (to launchpad, Canonical or who knows) my web browser had been started showing launchpad's bug # 1730030, which is the original of this bug # 1729568.

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

When will this fix be available via Ubuntu Update? I'm still getting this:
http://neartalk.com/ss/2018-01-11_001_1010x571.png

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

the fix should be ongoing in proposed pocket

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

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.