Skip to content
This repository has been archived by the owner. It is now read-only.

Unable to build sysdig kernel module using CoreOS shipped kernel headers #1082

Closed
luca3m opened this issue Jan 21, 2016 · 6 comments
Closed

Unable to build sysdig kernel module using CoreOS shipped kernel headers #1082

luca3m opened this issue Jan 21, 2016 · 6 comments

Comments

@luca3m
Copy link

@luca3m luca3m commented Jan 21, 2016

Hi, as wrote on issue draios/sysdig#521, dkms is not able to build sysdig-probe kernel module using kernel headers shipped with latest CoreOS version.

Troubleshooting I found that the file include/generated/autoconf.h is missing.

To reproduce the issue just run the sysdig container:

docker run -i -t --name sysdig --privileged -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro sysdig/sysdig
@crawford
Copy link
Contributor

@crawford crawford commented Jan 21, 2016

/cc @vcaputo

@crawford crawford added this to the CoreOS 941.0.0 milestone Jan 21, 2016
@crawford crawford added this to the CoreOS 941.0.0 milestone Jan 21, 2016
@einyx
Copy link

@einyx einyx commented Mar 9, 2016

same here, seems similar to draios/sysdig#419

@vcaputo
Copy link

@vcaputo vcaputo commented Mar 9, 2016

well, this should be working now that we ship the headers and build machinery in the image.

And at a glance, I see /lib/modules/$(uname -r)/build/include/generated/autoconf.h in the CoreOS vm I checked.

I will try reproduce this...

@vcaputo
Copy link

@vcaputo vcaputo commented Mar 9, 2016

It looks like the prod image is getting the .h's stripped late in the build process by a general *.h mask, the dev image has everything. We'll fix that up shortly.

@vcaputo
Copy link

@vcaputo vcaputo commented Mar 9, 2016

coreos/coreos-overlay#1828 fixes this, tested on a prod image:

* Setting up /usr/src links from host
ls: cannot access /host/usr/src: No such file or directory
* Unloading sysdig-probe, if present
rmmod: ERROR: Module sysdig_probe is not currently loaded
* Running dkms autoinstall

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.4.4-coreos -C /lib/modules/4.4.4-coreos/build M=/var/lib/dkms/sysdig/0.99.2058dev/build.....
cleaning build area....
Kernel cleanup unnecessary for this kernel.  Skipping...

DKMS: build completed.

sysdig-probe.ko:
Running module version sanity check.
 - Original module   
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.4-coreos/kernel/extra/
mkdir: cannot create directory '/lib/modules/4.4.4-coreos/kernel/extra': Read-only file system
cp: cannot create regular file '/lib/modules/4.4.4-coreos/kernel/extra/sysdig-probe.ko': No such file or directory

depmod...[ 1404.191110] docker0: port 1(vetha4b1e88) entered forwarding state
.

DKMS: install completed.
* Trying to load a system sysdig-probe, if present
* Trying to load a dkms sysdig-probe, if present
[ 1404.469465] sysdig_probe: module verification failed: signature and/or required key missing - tainting kernel
[ 1404.471788] sysdig_probe: driver loading, sysdig-probe 0.99.2058dev
sysdig-probe found and loaded in dkms
root@ab5e7ec92857:/# lsmod
Module                  Size  Used by
sysdig_probe          425984  0

@vcaputo vcaputo closed this Mar 9, 2016
@einyx
Copy link

@einyx einyx commented Mar 12, 2016

👍 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants