VirtualBox

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18315 closed defect (fixed)

Kernel modules do not build with linux kernel 4.4.169 -> fixed after 6.0.4/5.2.26 and in test builds

Reported by: ste-55 Owned by:
Component: other Version: VirtualBox 6.0.2
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

As title Kernel modules do not build with linux kernel 4.4.169 and 4.4. > 169) on current versions of VirtualBox 5 and 6. This affects both host install and guest additions.

# /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

Log failure point: /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1126: error: too many arguments to function 'get_user_pages'

There is a patch for pld-linux here: https://github.com/pld-linux/VirtualBox/commit/dce9c015acacd35e2af585d9adb904f81d4060b4

Attachments (2)

vbox-setup.log (44.1 KB ) - added by ste-55 5 years ago.
vboxadd-setup.log (13.6 KB ) - added by Melebius 5 years ago.
failed build for kernel 4.4.0-145-lowlatency, see comment:26

Download all attachments as: .zip

Change History (35)

by ste-55, 5 years ago

Attachment: vbox-setup.log added

comment:1 by dmz73, 5 years ago

This is a bug in memobj-r0drv-linux.c

Line "# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)" in the following section should be changed to "# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)".

code section:

#else /* GET_USER_PAGES_API < KERNEL_VERSION(4, 6, 0) */

rc = get_user_pages(pTask, /* Task for fault accounting. */

pTask->mm, /* Whose pages. */ R3Ptr, /* Where from. */ cPages, /* How many pages. */

# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)

fWrite ? FOLL_WRITE | /* Write to memory. */

FOLL_FORCE /* force write access. */

: 0, /* Write to memory. */

# else

fWrite, /* Write to memory. */ fWrite, /* force write access. */

# endif

&pMemLnx->apPages[0], /* Page array. */ papVMAs); /* vmas */

#endif /* GET_USER_PAGES_API < KERNEL_VERSION(4, 6, 0) */

comment:2 by Michael Thayer, 5 years ago

Am I correctly guessing that 4.4.168 is a SUSE kernel? If so, which distribution?

comment:3 by Michael Thayer, 5 years ago

No, I see this is mainline stable.

comment:4 by Michael Thayer, 5 years ago

Summary: Kernel modules do not build with linux kernel 4.4.169Kernel modules do not build with linux kernel 4.4.169 -> fixed after 6.0.4/5.2.26 and in test builds

This should be fixed in future releases and in test builds as of about two hours of now. The Additions in the first 5.2 test builds may not contain the fix, as the test build Additions are usually a few revisions behind - if not, download the separate 5.2 Additions test build.

comment:5 by zelea2, 5 years ago

Has anyone succeeded in compiling the new driver? With kernel 4.4.174 and VirtualBox-6.0.5-129027-Linux_amd64.run I'm getting this error:

/var/lib/dkms/virtualbox/6.0.4/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1097:18: error: implicit declaration of function 'get_user_pages_remote'; did you mean 'get_user_pages_fast'? [-Werror=implicit-function-declaration]

