Bug 702483 - Kernel modules are no longer rebuilt upon kernel upgrade
Summary: Kernel modules are no longer rebuilt upon kernel upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dkms
Version: 15
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: sunil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 711773 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-05 19:41 UTC by Michael Cronenworth
Modified: 2017-01-15 06:00 UTC (History)
20 users (show)

Fixed In Version: dkms-2.2.0.2-1.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-08 06:57:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
output of 'dkms --debug autoinstall' (70.06 KB, text/x-log)
2011-07-18 19:03 UTC, cblaauw
no flags Details
dkms debug log with patch #1 (7.32 KB, text/x-log)
2011-07-19 00:36 UTC, Michael Cronenworth
no flags Details
dkms debug log with patch #3 (175.46 KB, text/x-log)
2011-07-20 06:06 UTC, Michael Cronenworth
no flags Details

Description Michael Cronenworth 2011-05-05 19:41:15 UTC
Description of problem: When a new kernel package is installed, DKMS is not rebuilding/installing kernel modules that are registered with DKMS. In particular - VirtualBox and the NVIDIA driver.


Version-Release number of selected component (if applicable):
dkms-2.1.1.2-2.gitb66d7406.fc15


How reproducible: Always


Steps to Reproduce:
1. Install Fedora 15 Beta
2. Install VirtualBox or the NVIDIA driver, or any DKMS controlled module.
3. Upgrade Fedora 15. (to pull in a new kernel version)
4. Reboot.
  
Actual results:
NVIDIA - X will not start (no nvidia module)
VirtualBox - will not start (no vboxdrv, etc. modules)


Expected results:
Kernel modules should be built upon yum upgrade time.

Additional info:
This worked great with Fedora 14. It broke once I upgraded to Fedora 15.

I suspect the move to systemd broke dkms.

Comment 1 Joachim Backes 2011-05-15 07:16:39 UTC
Having similar issues in F15 with VirtualBox from virtualbox.org: the VirtualBox kernel modules are not rebuilt by dkms if first booting after a kernel update.

Comment 2 cblaauw 2011-05-27 16:13:52 UTC
Same here VirtualBox needs a 'service vboxdrv setup' after installation of new kernel

Comment 3 Michael Cronenworth 2011-06-06 13:12:55 UTC
Ping: Sunil

Has anyone looked into this issue yet?

Comment 4 sunil 2011-06-06 14:13:17 UTC
My apologies I am looking into the problem and will get back to you ASAP

--Sunil

