Bug 231903

Summary: FC5 systemtap causes compilation errors with 2.6.19 kernel
Product: [Fedora] Fedora Reporter: Sitsofe Wheeler <sitsofe>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED CURRENTRELEASE QA Contact: Radek Bíba <rbiba>
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 0.5.12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-12 22:02:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sitsofe Wheeler 2007-03-12 21:34:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20061201 Firefox/2.0.0.2 (Ubuntu-feisty)

Description of problem:
Attempting to run systemtap with a 2.6.19-1.2288.fc5 kernel results Pass 4 compilation consistently failing.

Version-Release number of selected component (if applicable):
systemtap-0.5.10-1.fc5

How reproducible:
Always


Steps to Reproduce:
1. Install systemtap .
2. Install 
kernel-2.6.19-1.2288.fc5
kernel-2.6.19-1.2288.2.4.fc5
kernel-devel-2.6.19-1.2288.fc5
kernel-debug-2.6.19-1.2288.fc5
3. Attempt to run:
stap -vve 'probe begin { log("hello world") exit () }'

Actual Results:
Pass 1: parsed user script and 53 library script(s) in 220usr/20sys/254real ms.
Pass 2: analyzed script: 1 probe(s), 2 function(s), 0 global(s) in 0usr/0sys/4real ms.
probe_1448 locks nothing
Running grep " [AtT] " /proc/kallsyms | sort -k 1,16 -s -o /tmp/stapceFNgl/symbols.sorted
Pass 3: translated to C into "/tmp/stapceFNgl/stap_31962.c" in 80usr/70sys/794real ms.
Running make -C "/lib/modules/2.6.19-1.2288.fc5/build" M="/tmp/stapceFNgl" modules V=1
make: Entering directory `/usr/src/kernels/2.6.19-1.2288.fc5-x86_64'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
echo;                                                           \
echo "  ERROR: Kernel configuration is invalid.";               \
echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \
echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo;                                                           \
/bin/false)
mkdir -p /tmp/stapceFNgl/.tmp_versions
rm -f /tmp/stapceFNgl/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/stapceFNgl
  gcc -Wp,-MD,/tmp/stapceFNgl/.stap_31962.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -Os  -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fstack-protector -fomit-frame-pointer -fasynchronous-unwind-tables -g  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -freorder-blocks -Wno-unused -Werror -I"/usr/share/systemtap/runtime"   -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_31962)"  -D"KBUILD_MODNAME=KBUILD_STR(stap_31962)" -c -o /tmp/stapceFNgl/.tmp_stap_31962.o /tmp/stapceFNgl/stap_31962.c
In file included from /usr/share/systemtap/runtime/runtime.h:79,
                 from /tmp/stapceFNgl/stap_31962.c:31:
/usr/share/systemtap/runtime/alloc.c:66: error: expected declaration specifiers or '...' before '(' token
/usr/share/systemtap/runtime/alloc.c: In function 'percpu_free':
/usr/share/systemtap/runtime/alloc.c:67: error: number of arguments doesn't match prototype
include/linux/percpu.h:51: error: prototype declaration
/usr/share/systemtap/runtime/alloc.c:69: error: 'objp' undeclared (first use in this function)
/usr/share/systemtap/runtime/alloc.c:69: error: (Each undeclared identifier is reported only once
/usr/share/systemtap/runtime/alloc.c:69: error: for each function it appears in.)
make[1]: *** [/tmp/stapceFNgl/stap_31962.o] Error 1
make: *** [_module_/tmp/stapceFNgl] Error 2
make: Leaving directory `/usr/src/kernels/2.6.19-1.2288.fc5-x86_64'
Pass 4: compiled C into "stap_31962.ko" in 800usr/260sys/1779real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapceFNgl


Expected Results:
Pass 1: parsed user script and 54 library script(s) in 390usr/40sys/1262real ms.
Pass 2: analyzed script: 1 probe(s), 2 function(s), 0 embed(s), 0 global(s) in 10usr/0sys/14real ms.
probe_1493 locks nothing
Pass 3: translated to C into "/tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.c" in 0usr/0sys/1real ms.
Running make -C "/lib/modules/2.6.19-1.2288.fc5/build" M="/tmp/stapZyQg03" modules V=1
make: Entering directory `/usr/src/kernels/2.6.19-1.2288.fc5-x86_64'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
echo;                                                           \
echo "  ERROR: Kernel configuration is invalid.";               \
echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \
echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo;                                                           \
/bin/false)
mkdir -p /tmp/stapZyQg03/.tmp_versions
rm -f /tmp/stapZyQg03/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/stapZyQg03
  gcc -Wp,-MD,/tmp/stapZyQg03/.stap_35cd7305311702f3dd7752694b7d5bdf_333.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -Os  -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fstack-protector -fomit-frame-pointer -fasynchronous-unwind-tables -g  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -freorder-blocks -Wno-unused -Werror -I"/usr/share/systemtap/runtime"   -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_35cd7305311702f3dd7752694b7d5bdf_333)"  -D"KBUILD_MODNAME=KBUILD_STR(stap_35cd7305311702f3dd7752694b7d5bdf_333)" -c -o /tmp/stapZyQg03/.tmp_stap_35cd7305311702f3dd7752694b7d5bdf_333.o /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.c
  Building modules, stage 2.
make -f /usr/src/kernels/2.6.19-1.2288.fc5-x86_64/scripts/Makefile.modpost
  scripts/mod/modpost -m -a -i /usr/src/kernels/2.6.19-1.2288.fc5-x86_64/Module.symvers -I /tmp/stapZyQg03/Module.symvers -o /tmp/stapZyQg03/Module.symvers -w  /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.o
  gcc -Wp,-MD,/tmp/stapZyQg03/.stap_35cd7305311702f3dd7752694b7d5bdf_333.mod.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -Os  -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fstack-protector -fomit-frame-pointer -fasynchronous-unwind-tables -g  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_35cd7305311702f3dd7752694b7d5bdf_333.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(stap_35cd7305311702f3dd7752694b7d5bdf_333)" -DMODULE -c -o /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.mod.o /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.mod.c
  ld -m elf_x86_64 -r -o /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.ko /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.o /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.mod.o
make: Leaving directory `/usr/src/kernels/2.6.19-1.2288.fc5-x86_64'
Pass 4: compiled C into "stap_35cd7305311702f3dd7752694b7d5bdf_333.ko" in 2080usr/420sys/3468real ms.
Copying /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.ko to /root/.systemtap/cache/35/stap_35cd7305311702f3dd7752694b7d5bdf_333.ko
Copying /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.c to /root/.systemtap/cache/35/stap_35cd7305311702f3dd7752694b7d5bdf_333.c
Pass 5: starting run.
Running sudo /usr/bin/staprun -u root -d 32219 /tmp/stapZyQg03/stap_35cd7305311702f3dd7752694b7d5bdf_333.ko
hello world
Pass 5: run completed in 30usr/110sys/242real ms.
Running rm -rf /tmp/stapZyQg03


Additional info:
Using a snapshot tarball (ftp://sources.redhat.com/pub/systemtap/snapshots/systemtap-20070310.tar.bz2 ) and altering the spec file to pick up the man8 directory produces the expected result.

Comment 1 Frank Ch. Eigler 2007-03-12 22:02:57 UTC
This problem was dealt with in a later version of systemtap.  Try rebuilding the
0.5.12 from .src.rpm, as found in the FC6 updates.  We have not planned to issue
an FC5 refresh.