Package: systemtap
Version: 4.8-2
Severity: normal
X-Debbugs-Cc: kuisma.juho+deb...@gmail.com

Hey,

running stap on a fresh install after stap-prep will always produce
warnings, which break some of the stap functionality:

        $ stap test.stp 
        WARNING: Kernel function symbol table missing [man warning::symbols]

stap looks for the symbols at:

        $ strace stap test.stp 2>&1 | grep System.map
        openat(AT_FDCWD, "/lib/modules/6.1.0-10-amd64/build/System.map", 
O_RDONLY) = -1 ENOENT (No such file or directory)
        openat(AT_FDCWD, "/boot/System.map-6.1.0-10-amd64", O_RDONLY) = 3

where the latter just contains:

        $ cat /boot/System.map-6.1.0-10-amd64
        ffffffffffffffff B The real System.map is in the 
linux-image-<version>-dbg package

i.e., the symbols are actually available at:

        $ dpkg -L linux-image-6.1.0-10-amd64-dbg | grep System.map
        /usr/lib/debug/boot/System.map-6.1.0-10-amd64

but stap does not know this. I can get this working locally with:

        $ sudo cp /proc/kallsyms /boot/System.map-$(uname -r)

But this can't be the official solution for obvious reasons. See:

https://sourceware.org/systemtap/man/warning::symbols.7stap.html
https://wiki.archlinux.org/title/SystemTap#System.map_is_missing

For reference, stap works out of the box without stap-prep on Fedora 38.
There:

        $ strace stap test.stp 2>&1 | grep System.map
        openat(AT_FDCWD, 
"/lib/modules/6.3.11-200.fc38.x86_64/build/System.map", O_RDONLY) = 3
        $ rpm -qf /lib/modules/6.3.11-200.fc38.x86_64/build/System.map
        kernel-devel-6.3.11-200.fc38.x86_64

Cheers,
Juho Kuisma

-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemtap depends on:
ii  libavahi-client3   0.8-10
ii  libavahi-common3   0.8-10
ii  libc6              2.36-9
ii  libdw1             0.188-2.1
ii  libelf1            0.188-2.1
ii  libgcc-s1          12.2.0-14
ii  libnspr4           2:4.35-1
ii  libnss3            2:3.87.1-1
ii  libsqlite3-0       3.40.1-2
ii  libstdc++6         12.2.0-14
ii  lsb-release        12.0-1
ii  make               4.3-4.1
ii  python3            3.11.2-1+b1
ii  systemtap-common   4.8-2
ii  systemtap-runtime  4.8-2

systemtap recommends no packages.

Versions of packages systemtap suggests:
ii  systemtap-doc      4.8-2
pn  vim-addon-manager  <none>

-- no debconf information

Reply via email to