VirtualBox

Ticket #18315 (closed defect: fixed)

Opened 10 months ago

Last modified 7 months ago

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

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

Change History

Changed 10 months ago by ste-55

comment:1 Changed 9 months ago by dmz73

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 Changed 9 months ago by michael

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

comment:3 Changed 9 months ago by michael

No, I see this is mainline stable.

comment:4 Changed 9 months ago by michael

  • Summary changed from Kernel modules do not build with linux kernel 4.4.169 to Kernel 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 Changed 9 months ago by zelea2

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 Changed 9 months ago by michael

My fault, fixed version coming up tomorrow.

comment:7 Changed 9 months ago by socratis

Related to this ticket is a duplicate: #18454.

comment:8 Changed 9 months ago by socratis

comment:9 Changed 9 months ago by michael

Please try the current test builds.

comment:11 Changed 9 months ago by socratis

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 Changed 9 months ago by slvr

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 Changed 9 months ago by 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

Last edited 9 months ago by IlyaK (previous) (diff)

comment:14 Changed 9 months ago by michael

@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 Changed 9 months ago by michael

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 follow-up: ↓ 17 Changed 8 months ago by bitone

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.

comment:17 in reply to: ↑ 16 Changed 8 months ago by socratis

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 Changed 7 months ago by erezhadad

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 follow-up: ↓ 21 Changed 7 months ago by michael

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

comment:20 Changed 7 months ago by jheb

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.

comment:21 in reply to: ↑ 19 ; follow-up: ↓ 24 Changed 7 months ago by DOU

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 follow-up: ↓ 23 Changed 7 months ago by michael

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

comment:23 in reply to: ↑ 22 Changed 7 months ago by DOU

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.

comment:24 in reply to: ↑ 21 Changed 7 months ago by socratis

• Replying to DOU from comment 21:

Michael, When is the release date for 5.2.27?

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".

• Replying to michael from comment 22:

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

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 Changed 7 months ago by DOU

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

comment:26 Changed 7 months ago by Melebius

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.

Changed 7 months ago by Melebius

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

comment:27 Changed 7 months ago by michael

  • Status changed from new to closed
  • Resolution set to fixed

comment:28 follow-up: ↓ 29 Changed 7 months ago by DOU

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

comment:29 in reply to: ↑ 28 Changed 7 months ago by socratis

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 7 months ago by socratis (previous) (diff)

comment:30 Changed 7 months ago by michael

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 follow-ups: ↓ 32 ↓ 33 Changed 7 months ago by michael

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

comment:32 in reply to: ↑ 31 Changed 7 months ago by DOU

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 7 months ago by DOU (previous) (diff)

comment:33 in reply to: ↑ 31 Changed 7 months ago by Melebius

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.

www.oracle.com
ContactPrivacy policyTerms of Use