Package: sysdig
Version: 0.26.7-2
Severity: grave
Hi. sysdig used to work, but now it doesn't. I'm running Debian/sid, so
probably something about my set of dependencies doesn't agree with
sysdig, but we should figure out what that is.
Earlier today I was seeing a segfault when running some older sysdig
package I had installed. I just upgraded sysdig and sysdig-dkms to the
latest version available:
$ dpkg -l 'sysdig*'
ii sysdig 0.26.7-2 amd64 ...
ii sysdig-dkms 0.26.7-2 all ...
And then I got this:
$ sudo sysdig ...
sysdig: symbol lookup error: sysdig: undefined symbol:
_ZN9grpc_impl23CreateCustomChannelImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_18ChannelCredentialsEERKNS_16ChannelArgumentsE
This sounds like #955279, but even if it is, there should be a
Conflicts, or something, to prevent me from getting into that state. In
any case, I just
$ sudo apt install libgrpc++-dev
and also upgraded everything that sysdig explicitly depends on, except libc6.
And now it segfaults again:
$ sudo sysdig
zsh: segmentation fault sudo sysdig
The backtrace looks like this:
#0 0x00005575c7cdd210 in sinsp_parser::reset (this=0x5575c8474ac0,
evt=0x5575c8454ce0) at ./userspace/libsinsp/parsers.cpp:717
#1 0x00005575c7ce3f3d in sinsp_parser::process_event (this=0x5575c8474ac0,
evt=evt@entry=0x5575c8454ce0) at ./userspace/libsinsp/parsers.cpp:125
#2 0x00005575c7cfa8c9 in sinsp::next (this=0x5575c8454c50,
puevt=0x7ffd28e5b0b8) at ./userspace/libsinsp/sinsp.cpp:1290
#3 0x00005575c7c016fc in do_inspect (inspector=0x5575c8454c50,
cnt=18446744073709551615, duration_to_tot_ns=0, quiet=false, json=<optimized
out>, do_flush=false, print_progress=false, display_filter=0x0,
summary_table=std::vector of length 0, capacity 0,
formatter=0x7ffd28e5b4e0) at ./userspace/sysdig/sysdig.cpp:604
#4 0x00005575c7c04877 in sysdig_init (argc=<optimized out>, argv=<optimized
out>) at ./userspace/sysdig/sysdig.cpp:1596
#5 0x00005575c7bf1fcc in main (argc=<optimized out>, argv=0x7ffd28e5b788) at
./userspace/sysdig/sysdig.cpp:1694
This is inside the sysdig binary itself. No obvious cause. We're doing
this:
0x00005575c7cdd208 <+920>: callq 0x5575c7c2dd20
<sinsp_evt::get_param(unsigned int)>
0x00005575c7cdd20d <+925>: mov (%rax),%rax
=> 0x00005575c7cdd210 <+928>: mov (%rax),%rax
0x00005575c7cdd213 <+931>: test %rax,%rax
0x00005575c7cdd216 <+934>: jns 0x5575c7cdd220
<sinsp_parser::reset(sinsp_evt*)+944>
$rax isn't too crazy-looking, but we can't reference it:
(gdb) p /x $rax
$3 = 0x7f3406bcb6ba
(gdb) x /32xb $rax
0x7f3406bcb6ba: Cannot access memory at address 0x7f3406bcb6ba
I don't know if $rip is AT the offending instruction of the instruction
right after the offending instruction. So not entirely sure if rax is
parinfo or parinfo->m_val. Anyway...
Notes:
1. I upgraded everything sysdig Depends: on except libc6. Upgrading that
would force me to upgrade my python, and that makes me touch stuff
I'd rather not touch right now
2. I have gcc-10 installed, so that's where the libgcc... and
libstdc++... are coming from
Is this enough info?
-- System Information:
Debian Release: buster/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64, armhf
Kernel: Linux 4.17.0-1-amd64 (SMP w/20 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C),
LANGUAGE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages sysdig depends on:
ii libb64-0d 1.2-5+b1
ii libc6 2.30-2
ii libcurl4 7.68.0-1
ii libelf1 0.176-1.1
ii libgcc-s1 10.1.0-4
ii libgrpc++1 1.26.0-3
ii libjq1 1.6-1
ii libjsoncpp1 1.7.4-3.1
ii libluajit-5.1-2 2.1.0~beta3+dfsg-5.1
ii libncurses6 6.2-1
ii libprotobuf22 3.11.4-5
ii libssl1.1 1.1.1g-1
ii libstdc++6 10.1.0-4
ii libtbb2 2020.2-2
ii libtinfo6 6.2-1
ii zlib1g 1:1.2.11.dfsg-2
Versions of packages sysdig recommends:
ii sysdig-dkms 0.26.7-2
sysdig suggests no packages.
-- no debconf information