rc = get_user_pages_remote(

get_user_pages_fast

comment:6 by Michael Thayer, 5 years ago

My fault, fixed version coming up tomorrow.

comment:7 by Socratis, 5 years ago

Related to this ticket is a duplicate: #18454.

comment:9 by Michael Thayer, 5 years ago

Please try the current test builds.

comment:11 by Socratis, 5 years ago

Another related discussion in the forums, which I'm going to notify about the test builds: https://forums.virtualbox.org/viewtopic.php?f=3&t=91632

comment:12 by slvr, 5 years ago

I just had luck installing the 5.2.27-129042 test build...

# ./VirtualBox-5.2.27-129042-Linux_x86.run Verifying archive integrity... All good. Uncompressing VirtualBox for Linux installation............. VirtualBox Version 5.2.27 r129042 (2019-02-26T07:20:32Z) installer Removing previous installation of VirtualBox 5.2.27 r128969 from /opt/VirtualBox Installing VirtualBox to /opt/VirtualBox Python found: python, installing bindings...

VirtualBox has been installed successfully.

comment:13 by IlyaK, 5 years ago

It seems that vboxsf still can't be installed. Do you have all modules built successfully?

I tried amd64 and got

too many arguments to function get_user_pages_unlocked

Last edited 5 years ago by IlyaK (previous) (diff)

comment:14 by Michael Thayer, 5 years ago

@IlyaK That sounds like a different problem to the one which was fixed, though I think it might still be covered by this bug description. Could you please provide a log file and details of the guest system?

comment:15 by Michael Thayer, 5 years ago

And please provide the module build log too (look at /var/log/vbox*). The module builds fine here against 4.4.170 (Ubuntu 16.04.5), development, 6.0 and 5.2 versions.

comment:16 by bitone, 5 years ago

Same issue here with Virtualbox 5.2.26 on Ubuntu 16.04 with kernel 4.4.0-143.

My quick'n'dirty workaround to make it compile was to change line 1111 of linux/memobj-r0drv-linux.c to:

# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 0)

So get_user_pages() gets the gup_flags.

in reply to:  16 comment:17 by Socratis, 5 years ago

Replying to bitone:

Same issue here with Virtualbox 5.2.26 on Ubuntu 16.04 with kernel 4.4.0-143. My quick'n'dirty workaround...

bitone, why a workaround, when in the title of the ticket it clearly states that it's been fixed in the Testbuilds?

comment:18 by erezhadad, 5 years ago

Testing on my laptop, Ubuntu 16.04.6 with kernel 4.4.0-145-generic, same issue as above: kernel module not building, with log as above. Had this issue since kernel 4.4.0-143-generic, with both VBox 5.2.26 and 6.0.4. Is it possible to release a new version with the above fix ASAP?

comment:19 by Michael Thayer, 5 years ago

Afraid not, that is one reason why we provide test builds.

comment:20 by jheb, 5 years ago

I was able to get past this using test build VirtualBox-6.0.5-129665-Linux_amd64.run. My machine is Ubuntu 16.04, kernel 4.4.0-145-generic. Extension pack 129665 and guest additions 129647 were also successful.

in reply to:  19 ; comment:21 by DOU, 5 years ago

Replying to michael:

Afraid not, that is one reason why we provide test builds.

Michael, When is the release date for 5.2.27?

comment:22 by Michael Thayer, 5 years ago

I'm afraid we are not able to provide release dates in advance. Sorry.

in reply to:  22 comment:23 by DOU, 5 years ago

Replying to michael:

I'm afraid we are not able to provide release dates in advance. Sorry.

Since kernel 4.4.0-143 has become a wide release to Ubuntu and other Linux distributions, a broken virtualbox may be a black eye to the product. I hope this can be fixed soon.

in reply to:  21 comment:24 by Socratis, 5 years ago

There is never an odd release, the next release will be the 5.2.28 one. The odd releases are the "intermediate" builds, or "test builds".

You can't due to company policy! But I can... :)

We're really close to the quarterly security updates by Oracle, less than a week actually. According to Oracle's security schedule, the next release (across its product line), will be on (or slightly after) 2019-04-16. So, as a famous old philosopher once said:

Patience you must have my young padawan... (Yoda)


  • Replying to DOU from comment 23:

    Since kernel 4.4.0-143 has become a wide release to Ubuntu and other Linux distributions, a broken virtualbox may be a black eye to the product.

The Linux kernel has its own schedule. Ubuntu and the other Linux distributions have their own schedule. VirtualBox has its own schedule. You got to understand that it should not be expected in RealLife™ from VirtualBox to follow the Linux kernel's schedule, or the distros' schedule, they're sort of independent... As a wise man recently said:

that is one reason why we provide test builds

comment:25 by DOU, 5 years ago

Real life is too complicated, virtual is perfect :) until we put it in a box?

comment:26 by Melebius, 5 years ago

Replying to IlyaK:

It seems that vboxsf still can't be installed. Do you have all modules built successfully?

I tried amd64 and got

too many arguments to function get_user_pages_unlocked

I am also getting this error with Xubuntu 16.04.6 (32-bit) running in the VirtualBox 6.0.5 r129923 on Windows 7 (64-bit). I will attach my log.

by Melebius, 5 years ago

Attachment: vboxadd-setup.log added

failed build for kernel 4.4.0-145-lowlatency, see comment:26

comment:27 by Michael Thayer, 5 years ago

Resolution: fixed
Status: newclosed

comment:28 by DOU, 5 years ago

Does it only fixes kernel 4.4.0-169 and up? 4.4.0-145 is still not working!

in reply to:  28 comment:29 by Socratis, 5 years ago

Replying to DOU:

4.4.0-145 is still not working

What's the problem DOU? I'm not good at guessing... :)

Can you post the output with the error and complete kernel details of course?

Last edited 5 years ago by Socratis (previous) (diff)

comment:30 by Michael Thayer, 5 years ago

See the Ubuntu kernel to mainline mapping<1>. 4.4.169 corresponds to Ubuntu's 4.4.0-143. Problems with 4.4.0-145, mapping to 4.4.176, are probably a new issue, but for convenience we can hijack this ticket. Shame they have started back-porting so aggressively to stable kernels. I assume that the log which @Melebius provided contains the information needed.

  1. https://people.canonical.com/~kernel/info/kernel-version-map.html

comment:31 by Michael Thayer, 5 years ago

On second thoughts, could you post vboxadd-setup.log? @Melebius's one is not for 6.0.6.

in reply to:  31 comment:32 by DOU, 5 years ago

Replying to michael:

On second thoughts, could you post vboxadd-setup.log? @Melebius's one is not for 6.0.6.

My system was upgraded to Ubuntu 18.04 LTS, which has kernel version 4.15. The VB 5.2.28 problem is gone after the upgrade. When I can access another machine, I will get more information.

Last edited 5 years ago by DOU (previous) (diff)

in reply to:  31 comment:33 by Melebius, 5 years ago

I installed VBox 6.0.6 today and the Guest Additions are building and running well with both the Ubuntu kernels 4.4.0-145-generic and 4.4.0-145-lowlatency.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use