sysdig fails with bionic:linux-hwe-edge 5.3 kernel

Bug #1853908 reported by Marcelo Cerri
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysdig (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
Undecided
Marcelo Cerri

Bug Description

[Impact]
The DKMS package won't work with new kernels on bionic.

[Test case]
Install and load the modules.

[Regression potential]
This might break the functioning of the module.

[Comments for bionic]
The syscall change affects too many places on the source code and upstream only patch to make it compatible was based on a recent version of the code, which makes the backport hard.

Since the Eoan version remains compatible with older kernels, I believe a better approach is to bring the same version back to Bionic.

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

sysdig fails to build in bionic with the new linux-hwe-edge kernel:

$ uname -a
Linux b 5.3.0-21-generic #22~18.04.1-Ubuntu SMP Wed Oct 30 04:57:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
$ dpkg -l | grep sysdig
ii sysdig 0.19.1-1ubuntu1.1 amd64 system-level exploration and troubleshooting tool
ii sysdig-dkms 0.19.1-1ubuntu1.1 all system-level exploration and troubleshooting tool - kernel source
$ cat /var/lib/dkms/sysdig/0.19.1/build/make.log
DKMS make.log for sysdig-0.19.1 for kernel 5.3.0-21-generic (x86_64)
Mon Nov 25 14:31:30 -03 2019
make: Entering directory '/usr/src/linux-headers-5.3.0-21-generic'
  CC [M] /var/lib/dkms/sysdig/0.19.1/build/main.o
/var/lib/dkms/sysdig/0.19.1/build/main.c: In function 'parse_socketcall':
/var/lib/dkms/sysdig/0.19.1/build/main.c:1263:2: error: too many arguments to function 'syscall_get_arguments'
  syscall_get_arguments(current, regs, 0, 2, args);
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/sysdig/0.19.1/build/main.c:28:0:
./arch/x86/include/asm/syscall.h:112:20: note: declared here
 static inline void syscall_get_arguments(struct task_struct *task,
                    ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/sysdig/0.19.1/build/main.c: In function 'drop_event':
/var/lib/dkms/sysdig/0.19.1/build/main.c:1399:4: error: too many arguments to function 'syscall_get_arguments'
    syscall_get_arguments(current, regs, 0, 1, &close_arg);
    ^~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/sysdig/0.19.1/build/main.c:28:0:
./arch/x86/include/asm/syscall.h:112:20: note: declared here
 static inline void syscall_get_arguments(struct task_struct *task,
                    ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/sysdig/0.19.1/build/main.c: In function 'page_fault_probe':
/var/lib/dkms/sysdig/0.19.1/build/main.c:2045:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  struct event_data_t event_data;
  ^~~~~~
scripts/Makefile.build:288: recipe for target '/var/lib/dkms/sysdig/0.19.1/build/main.o' failed
make[1]: *** [/var/lib/dkms/sysdig/0.19.1/build/main.o] Error 1
Makefile:1655: recipe for target '_module_/var/lib/dkms/sysdig/0.19.1/build' failed
make: *** [_module_/var/lib/dkms/sysdig/0.19.1/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.3.0-21-generic'

Revision history for this message
Marcelo Cerri (mhcerri) wrote :
description: updated
Changed in sysdig (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Marcelo Cerri (mhcerri)
tags: added: patch
Marcelo Cerri (mhcerri)
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Marcelo, or anyone else affected,

Accepted sysdig into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sysdig/0.24.1-1ubuntu3~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sysdig (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in sysdig (Ubuntu):
status: New → Invalid
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

$ sudo apt install sysdig-dkms
[...]
Selecting previously unselected package sysdig-dkms.
(Reading database ... 179522 files and directories currently installed.)
Preparing to unpack .../sysdig-dkms_0.24.1-1ubuntu3~18.04.1_all.deb ...
Unpacking sysdig-dkms (0.24.1-1ubuntu3~18.04.1) ...
Setting up sysdig-dkms (0.24.1-1ubuntu3~18.04.1) ...
Loading new sysdig-0.24.1 DKMS files...
Building for 5.3.0-25-generic 5.4.0-9-generic
Building initial module for 5.3.0-25-generic
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
Done.

sysdig-probe:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-25-generic/updates/dkms/

depmod.....

DKMS: install completed.

$ uname -r
5.3.0-25-generic
$ sudo modprobe sysdig-probe
$ dmesg | tail -n3
[ 1088.992794] sysdig_probe: loading out-of-tree module taints kernel.
[ 1088.992950] sysdig_probe: module verification failed: signature and/or required key missing - tainting kernel
[ 1089.003371] sysdig_probe: driver loading, sysdig-probe 0.24.1

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Also passed on ADT dkms tests:

Version: 0.24.1-1ubuntu3~18.04.1
Triggers: linux-meta-hwe/5.3.0.25.94 sysdig/0.24.1-1ubuntu3~18.04.1

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/s/sysdig/20191219_115143_f7d2e@/log.gz

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Alex Litvak (alitvak69) wrote :

I had a kernel crash executing csysdig with this module on 5.3.0.23, 18.04

Revision history for this message
Alex Litvak (alitvak69) wrote :
Revision history for this message
Marcelo Cerri (mhcerri) wrote :

I was able to reproduce the problem and based on my tests the following commit solves the problem:

https://github.com/draios/sysdig/commit/94ca2866d

Revision history for this message
Marcelo Cerri (mhcerri) wrote :

I will handle this issue on bug #1859178.

Revision history for this message
Andy Whitcroft (apw) wrote :

Hello Marcelo, or anyone else affected,

Accepted sysdig into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sysdig/0.24.1-1ubuntu4~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-bionic
removed: verification-done verification-done-bionic
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

sysdig 0.24.1-1ubuntu4~18.04.1 passed on ADT dkms tests with bionic/linux-hwe 5.3.0-26:

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/s/sysdig/20200114_140222_55c56@/log.gz

Version: 0.24.1-1ubuntu4~18.04.1
Triggers: linux-meta-hwe/5.3.0.26.95 sysdig/0.24.1-1ubuntu4~18.04.1

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

$ sudo apt install sysdig-dkms
[...]
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/universe amd64 sysdig-dkms all 0.24.1-1ubuntu4~18.04.1 [88.3 kB]
Fetched 88.3 kB in 0s (452 kB/s)
Selecting previously unselected package sysdig-dkms.
(Reading database ... 179360 files and directories currently installed.)
Preparing to unpack .../sysdig-dkms_0.24.1-1ubuntu4~18.04.1_all.deb ...
Unpacking sysdig-dkms (0.24.1-1ubuntu4~18.04.1) ...
Setting up sysdig-dkms (0.24.1-1ubuntu4~18.04.1) ...
Loading new sysdig-0.24.1 DKMS files...
Building for 5.3.0-26-generic 5.4.0-9-generic
Building initial module for 5.3.0-26-generic
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
Done.

sysdig-probe:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-26-generic/updates/dkms/

depmod...

DKMS: install completed.

$ sudo modprobe sysdig-probe
$ dmesg | tail -n3
[ 352.196242] sysdig_probe: loading out-of-tree module taints kernel.
[ 352.198010] sysdig_probe: module verification failed: signature and/or required key missing - tainting kernel
[ 352.212448] sysdig_probe: driver loading, sysdig-probe 0.24.1

$ sudo sysdig -S
[...]
<ctrl-c>
----------------------
Event #Calls
----------------------
> rt_sigprocmask 388
< rt_sigprocmask 388
> switch 368
> select 194
< select 194
> write 100
> read 99
> getpid 97
< getpid 97
< read 4

/var/log/kernel.log:
Jan 14 17:01:17 autopkgtest kernel: [ 1532.589338] sysdig_probe: adding new consumer 00000000c7d72146
Jan 14 17:01:17 autopkgtest kernel: [ 1532.589349] sysdig_probe: initializing ring buffer for CPU 0
Jan 14 17:01:17 autopkgtest kernel: [ 1532.595135] sysdig_probe: CPU buffer initialized, size=8388608
Jan 14 17:01:17 autopkgtest kernel: [ 1532.595137] sysdig_probe: starting capture
Jan 14 17:01:17 autopkgtest kernel: [ 1533.182079] sysdig_probe: deallocating consumer 00000000c7d72146
Jan 14 17:01:17 autopkgtest kernel: [ 1533.182419] sysdig_probe: no more consumers, stopping capture

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Andy Whitcroft (apw) wrote : Update Released

The verification of the Stable Release Update for sysdig has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sysdig - 0.24.1-1ubuntu4~18.04.1

---------------
sysdig (0.24.1-1ubuntu4~18.04.1) bionic; urgency=medium

  * Add patch to fix kernel NULL pointer dereference (LP: #1859178)

sysdig (0.24.1-1ubuntu3~18.04.1) bionic; urgency=medium

  * Sync with Eoan to fix 5.3 build issues (LP: #1853908)

 -- Marcelo Henrique Cerri <email address hidden> Fri, 10 Jan 2020 16:16:32 -0300

Changed in sysdig (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.