Parallel depmod failure with dkms autoinstall
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkms (Ubuntu) |
Fix Released
|
High
|
Robert Hooker | ||
Trusty |
Fix Released
|
High
|
Robert Hooker | ||
Xenial |
Fix Released
|
High
|
Robert Hooker |
Bug Description
Description of problem
-------
"dkms autoinstall" installs DKMS modules in parallel, potentially executing
several depmod instances in parallel.
The resulting race condition causes depmod to fail and dkms install as well.
This problem is critical because some DKMS modules can be left in "built"
state after a kernel upgrade, thus the kernel modules will not be re-installed
in /lib/modules/.
Ubuntu release
--------------
# lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04
DKMS package version
-------
# apt-cache policy dkms
dkms:
Installed: 2.2.0.3-2ubuntu11
Candidate: 2.2.0.3-2ubuntu11
Version table:
*** 2.2.0.3-2ubuntu11 500
500 http://
500 http://
100 /var/lib/
Steps to reproduce
------------------
Add 2 simple DKMS modules, mod1 and mod2 (test case in attachment) with
"dkms add", then run "dkms autoinstall".
# dkms add mod1 ; dkms add mod2
Creating symlink /var/lib/
DKMS: add completed.
Creating symlink /var/lib/
DKMS: add completed.
# dkms autoinstall
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
.make KERNELRELEASE=
make KERNELRELEASE=
cleaning build area...cleaning build area.....
DKMS: build completed.
DKMS: build completed.
mod2.ko:
Running module version sanity check.
mod1.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
depmod.
-------- Uninstall Beginning --------
Module: mod2
Version: 1.0
Kernel: 4.4.0-28-generic (x86_64)
-------
DKMS: install completed.
Status: Before uninstall, this module version was ACTIVE on this kernel.
mod2.ko:
- Uninstallation
- Deleting from: /lib/modules/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
Error! Problems with depmod detected. Automatically uninstalling this module.
DKMS: Install Failed (depmod problems). Module rolled back to built state.
root@ubuntu1604
mod1, 1.0, 4.4.0-28-generic, x86_64: installed
mod2, 1.0, 4.4.0-28-generic, x86_64: built
=> mod2 should be in "installed" state as well.
# modinfo mod1
filename: /lib/modules/
author: 6WIND
license: GPL
srcversion: 8D30BAE7A8F4D38
depends:
vermagic: 4.4.0-28-generic SMP mod_unload modversions
# modinfo mod2
modinfo: ERROR: Module mod2 not found.
Solution
--------
The problem is fixed in dkms official repository by commit
https:/
(also in attachment).
tags: | added: 6wind |
Changed in dkms (Ubuntu): | |
importance: | Undecided → High |
Changed in dkms (Ubuntu Xenial): | |
assignee: | nobody → Robert Hooker (sarvatt) |
Changed in dkms (Ubuntu Trusty): | |
assignee: | nobody → Robert Hooker (sarvatt) |
Changed in dkms (Ubuntu Trusty): | |
importance: | Undecided → High |
Changed in dkms (Ubuntu Xenial): | |
importance: | Undecided → High |
tags: |
added: verification-done removed: 6wind verification-needed |
The attachment "0001-Parallel- depmod- failure. patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]