New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

Member

crawford commented Jan 21, 2016

/cc @vcaputo

@crawford crawford modified the milestone: CoreOS 941.0.0 Jan 21, 2016

@einyx

This comment has been minimized.

einyx commented Mar 9, 2016

same here, seems similar to draios/sysdig#419

@vcaputo

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

einyx commented Mar 12, 2016

👍 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment