Package: systemtap
Version: 3.0-7
Severity: normal
Tags: stretch
Hi,
after I set up systemtap, I ran the example command provided in the
documentation:
https://sourceware.org/systemtap/SystemTap_Beginners_Guide/using-systemtap.html#testing
> stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
GCC (6) complains upon compiling the C source code into the kernel module that
it is missing C Headers:
> /tmp/stapHaiI5M/stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.c:10:29: fatal
> error: runtime_defines.h: No such file or directory
> #include "runtime_defines.h"
For a more verbose log, please see the attachment.
-- System Information:
Debian Release: 9.0
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemtap depends on:
ii libavahi-client3 0.6.32-2
ii libavahi-common3 0.6.32-2
ii libc6 2.24-9
ii libdw1 0.168-0.2
ii libelf1 0.168-0.2
ii libgcc1 1:6.3.0-6
ii libnspr4 2:4.12-6
ii libnss3 2:3.26.2-1
ii libsqlite3-0 3.16.2-2
ii libstdc++6 6.3.0-6
ii make 4.1-9.1
ii systemtap-common 3.0-7
ii systemtap-runtime 3.0-7
$ dpkg -l | grep linux-
ii linux-base 4.5
all Linux image base package
ii linux-compiler-gcc-6-x86 4.9.6-3
amd64 Compiler for Linux on x86 (meta-package)
ii linux-headers-4.9.0-1-amd64 4.9.6-3
amd64 Header files for Linux 4.9.0-1-amd64
ii linux-headers-4.9.0-1-common 4.9.6-3
all Common header files for Linux 4.9.0-1
ii linux-image-4.9.0-1-amd64 4.9.6-3
amd64 Linux 4.9 for 64-bit PCs (signed)
ii linux-image-4.9.0-1-amd64-dbgsym 4.9.6-3
amd64 Debug symbols for linux-image-4.9.0-1-amd64
ii linux-image-amd64 4.9+78
amd64 Linux for 64-bit PCs (meta-package)
ii linux-kbuild-4.9 4.9.6-3
amd64 Kbuild infrastructure for Linux 4.9
ii linux-libc-dev:amd64 4.9.6-3
amd64 Linux support headers for userspace development
ii util-linux-locales 2.29.1-1
all locales files for util-linux
$ dpkg -l | grep gcc
ii gcc 4:6.3.0-1
amd64 GNU C compiler
ii gcc-6 6.3.0-6
amd64 GNU C compiler
ii gcc-6-base:amd64 6.3.0-6
amd64 GCC, the GNU Compiler Collection (base package)
ii libgcc-6-dev:amd64 6.3.0-6
amd64 GCC support library (development files)
ii libgcc1:amd64 1:6.3.0-6
amd64 GCC support library
ii linux-compiler-gcc-6-x86 4.9.6-3
amd64 Compiler for Linux on x86 (meta-package)
# Output of: stap -v --vp 00020 -e 'probe vfs.read {printf("read performed\n");
exit()}'
#
Pass 1: parsed user script and 113 library scripts using
105244virt/38144res/6204shr/32136data kb, in 110usr/10sys/125real ms.
Pass 2: analyzed script: 1 probe, 1 function, 4 embeds, 0 globals using
246212virt/180548res/7572shr/173104data kb, in 1780usr/100sys/1878real ms.
Pass 3: translated to C into
"/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.c" using
246212virt/180736res/7760shr/173104data kb, in 0usr/0sys/6real ms.
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE
-uKCONFIG_CONFIG -uINSTALL_PATH
PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
make -C /lib/modules/4.9.0-1-amd64/build M=/tmp/staphL9QAU modules ARCH=x86_64
CONFIG_DEBUG_INFO= V=1 -j3
make: Entering directory '/usr/src/linux-headers-4.9.0-1-amd64'
make -C /usr/src/linux-headers-4.9.0-1-amd64
KBUILD_SRC=/usr/src/linux-headers-4.9.0-1-common \
-f /usr/src/linux-headers-4.9.0-1-common/Makefile modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
\
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are
missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix
it."; \
echo >&2 ; \
/bin/false)
mkdir -p /tmp/staphL9QAU/.tmp_versions ; rm -f /tmp/staphL9QAU/.tmp_versions/*
make -f /usr/src/linux-headers-4.9.0-1-common/scripts/Makefile.build
obj=/tmp/staphL9QAU
(cat /dev/null; echo
kernel//tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547.ko;) >
/tmp/staphL9QAU/modules.order
gcc-6
-Wp,-MD,/tmp/staphL9QAU/.stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.o.d
-nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include
-I/usr/src/linux-headers-4.9.0-1-common/arch/x86/include
-I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
-I/usr/src/linux-headers-4.9.0-1-common/include -I./include
-I/usr/src/linux-headers-4.9.0-1-common/arch/x86/include/uapi
-I/usr/src/linux-headers-4.9.0-1-common/include/uapi -I./include/generated/uapi
-include /usr/src/linux-headers-4.9.0-1-common/include/linux/kconfig.h
-I/usr/src/linux-headers-4.9.0-1-common//tmp/staphL9QAU -I/tmp/staphL9QAU
-D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387
-mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
-DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1
-DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1
-DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks
-Wno-frame-address -O2 --param=allow-store-data-races=0
-Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable
-Wno-unused-const-variable -fno-var-tracking-assignments -pg -mfentry
-DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types
-DCC_HAVE_ASM_GOTO
-I/usr/src/linux-headers-4.9.0-1-common/include2/asm/mach-default
-I/lib/modules/4.9.0-1-amd64/build -include
/tmp/staphL9QAU/stapconf_0763f53e6c686e80bdfa9e79a1380e9b_711.h
-freorder-blocks -fasynchronous-unwind-tables -Wframe-larger-than=512
-fno-ipa-icf -Wno-unused -Werror
-I/usr/src/linux-headers-4.9.0-1-common/"/usr/share/systemtap/runtime"
-DMODULE -DKBUILD_BASENAME='"stap_a31ee9d9da16ac912b90eb18969508b5_1547_src"'
-DKBUILD_MODNAME='"stap_a31ee9d9da16ac912b90eb18969508b5_1547"' -c -o
/tmp/staphL9QAU/.tmp_stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.o
/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.c
gcc-6
-Wp,-MD,/tmp/staphL9QAU/.stap_a31ee9d9da16ac912b90eb18969508b5_1547_aux_0.o.d
-nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include
-I/usr/src/linux-headers-4.9.0-1-common/arch/x86/include
-I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
-I/usr/src/linux-headers-4.9.0-1-common/include -I./include
-I/usr/src/linux-headers-4.9.0-1-common/arch/x86/include/uapi
-I/usr/src/linux-headers-4.9.0-1-common/include/uapi -I./include/generated/uapi
-include /usr/src/linux-headers-4.9.0-1-common/include/linux/kconfig.h
-I/usr/src/linux-headers-4.9.0-1-common//tmp/staphL9QAU -I/tmp/staphL9QAU
-D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387
-mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
-DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1
-DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1
-DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks
-Wno-frame-address -O2 --param=allow-store-data-races=0
-Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable
-Wno-unused-const-variable -fno-var-tracking-assignments -pg -mfentry
-DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types
-DCC_HAVE_ASM_GOTO
-I/usr/src/linux-headers-4.9.0-1-common/include2/asm/mach-default
-I/lib/modules/4.9.0-1-amd64/build -include
/tmp/staphL9QAU/stapconf_0763f53e6c686e80bdfa9e79a1380e9b_711.h
-freorder-blocks -fasynchronous-unwind-tables -Wframe-larger-than=512
-fno-ipa-icf -Wno-unused -Werror
-I/usr/src/linux-headers-4.9.0-1-common/"/usr/share/systemtap/runtime"
-DMODULE
-DKBUILD_BASENAME='"stap_a31ee9d9da16ac912b90eb18969508b5_1547_aux_0"'
-DKBUILD_MODNAME='"stap_a31ee9d9da16ac912b90eb18969508b5_1547"' -c -o
/tmp/staphL9QAU/.tmp_stap_a31ee9d9da16ac912b90eb18969508b5_1547_aux_0.o
/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_aux_0.c
/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.c:10:29: fatal
error: runtime_defines.h: No such file or directory
#include "runtime_defines.h"
^
compilation terminated.
/usr/src/linux-headers-4.9.0-1-common/scripts/Makefile.build:298: recipe for
target '/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.o' failed
make[3]: *** [/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_src.o]
Error 1
make[3]: *** Waiting for unfinished jobs....
if [ "-pg" = "-pg" ]; then if [
/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_aux_0.o !=
"scripts/mod/empty.o" ]; then ./scripts/recordmcount
"/tmp/staphL9QAU/stap_a31ee9d9da16ac912b90eb18969508b5_1547_aux_0.o"; fi; fi;
/usr/src/linux-headers-4.9.0-1-common/Makefile:1507: recipe for target
'_module_/tmp/staphL9QAU' failed
make[2]: *** [_module_/tmp/staphL9QAU] Error 2
Makefile:150: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/usr/src/linux-headers-4.9.0-1-amd64'
Spawn waitpid result (0x200): 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_a31ee9d9da16ac912b90eb18969508b5_1547.ko" in
9050usr/780sys/10530real ms.
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
Running rm -rf /tmp/staphL9QAU
Spawn waitpid result (0x0): 0
Removed temporary directory "/tmp/staphL9QAU"