Comment 5 Ed Greshko 2011-06-16 10:54:32 UTC
Yes, I am seeing this problem as well....  :-(

Comment 6 David 2011-06-20 10:29:10 UTC
Still does not work in Fedora 15. It also does not work in Rawhide Fedora 16 to be.

Comment 7 Andre Robatino 2011-06-28 00:09:38 UTC
Just updated to VirtualBox 4.0.10 via yum update and the kernel modules were automatically built this time.

Comment 8 Michael Cronenworth 2011-06-28 04:33:38 UTC
(In reply to comment #7)
> Just updated to VirtualBox 4.0.10 via yum update and the kernel modules were
> automatically built this time.

Andre, this bug is for when you update the kernel package. Not the VirtualBox package. The bug is with dkms.

DKMS version 2.2.0.0 was released 10 days ago. Here's a F15 scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3165209

I'll run tests on it and see if things are fixed.

Comment 9 Michael Cronenworth 2011-07-12 02:03:17 UTC
DKMS 2.2.0.0 does not fix this problem.

Comment 10 Mario Limonciello 2011-07-14 21:24:08 UTC
I wouldn't expect anything in 2.2.0.1 to fix it either. Is Fedora not supporting /etc/kernel/postinst.d properly?  That's how this should be executed.

Comment 11 firefexx 2011-07-18 07:42:29 UTC
Same problem with DMKS and VirtualBox since F15.

Comment 12 Michael Cronenworth 2011-07-18 13:44:36 UTC
Mario,

I am 99% sure that the bug is with DKMS and not the kernel package. If I execute the dkms script by hand, (it calls /usr/lib/dkms/dkms_autoinstaller start, which calls /usr/sbin/dkms autoinstall) the kernel modules are not built. In order to have kernel modules built by DKMS I have to call "dkms build -m $NAME -v $VERSION; dkms install --force -m $NAME -v $VERSION" for each kernel module $NAME and $VERSION.

Comment 13 Mario Limonciello 2011-07-18 16:16:23 UTC
If you are having to call with --force, something is definitely erroring out.

While the system is a state of modules not properly autoinstalling, can you please run 'dkms autoinstall --debug' and provide the output?

Comment 14 cblaauw 2011-07-18 19:03:46 UTC
Created attachment 513668 [details]
output of 'dkms --debug autoinstall'

I ran the questioned command

Comment 15 Mario Limonciello 2011-07-18 21:34:47 UTC
Thanks for the debug log.  This patch fixes it for me.  Can you please give it a shot?
http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=dkms.git;a=commit;h=fde2fb6ee9ba9efaed7dc22337c4dbb5abcde7b3

If not, can you please include the output of
'dkms status'
and
'dkms --debug autoinstall'

once more with that applied and i'll take another look.

Thanks,

Comment 16 Michael Cronenworth 2011-07-19 00:36:29 UTC
Created attachment 513690 [details]
dkms debug log with patch #1

(In reply to comment #13)
> If you are having to call with --force, something is definitely erroring out.

Sorry, I included '--force' out of habit. My modules build fine without --force.

> While the system is a state of modules not properly autoinstalling, can you
> please run 'dkms autoinstall --debug' and provide the output?

I've attached the log from running dkms with your patch. No modules were built. I had to call "dkms build; dkms install" for nvidia and vboxdrv to have modules built.

Comment 17 Mario Limonciello 2011-07-19 01:52:20 UTC
Michael,

In your situation you don't have the module installed on any kernels yet.  The DKMS autoinstaller service won't build for the initial kernel install, it's expected that it should have already successfully built and/or for at least one kernel.  This logic has remained both before and after the bash rewrite.

The reasoning behind this is that a module that failed to build on first install will likely fail on future installs too, so until some sort of intervention happens it shouldn't automatically try again when 'autoinstall' is called.

If you build for a non-active kernel before calling autoinstall, this shouldn't happen.

Cartsen:

Your failing situation was different it appeared to me than Michael's, so I still stand by that my above patch should resolve your situation.

Comment 18 Michael Cronenworth 2011-07-19 02:09:14 UTC
(In reply to comment #17)
> If you build for a non-active kernel before calling autoinstall, this shouldn't
> happen.

Fair enough. I only have the -35 kernel installed.

> Your failing situation was different it appeared to me than Michael's, so I
> still stand by that my above patch should resolve your situation.

I yum installed the -36 kernel from koji. After rebooting, I was left with no X, but modules were built. They were built for the -35 kernel and installed into the -36 kernel during boot. We're getting close.

Comment 19 Mario Limonciello 2011-07-19 16:48:27 UTC
Michael:

Can you try this patch (in addition to the other one above):

http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=dkms.git;a=commit;h=3a0115cf1725b50141b0be9810a0a2df358c4b2e

Comment 20 Michael Cronenworth 2011-07-20 02:51:42 UTC
(In reply to comment #19)
> Michael:
> 
> Can you try this patch (in addition to the other one above):
> 
> http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=dkms.git;a=commit;h=3a0115cf1725b50141b0be9810a0a2df358c4b2e

With this patch I still got modules for -35 installed on the -36 kernel.

-Running from the -35 kernel I yum remove'd the -36 kernel packages.
-I removed the /lib/modules/2.6.38.8-36.fc15.x86_64 directory.
-I applied the patch (previous patch still applied)
-I installed the -36 kernel, kernel-devel, and kernel-header packages.
-The modules built in /lib/modules/2.6.38.8-36.fc15.x86_64/extras were still built for the -35 kernel.

Comment 21 Mario Limonciello 2011-07-20 03:17:19 UTC
Was this for both the vbox modules as well as the nvidia modules?  I'd just like to rule out that this isn't a bug in the dkms.conf/Makefile being used for one particular module.  Saw that happen with NVIDIA in Ubuntu.

Comment 22 Michael Cronenworth 2011-07-20 04:00:28 UTC
Yes, all kernel modules (nvidia, vboxdrv, vboxdrvflt, and vboxdrvadp) show this through modinfo:

$ modinfo /lib/modules/2.6.38.8-36.fc15.x86_64/extra/vboxdrv.ko 
filename:       /lib/modules/2.6.38.8-36.fc15.x86_64/extra/vboxdrv.ko
version:        4.0.12 (0x00180000)
license:        GPL
description:    Oracle VM VirtualBox Support Driver
author:         Oracle Corporation
srcversion:     596400C68D799D8AE2DD31A
depends:        
vermagic:       2.6.38.8-35.fc15.x86_64 SMP mod_unload 
parm:           force_async_tsc:force the asynchronous TSC mode (int)

Comment 23 Mario Limonciello 2011-07-20 05:46:50 UTC
OK, I just set up a F15 machine and installed Vbox and can reproduce it grabbing kernels from Koji.

This fixes it for me. http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=dkms.git;a=commit;h=568f567a582ec889be92068cdd02360753513594

Comment 24 Michael Cronenworth 2011-07-20 06:06:59 UTC
Created attachment 513925 [details]
dkms debug log with patch #3

Using the version 2.2.0.0 from the scratch build I made, plus the previous two patches, I applied your third patch. The set_kernel_source_dir function I have is quite different from what your patch shows, so I made it look exactly like your function. After removing the -36 kernel again and reinstalling, I did not get any kernel modules. The attached log file (dkms autoinstall --debug) says it cannot find my headers, except all the correct kernel packages are installed. Another bug or am I missing something?

kernel-devel-2.6.38.8-35.fc15.x86_64
kernel-2.6.38.8-35.fc15.x86_64
kernel-devel-2.6.38.8-36.fc15.x86_64
kernel-2.6.38.8-36.fc15.x86_64

Comment 25 Mario Limonciello 2011-07-20 06:13:41 UTC
I'm working off of tip, there were a few other patches that applies with.  Can you just rework off of tip (1,2,3 patches are already there too).

Comment 26 Michael Cronenworth 2011-07-21 22:52:08 UTC
(In reply to comment #25)
> I'm working off of tip, there were a few other patches that applies with.  Can
> you just rework off of tip (1,2,3 patches are already there too).

That worked. Thanks! Here's a scratch build for anyone that wants to upgrade now:

http://koji.fedoraproject.org/koji/taskinfo?taskID=3221367

Comment 27 Mario Limonciello 2011-07-21 23:13:08 UTC
OK great thanks for confirmation.  This is the last bug that was pending for a bug fix release.  I'll prepare a new release.

Comment 28 John Mev 2011-07-27 18:40:45 UTC
launched by hand, the "dkms_autoinstaller script returns:

log_daemon_msg : command not found
log_end_msg: command not found

and then fails

Comment 29 John Mev 2011-07-27 18:43:54 UTC
*** Bug 711773 has been marked as a duplicate of this bug. ***

Comment 30 Michael Cronenworth 2011-07-27 18:55:07 UTC
John, and anyone else, please feel free to use the scratch build in comment 26 in the meantime.

Comment 31 John Mev 2011-08-07 15:45:46 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > I'm working off of tip, there were a few other patches that applies with.  Can
> > you just rework off of tip (1,2,3 patches are already there too).
> 
> That worked. Thanks! Here's a scratch build for anyone that wants to upgrade
> now:
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=3221367


Sorry, didn't find this build

will it be soon in updates ?

Comment 32 John Mev 2011-08-07 19:44:03 UTC
OK

got it at

http://linux.dell.com/dkms/

many thanks !

Comment 33 Michael Cronenworth 2011-08-07 21:38:43 UTC
Mario/sunil: Ping.

Could you please push a new DKMS package for Fedora 15 into Fedora updates?

Comment 34 Mario Limonciello 2011-08-08 16:26:02 UTC
Sunil hopefully should be able to help with this.  I don't have any access rights to put anything in Fedora.

Comment 35 David 2011-08-22 09:21:50 UTC
Is this problem ever going to get fixed?

Comment 36 Peter C 2011-08-24 22:49:00 UTC
I'd also love to see some movement on this one - I've been following this for a while now.

Comment 37 Michael Cronenworth 2011-08-24 23:00:53 UTC
Ping: sunil

Could you push an F15 and higher update package?

If you are too busy, I'll be glad to take co-maintainership and push an update for you.

Comment 38 sunil 2011-08-26 10:27:05 UTC
I have pushed the latest package to f-17 base yesterday I should be able to make it available to other branches by tomorrow. I apologize for this delay....

Comment 39 sunil 2011-08-26 10:32:18 UTC
I mean f-17 master branch

Comment 40 Fedora Update System 2011-08-26 18:11:50 UTC
dkms-2.2.0.2-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dkms-2.2.0.2-1.fc16

Comment 41 Fedora Update System 2011-08-27 06:19:01 UTC
dkms-2.2.0.2-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/dkms-2.2.0.2-1.fc15

Comment 42 Fedora Update System 2011-08-28 05:40:25 UTC
Package dkms-2.2.0.2-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dkms-2.2.0.2-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/dkms-2.2.0.2-1.fc16
then log in and leave karma (feedback).

Comment 43 Steve 2011-08-30 07:47:36 UTC
I've the same problem without dkms installed:

[root@morija ~]$ /etc/sysconfig/modules/VirtualBox-OSE.modules
ERROR: modinfo: could not find module vboxdrv
ERROR: modinfo: could not find module vboxnetflt
ERROR: modinfo: could not find module vboxnetadp


akmod-VirtualBox-OSE-4.0.4-2.fc15.x86_64
VirtualBox-OSE-kmodsrc-4.0.4-1.fc15.x86_64
kmod-VirtualBox-OSE-2.6.38.8-35.fc15.x86_64-4.0.4-2.fc15.4.x86_64
VirtualBox-OSE-4.0.4-1.fc15.x86_64

Comment 44 John Mev 2011-08-30 21:52:44 UTC
(In reply to comment #43)
> I've the same problem without dkms installed:
> 
> [root@morija ~]$ /etc/sysconfig/modules/VirtualBox-OSE.modules
> ERROR: modinfo: could not find module vboxdrv
> ERROR: modinfo: could not find module vboxnetflt
> ERROR: modinfo: could not find module vboxnetadp
> 
> 
> akmod-VirtualBox-OSE-4.0.4-2.fc15.x86_64
> VirtualBox-OSE-kmodsrc-4.0.4-1.fc15.x86_64
> kmod-VirtualBox-OSE-2.6.38.8-35.fc15.x86_64-4.0.4-2.fc15.4.x86_64
> VirtualBox-OSE-4.0.4-1.fc15.x86_64

This is not the same problem. This bug concerns dkms.

If you don't work with it, report the bug against akmods.
BTW have you installed the developpement tools ?

Comment 45 Steve 2011-08-31 05:39:59 UTC
(In reply to comment #44)
> (In reply to comment #43)
> > I've the same problem without dkms installed:
> > 
> > [root@morija ~]$ /etc/sysconfig/modules/VirtualBox-OSE.modules
> > ERROR: modinfo: could not find module vboxdrv
> > ERROR: modinfo: could not find module vboxnetflt
> > ERROR: modinfo: could not find module vboxnetadp
> > 
> > 
> > akmod-VirtualBox-OSE-4.0.4-2.fc15.x86_64
> > VirtualBox-OSE-kmodsrc-4.0.4-1.fc15.x86_64
> > kmod-VirtualBox-OSE-2.6.38.8-35.fc15.x86_64-4.0.4-2.fc15.4.x86_64
> > VirtualBox-OSE-4.0.4-1.fc15.x86_64
> 
> This is not the same problem. This bug concerns dkms.
> 
> If you don't work with it, report the bug against akmods.
> BTW have you installed the developpement tools ?

Yes those are dependencies of akmod*.

Comment 46 Fedora Update System 2011-09-08 06:57:35 UTC
dkms-2.2.0.2-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 47 Fedora Update System 2011-09-09 17:04:26 UTC
dkms-2.2.0.2-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 48 Oleg 2011-11-24 10:39:51 UTC
dkms-2.2.0.2-1.fc16

[soz@localhost .VirtualBox]$ sudo /etc/sysconfig/modules/VirtualBox-OSE.modules
ERROR: modinfo: could not find module vboxdrv
ERROR: modinfo: could not find module vboxnetflt
ERROR: modinfo: could not find module vboxnetadp
[soz@localhost .VirtualBox]$

????????????

Comment 49 sunil 2011-11-24 11:14:12 UTC
can u explain the problem? If it is a different problem than what was closed here create another bug. It helps tracking the bug.

Comment 50 Rudi Gaelzer 2011-12-01 16:15:58 UTC
(In reply to comment #46)
> dkms-2.2.0.2-1.fc15 has been pushed to the Fedora 15 stable repository.  If
> problems still persist, please make note of it in this bug report.

It seems that the problem still persists in F15:
----------------------------
[root@netuno rudi]# yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
Setting up Install Process
Package dkms-2.2.0.2-1.fc15.noarch already installed and latest version
Package binutils-2.21.51.0.6-6.fc15.x86_64 already installed and latest version
Package gcc-4.6.1-9.fc15.x86_64 already installed and latest version
Package 1:make-3.82-4.fc15.x86_64 already installed and latest version
Package patch-2.6.1-9.fc15.x86_64 already installed and latest version
Package libgomp-4.6.1-9.fc15.x86_64 already installed and latest version
Package glibc-headers-2.14-5.x86_64 already installed and latest version
Package glibc-devel-2.14-5.x86_64 already installed and latest version
Package kernel-headers-2.6.41.1-1.fc15.x86_64 already installed and latest version
Package kernel-devel-2.6.41.1-1.fc15.x86_64 already installed and latest version
Nothing to do

----------------------------
[root@netuno rudi]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]
Removing old VirtualBox netadp kernel module               [  OK  ]
Removing old VirtualBox netflt kernel module               [  OK  ]
Removing old VirtualBox kernel module                      [  OK  ]
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 2.6.41.1-1.fc15.x86_64 (x86_64)
Consult /var/lib/dkms/vboxhost/4.1.6/build/make.log for more information.
                                                           [FAILED]
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules                      [FAILED]
  (Look at /var/log/vbox-install.log to find out what went wrong)

----------------------------
[root@netuno rudi]# tail /var/lib/dkms/vboxhost/4.1.6/build/make.log
  CC [M]  /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
  LD [M]  /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/vboxnetflt.o
  LD      /var/lib/dkms/vboxhost/4.1.6/build/vboxpci/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/4.1.6/build/vboxpci/linux/VBoxPci-linux.o
/var/lib/dkms/vboxhost/4.1.6/build/vboxpci/linux/VBoxPci-linux.c:39:28: fatal error: asm/amd_iommu.h: No such file or directory
compilation terminated.
make[2]: *** [/var/lib/dkms/vboxhost/4.1.6/build/vboxpci/linux/VBoxPci-linux.o] Error 1
make[1]: *** [/var/lib/dkms/vboxhost/4.1.6/build/vboxpci] Error 2
make: *** [_module_/var/lib/dkms/vboxhost/4.1.6/build] Error 2
make: Leaving directory `/usr/src/kernels/2.6.41.1-1.fc15.x86_64'

----------------------------

Do you want me to send the full report?
Thanks

Comment 51 Michael Cronenworth 2011-12-01 16:27:11 UTC
Rudi, your problem has nothing to do with DKMS. Please use the patch[1] I made if you wish to use VirtualBox on F15.

This bug is fixed.

[1] http://lists.fedoraproject.org/pipermail/devel/2011-November/159811.html

Comment 52 John Mev 2011-12-02 10:25:35 UTC
And how can it work with a 2.6.41.x kernel ?

Pls see the bugzilla on virtualbox.org

Comment 53 Michael Cronenworth 2011-12-02 14:00:26 UTC
(In reply to comment #52)
> And how can it work with a 2.6.41.x kernel ?

Use the patch that I linked to. Please take your comments to the VirtualBox forum if you wish to discuss this further.

This bug is fixed and closed.


Note You need to log in before you can comment on or make changes to this bug.