Bug 26454 - sysdig errors on install and run
Summary: sysdig errors on install and run
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7TOO MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-04-08 01:38 CEST by Barry Jackson
Modified: 2020-04-17 01:02 CEST (History)
6 users (show)

See Also:
Source RPM: sysdig-0.24.2-1.mga7.src.rpm
CVE:
Status comment:


Attachments
csysdig backtrace (56.87 KB, application/x-gzip)
2020-04-15 21:36 CEST, Dave Hodgins
Details

Description Barry Jackson 2020-04-08 01:38:05 CEST
Description of problem:
Install:
[baz@jackodesktop ~]$ sudo urpmi sysdig 
[sudo] password for baz: 
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release")
  dkms-sysdig                    0.24.2       2.mga8        noarch  (recommended)
  lib64jq1                       1.6          2.mga8        x86_64  
  lib64luajit5.1_2               2.1.0        0.beta3.7.mg> x86_64  
  luajit-common                  2.1.0        0.beta3.7.mg> noarch  
  sysdig                         0.24.2       2.mga8        x86_64  
8.3MB of additional disk space will be used.
1.7MB of packages will be retrieved.
Proceed with the installation of the 5 packages? (Y/n) y


    http://192.168.1.64/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/lib64jq1-1.6-2.mga8.x86_64.rpm
    http://192.168.1.64/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/sysdig-0.24.2-2.mga8.x86_64.rpm          
    http://192.168.1.64/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/luajit-common-2.1.0-0.beta3.7.mga8.noarch.rpm
    http://192.168.1.64/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/dkms-sysdig-0.24.2-2.mga8.noarch.rpm     
    http://192.168.1.64/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/lib64luajit5.1_2-2.1.0-0.beta3.7.mga8.x86_64.rpm
installing sysdig-0.24.2-2.mga8.x86_64.rpm lib64luajit5.1_2-2.1.0-0.beta3.7.mga8.x86_64.rpm luajit-common-2.1.0-0.beta3.7.mga8.noarch.rpm dkms-sysdig-0.24.2-2.mga8.noarch.rpm lib64jq1-1.6-2.mga8.x86_64.rpm from /var/cache/urpmi/rpms
Preparing...                     ###########################################################################################
      1/5: lib64jq1              ###########################################################################################
      2/5: dkms-sysdig           ###########################################################################################

Creating symlink /var/lib/dkms/sysdig/0.24.2-2.mga8/source ->
                 /usr/src/sysdig-0.24.2-2.mga8

DKMS: add Completed.

Preparing kernel 5.5.15-desktop-3.mga8 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....(bad exit status: 2)
using /proc/config.gz
make oldconfig....(bad exit status: 2)
make prepare....(bad exit status: 2)

