VirtualBox

Opened 10 years ago

Closed 10 years ago

#12638 closed defect (fixed)

VBOXADDITIONS_4.3.4_91027 does not compile in RHEL-7 beta

Reported by: tcamuso Owned by:
Component: guest additions Version: VirtualBox 4.3.6
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

As reported in the VBox forum at ... https://forums.virtualbox.org/viewtopic.php?f=3&t=59094

In source file memobj-r0drv-linux.c starting at line 1536, and again at line 1542, the following test is made.

#  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
                pTask->mm->numa_next_reset = jiffies + 0x7fffffffUL;
#  endif
                pTask->mm->numa_next_scan  = jiffies + 0x7fffffffUL;

This compile-time test was made to adapt to 3.13 kernel commit ...

commit 930aa174fcc8b0efaad102fd80f677b92f35eaa2
Author: Mel Gorman <mgorman@suse.de>
Date:   Mon Oct 7 11:29:37 2013 +0100

    sched/numa: Remove the numa_balancing_scan_period_reset sysctl

However, RHEL7 has backported this patch to its 3.10 kernel, so the result of compiling this file in VBoxGuest editions is ...

/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1542:26: error: ‘struct mm_struct’ has no member named ‘numa_next_reset’
                 pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
                          ^
make[2]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2

Applying the following patch provided by forum user "spicysomtam" made the VBoxGuestAdditions compile successfully, but I don't know if this is what you really want to do.

--- a/vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+++ b/vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
@@ -1533,14 +1533,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ p
                 /** @todo Ugly hack! But right now we have no other means to disable
                  *        automatic NUMA page balancing. */
 # ifdef RT_OS_X86
-#  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
-                pTask->mm->numa_next_reset = jiffies + 0x7fffffffUL;
-#  endif
                 pTask->mm->numa_next_scan  = jiffies + 0x7fffffffUL;
 # else
-#  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
-                pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
-#  endif
                 pTask->mm->numa_next_scan  = jiffies + 0x7fffffffffffffffUL;
 # endif
             }

Attachments (1)

VBox-numa_no_reset.diff (1.5 KB ) - added by Fate 10 years ago.
First version of a patch that explicitly handles distro backports

Download all attachments as: .zip

Change History (14)

comment:1 by tcamuso, 10 years ago

Wait, that patch won't do for kernels < 3.13.

Let me see if I can come up with some thing better.

comment:2 by tcamuso, 10 years ago

Testing for KERNEL_VERSION is ineffective, since various distros may or may not have backported the changes to include/linux/mm_types.h for which this test was devised.

What needs to be done is for the VBoxLinuxAdditions.run script to grep for numa_next_scan in the kernel header, include/linux/mm_types.h. If grep returns status -eq 0 then configure the build to use numa_next_scan, else to use numa_next_reset.

by Fate, 10 years ago

Attachment: VBox-numa_no_reset.diff added

First version of a patch that explicitly handles distro backports

comment:3 by Fate, 10 years ago

greping seems to be overkill, we had similar issues with vboxvideo_drm.c in 11984 where distros did backports as well. Attached patch adopts the aproach taken by michael there. Could need some extending to handle RHEL7, too, I guess.

comment:4 by michel-slm, 10 years ago

You can match on RHEL_VERSION = 7 to detect RHEL7.

(got here after getting hit by the same bug on RHEL 7 release candidate for workstations, and Google didn't bring up the issue in the bugtracker but instead this: http://cathay4t.blogspot.com/2014/03/patch-for-vboxdrv-of-virtualbox-for.html )

comment:5 by David Charlap, 10 years ago

Now that RHEL7 has been released and is no longer beta, getting this bug fixed has just become more important. It's one thing to take your time or decide not to support a beta. A proper release from a major distribution is something altogether different.

comment:6 by NeilSmith, 10 years ago

I can confirm this issue (change from numa_next_reset to numa_next_scan) is still present as at VBoxGuestAdditions 4.3.12 which I downloaded 2014-06-18

Unsurprisingly this prevents Centos 7 (beta from RHEL 7) using guest additions.

In addition, it was previously reported for Ubuntu at the same time, ca. 6 months ago : https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1254803

Thanks to the info abouve, I may be able to get this to work - about to test.

As we're not clear on a patch which is definitely 'the right thing', please can we get the VBoxAdditions source verified and patched under these common OS ?

comment:7 by Frank Mehnert, 10 years ago

We now use RHEL_RELEASE_CODE. Here is a test build of the latest 4.3.x Additions.

comment:8 by Zdenek Sedlak, 10 years ago

I can confirm that the test build guest ISO is working. Tested CentOS 7 on VirtualBox 4.3.12.

comment:9 by Heebr, 10 years ago

Download location for the 4.3.12 Virtualbox Guest Additions: http://download.virtualbox.org/virtualbox/4.3.12/VBoxGuestAdditions_4.3.12.iso

comment:10 by hiroaki, 10 years ago

Hi Heebr, I downloaded http://download.virtualbox.org/virtualbox/4.3.12/VBoxGuestAdditions_4.3.12.iso but it turned out to be the same as the VBoxGuestAdditions_4.3.12.iso bundled in http://download.virtualbox.org/virtualbox/4.3.12/VirtualBox-4.3.12-93733-OSX.dmg

% wget http://download.virtualbox.org/virtualbox/4.3.12/VBoxGuestAdditions_4.3.12.iso

% shasum -a 256 VBoxGuestAdditions_4.3.12.iso c76dd5ec86f61ad72263ab6d2405723b06badfc2fae57f83ffa5de96f553400d VBoxGuestAdditions_4.3.12.iso

% shasum -a 256 /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso c76dd5ec86f61ad72263ab6d2405723b06badfc2fae57f83ffa5de96f553400d /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso

Can I download guest additions with this fix for VirtualBox 4.3.12?

comment:11 by Frank Mehnert, 10 years ago

Why don't you just download the build I posted in comment 7? Or use the Guest Additions from VBox 4.3.14 RC1.

comment:12 by confoundation, 10 years ago

I can also confirm that the .iso found within comment 7 works nicely on Scientific Linux 7 (another RHEL/CentOS clone).

comment:13 by Frank Mehnert, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in VBox 4.3.14.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use