Building module:
cleaning build area....
make -j4 KERNELRELEASE=5.5.15-desktop-3.mga8 -C /lib/modules/5.5.15-desktop-3.mga8/build M=/var/lib/dkms/sysdig/0.24.2-2.mga8/build....(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.5.15-desktop-3.mga8 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/sysdig/0.24.2-2.mga8/build/ for more information.
modprobe: FATAL: Module sysdig-probe not found in directory /lib/modules/5.5.15-desktop-3.mga8
warning: %post(dkms-sysdig-0.24.2-2.mga8.noarch) scriptlet failed, exit status 1
ERROR: 'script' failed for dkms-sysdig-0.24.2-2.mga8.noarch
      3/5: luajit-common         ###########################################################################################
      4/5: lib64luajit5.1_2      ###########################################################################################
      5/5: sysdig                ###########################################################################################

Run:
[baz@jackodesktop ~]$ sudo sysdig
[sudo] password for baz: 
Unable to load the driver
error opening device /dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.
[baz@jackodesktop ~]$ sudo modprobe sysdig-probe
modprobe: FATAL: Module sysdig-probe not found in directory /lib/modules/5.5.15-desktop-3.mga8
[baz@jackodesktop ~]$ uname -r
5.5.15-desktop-3.mga8


Version-Release number of selected component (if applicable):


How reproducible:
This is cauldron, but I saw similar in Mga7.

Steps to Reproduce:
As above.
Comment 1 Lewis Smith 2020-04-08 10:07:37 CEST
Thank you for the report.
It is not surprising that sysdig did not run, given that its installation failed!
However, please can you also post:
> Consult the make.log in the build directory
> /var/lib/dkms/sysdig/0.24.2-2.mga8/build/ for more information.
Assigning to DavidG as the main committer; CC'ing Florian as the registered maintainer. Perhaps it should be the other way round.

CC: (none) => doktor5000
Whiteboard: (none) => MGA7TOO
Assignee: bugsquad => geiger.david68210

Comment 2 Barry Jackson 2020-04-09 00:53:48 CEST
Seems fixed with new version submitted by David - thanks!

Closing as fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 3 Barry Jackson 2020-04-09 00:55:02 CEST
Reversing previous - forgot about Mga7

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 4 David GEIGER 2020-04-09 07:46:49 CEST
Assigning to QA,

Advisory:
=============================

Our current release needs now to be updated.
This update fixes compatibility with current kernel 5.5.x series.


Packages in 7/core/updates_testing:
========================
sysdig-0.26.6-1.mga7.i586.rpm
sysdig-0.26.6-1.mga7.x86_64.rpm
dkms-sysdig-0.26.6-1.mga7.noarch.rpm

Source RPM:
========================
sysdig-0.26.6-1.mga7.src.rpm

Source RPM: sysdig-0.24.2-2.mga8.src.rpm => sysdig-0.24.2-1.mga7.src.rpm
Assignee: geiger.david68210 => qa-bugs
Version: Cauldron => 7

Comment 5 Len Lawrence 2020-04-09 10:48:03 CEST
mga7, x86_64

Smooth installation and build of the kernel module.

$ sysdig --list-chisels

Category: Application
---------------------
httplog         HTTP requests log
httptop         Top HTTP requests
memcachelog     memcached requests log

Category: CPU Usage
-------------------
spectrogram     Visualize OS latency in real time.
subsecoffset    Visualize subsecond offset execution time.
topcontainers_cpu
                Top containers by CPU usage
topprocs_cpu    Top processes by CPU usage

........


# csysdig
< table headings displayed >
Collecting Data Segmentation fault (core dumped)
# lsmod | grep sysdig-probe
#

# sysdig
[...]
1230772 09:35:33.761078734 7 <NA> (27250) > switch next=0 pgft_maj=0 pgft_min=0 vm_size=0 vm_rss=0 vm_swap=0 
1230773 09:35:33.761081988 7 <NA> (0) > switch next=27250 pgft_maj=0 pgft_min=0 vm_size=0 vm_rss=0 ^C

The ncurses interface, csysdig requires the sysdig-probe module to be loaded.
Have not figured out how to do that - insmod cannot find it.
# dkms status
[...]
sysdig, 0.26.6-1.mga7, 5.5.15-desktop-3.mga7, x86_64: installed 
# locate sysdig-probe
/usr/bin/sysdig-probe-loader
/usr/lib/modules/5.5.15-desktop-3.mga7/dkms/extra/sysdig-probe.ko.xz
/var/lib/dkms/sysdig/0.26.6-1.mga7/5.5.15-desktop-3.mga7/x86_64/module/sysdig-probe.ko.xz
# sysdig-probe-loader
* Unloading sysdig-probe, if present
* Running dkms install for sysdig
<errors>
* Trying to load a system sysdig-probe, if present
sysdig-probe found and loaded with modprobe

# lsmod | grep sysdig
sysdig_probe          643072  0

csysdig still segfaults.
Need some hand-holding.  Adding feedback marker.

Keywords: (none) => feedback
CC: (none) => tarazed25

Comment 6 Barry Jackson 2020-04-09 14:25:05 CEST
I installed version from updates_testing on x86_64 Mga7 laptop using urpmi. No errors reported and no other messages.

[baz@leno ~]$ sudo urpmi sysdig
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release (zm-repo1)")
  lib64gpr7                      1.20.0       1.mga7        x86_64  
  lib64grpc++_unsecure1          1.20.0       1.mga7        x86_64  
  lib64grpc_unsecure7            1.20.0       1.mga7        x86_64  
  lib64protobuf17                3.6.1        1.mga7        x86_64  
(medium "Core Updates Testing (zm-repo5)")
  sysdig                         0.26.6       1.mga7        x86_64  
10MB of additional disk space will be used.
3MB of packages will be retrieved.
Proceed with the installation of the 5 packages? (Y/n) y


    http://mtf.duckdns.org/pub/linux/Mageia/distrib/7/x86_64/media/core/release/lib64grpc++_unsecure1-1.20.0-1.mga7.x86_64.rpm
    http://mtf.duckdns.org/pub/linux/Mageia/distrib/7/x86_64/media/core/release/lib64protobuf17-3.6.1-1.mga7.x86_64.rpm  
    http://mtf.duckdns.org/pub/linux/Mageia/distrib/7/x86_64/media/core/release/lib64gpr7-1.20.0-1.mga7.x86_64.rpm       
    http://mtf.duckdns.org/pub/linux/Mageia/distrib/7/x86_64/media/core/release/lib64grpc_unsecure7-1.20.0-1.mga7.x86_64.rpm
    http://mtf.duckdns.org/pub/linux/Mageia/distrib/7/x86_64/media/core/updates_testing/sysdig-0.26.6-1.mga7.x86_64.rpm  
installing lib64grpc_unsecure7-1.20.0-1.mga7.x86_64.rpm lib64gpr7-1.20.0-1.mga7.x86_64.rpm sysdig-0.26.6-1.mga7.x86_64.rpm lib64protobuf17-3.6.1-1.mga7.x86_64.rpm lib64grpc++_unsecure1-1.20.0-1.mga7.x86_64.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################################################################################
      1/5: lib64protobuf17       #######################################################################################
      2/5: lib64gpr7             #######################################################################################
      3/5: lib64grpc_unsecure7   #######################################################################################
      4/5: lib64grpc++_unsecure1 #######################################################################################
      5/5: sysdig                #######################################################################################
      1/1: removing sysdig-0.24.2-1.mga7.x86_64
                                 #######################################################################################
[baz@leno ~]$ sudo sysdig
Unable to load the driver
error opening device /dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.
[baz@leno ~]$

I rebooted and noted that the dkms-autorebuild had failed.

[baz@leno ~]$ sudo journalctl -xb |grep "dkms-autorebuild"
-- Subject: A start job for unit dkms-autorebuild.service has begun execution
-- A start job for unit dkms-autorebuild.service has begun execution.
Apr 09 13:01:42 leno dkms-autorebuild.sh[831]: sysdig (0.24.2-1.mga7): Installing module.
Apr 09 13:01:42 leno dkms-autorebuild.sh[831]: dkms build -m sysdig -v 0.24.2-1.mga7 -k 5.5.15-desktop-3.mga7 -a x86_64 -q --no-clean-kernel
Apr 09 13:01:57 leno dkms-autorebuild.sh[831]: (bad exit status: 10)
Apr 09 13:01:57 leno dkms-autorebuild.sh[831]:   Build failed.  Installation skipped.
-- Subject: A start job for unit dkms-autorebuild.service has finished successfully
-- A start job for unit dkms-autorebuild.service has finished successfully.
[baz@leno ~]$
Comment 7 Dave Hodgins 2020-04-09 14:45:19 CEST
Barry, do you have the kernel-desktop-devel-latest package installed? That's
required for compiling add on kernel modules.

# rpm -qa|grep sysdig
dkms-sysdig-0.26.6-1.mga7
sysdig-0.26.6-1.mga7

sysdig is working here, however csysdig segfaults.

David GEIGER, mind looking into csysdig?

CC: (none) => davidwhodgins

Comment 8 David GEIGER 2020-04-09 15:51:04 CEST
Does command "csysdig --raw" work?

CC: (none) => geiger.david68210

Comment 9 Len Lawrence 2020-04-09 16:04:05 CEST
Yep, 

$ csysdig --raw
Scrolls through processes....
Comment 10 Len Lawrence 2020-04-09 16:05:28 CEST
Typo there; should have been # not $.
Comment 11 Len Lawrence 2020-04-09 17:21:44 CEST
Note that none of the interactive keys work when running csysdig with --raw, 'p' for instance.
Comment 12 Barry Jackson 2020-04-10 13:44:48 CEST
Thanks Len,
Updating sysdig to the new version did not update dkms-sysdig, installing dkms-sysdig pulled the new version from updates_testing and the module builds.

Recommends:     dkms-%{oname}

Maybe should be:

Recommends:     dkms-%{oname} = %{version}-%{release}

or maybe even Requires:?
Comment 13 David GEIGER 2020-04-10 14:27:42 CEST
Is the dkms module really needed with sysdig, I think no so required it for a minimal install will not going to be wise.
Comment 14 Barry Jackson 2020-04-10 19:48:16 CEST
(In reply to David GEIGER from comment #13)
> Is the dkms module really needed with sysdig, I think no so required it for
> a minimal install will not going to be wise.

OK, but should not the Recommends be versioned?
Comment 15 David GEIGER 2020-04-12 09:19:04 CEST
(In reply to Barry Jackson from comment #14)
> (In reply to David GEIGER from comment #13)
> > Is the dkms module really needed with sysdig, I think no so required it for
> > a minimal install will not going to be wise.
> 
> OK, but should not the Recommends be versioned?

Try with new update from Cauldron.
Comment 16 Barry Jackson 2020-04-14 15:02:44 CEST
Updating in cauldron also pulled in the updated dkms package as expected.
Comment 17 David GEIGER 2020-04-15 11:51:18 CEST
Advisory:
=============================

Our current release needs now to be updated.
This update fixes compatibility with current kernel 5.5.x series.
Also make sure that the updated dkms module (with same version-release) is also pulled during the upgrade.


Packages in 7/core/updates_testing:
========================
sysdig-0.26.6-1.1.mga7.i586.rpm
sysdig-0.26.6-1.1.mga7.x86_64.rpm
dkms-sysdig-0.26.6-1.1.mga7.noarch.rpm

Source RPM:
========================
sysdig-0.26.6-1.1.mga7.src.rpm
Comment 18 Len Lawrence 2020-04-15 19:22:26 CEST
mga7, x86_64

Clean update.
Skipped sysdig-probe-loader and used modprobe instead.  Ran a few of the commands from the man page.  e.g.
# sysdig -s 2000 -w trace.scap proc.name=cat
Ran cat on a couple of files as user.
# sysdig -r trace.scap
[...]
46089 17:49:32.627171097 7 cat (25183) < close res=0 
46090 17:49:32.627174102 7 cat (25183) > exit_group 
46091 17:49:32.627248344 7 cat (25183) > procexit status=0 

$ man csysdig
   NAME
       csysdig - the ncurses user interface for sysdig
   SYNOPSIS
       csysdig [option]...  [filter]
....
       1. If you run csysdig without arguments, it will  display  live  system
          data, updating every 2 seconds.  To analyze a trace file, use the -r
          command line flag.

That still segfaults after displaying the ncurses interface.
# csysdig -r trace.scap
That fails to display the scap file and segfaults also.
Comment 19 Len Lawrence 2020-04-15 19:41:59 CEST
A full reboot did not help.  
Experimented a bit more.  Enabled updates testing again and removed dkms-sysdig.
Re-installed it and watched it build sysdig-probe then ran sysdig-probe-loader.
# sysdig-probe-loader
* Unloading sysdig-probe, if present
* Running dkms install for sysdig

Error! DKMS tree does not contain: sysdig-0.1.1dev
Build cannot continue without the proper tree.
* Running dkms build failed, couldn't find /var/lib/dkms/sysdig/0.1.1dev/build/make.log
* Trying to load a system sysdig-probe, if present
sysdig-probe found and loaded with modprobe
# lsmod | grep sysdig
sysdig_probe          643072  0

Is the probe name supposed to differ from the package name?
Comment 20 Len Lawrence 2020-04-15 19:43:26 CEST
s/package/module/
Comment 21 Len Lawrence 2020-04-15 19:54:09 CEST
$ updatedb
$ locate sysdig
....
/usr/lib/modules/5.5.15-desktop-3.mga7/dkms/extra/sysdig-probe.ko.xz

$ locate sysdig-0.1.1dev

$ locate sysdig | grep dev
/dev/sysdig0
/dev/sysdig1
/dev/sysdig2
/dev/sysdig3
/dev/sysdig4
/dev/sysdig5
/dev/sysdig6
/dev/sysdig7
Comment 22 Len Lawrence 2020-04-15 20:00:48 CEST
$ ll /var/lib/dkms/sysdig
drwxr-xr-x 4 root root 4096 Apr 15 18:32 0.26.6-1.1.mga7/
lrwxrwxrwx 1 root root   44 Apr 15 18:32 kernel-5.5.15-desktop-3.mga7-x86_64 -> 0.26.6-1.1.mga7/5.5.15-desktop-3.mga7/x86_64/
Comment 23 Dave Hodgins 2020-04-15 21:36:47 CEST
Created attachment 11588 [details]
csysdig backtrace

compressed backtrace of csysdig segfault
Comment 24 David GEIGER 2020-04-16 09:03:42 CEST
Can someone file a new bug upstream at https://github.com/draios/sysdig/issues , please?
Comment 25 Dave Hodgins 2020-04-16 11:19:30 CEST
Comment added to https://github.com/draios/sysdig/issues/843 with backtrace
attached.

Downgraded to sysdig-0.24.2-1.mga7 and confirmed the segfault is present in
that version too. As it's not a regression, validating the update. Advisory
committed to svn.

Keywords: feedback => advisory, validated_update
Whiteboard: MGA7TOO => MGA7TOO MGA7-64-OK
CC: (none) => sysadmin-bugs

Comment 26 Thomas Backlund 2020-04-16 11:45:35 CEST
What's the point of pushing an update that segfaults ?

CC: (none) => tmb

Comment 27 Dave Hodgins 2020-04-16 11:55:53 CEST
sysdig doesn't segfault, just csysdig without the --raw option.
Comment 28 Thomas Backlund 2020-04-16 13:55:29 CEST
Ah, I read too fast. no worries then...
Comment 29 Mageia Robot 2020-04-17 01:02:29 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2020-0097.html

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


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