Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1741831

Summary: devtoolset-9-systemtap / aarch64 / rhel-alt-7.{5,6}: implicit declaration of function _stp_syscall_get_arguments()
Product: Red Hat Developer Toolset Reporter: Martin Cermak <mcermak>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: low Docs Contact:
Priority: low    
Version: DTS 9.0 RHEL 7CC: dsmith, fche, jwboyer, lberk, mcermak, mjw, mnewsome, ohudlick, qe-baseos-tools-bugs, tborcin, wcohen
Target Milestone: alphaKeywords: Triaged
Target Release: 9.0   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-9-systemtap-4.1-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1732173 Environment:
Last Closed: 2019-12-10 07:49:58 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:

Comment 1 Martin Cermak 2019-08-16 09:14:25 UTC
Nah, the problem here is different. RHEL7 doesn't have new enough kernel to suffer from bz1732173 directly.  This is devtoolset-9-systemtap-4.1-4.el7 running on top of aarch64 / rhel-alt-7.{5,6} kernels... The problem I see in fact is as follows:

=======
scr0 dts9   Pegas Server aarch64 # cat softirq.stp 
probe softirq.entry { println(">>> softirq") }
probe softirq.exit  { println("<<< softirq")}
probe timer.ms(5000) { exit() }
scr0 dts9   Pegas Server aarch64 # 
scr0 dts9   Pegas Server aarch64 #
scr0 dts9   Pegas Server aarch64 #
scr0 dts9   Pegas Server aarch64 # stap -vp4 softirq.stp
Pass 1: parsed user script and 458 library scripts using 205760virt/88960res/7168shr/79104data kb, in 590usr/40sys/615real ms.
Pass 2: analyzed script: 3 probes, 1 function, 0 embeds, 0 globals using 216576virt/101632res/8960shr/89920data kb, in 78450usr/5210sys/3009real ms.
Pass 3: translated to C into "/tmp/stapxc3SUs/stap_57009bb98fbdb2f1195b23b9091b47d8_1539_src.c" using 216576virt/101632res/8960shr/89920data kb, in 0usr/0sys/1real ms.
In file included from /opt/rh/devtoolset-9/root/usr/share/systemtap/runtime/linux/task_finder.c:17:0,
                 from /opt/rh/devtoolset-9/root/usr/share/systemtap/runtime/linux/runtime.h:227,
                 from /opt/rh/devtoolset-9/root/usr/share/systemtap/runtime/runtime.h:26,
                 from /tmp/stapxc3SUs/stap_57009bb98fbdb2f1195b23b9091b47d8_1539_src.c:26:
/opt/rh/devtoolset-9/root/usr/share/systemtap/runtime/linux/task_finder2.c: In function ‘__stp_utrace_task_finder_target_syscall_entry’:
/opt/rh/devtoolset-9/root/usr/share/systemtap/runtime/linux/task_finder2.c:1443:3: error: implicit declaration of function ‘_stp_syscall_get_arguments’ [-Werror=implicit-function-declaration]
   _stp_syscall_get_arguments(tsk, regs, 0, 2, args);
   ^
/tmp/stapxc3SUs/stap_57009bb98fbdb2f1195b23b9091b47d8_1539_src.c: At top level:
cc1: error: unrecognized command line option "-Wno-tautological-compare" [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [/tmp/stapxc3SUs/stap_57009bb98fbdb2f1195b23b9091b47d8_1539_src.o] Error 1
make: *** [_module_/tmp/stapxc3SUs] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_57009bb98fbdb2f1195b23b9091b47d8_1539.ko" in 12820usr/790sys/13111real ms.
Pass 4: compilation failed.  [man error::pass4]
(1) scr0 dts9   Pegas Server aarch64 #
=======

This is a devtoolset-8-systemtap --> devtoolset-9-systemtap regression, but probably unrelated to rhbz1732173 / stap upstream 7be7af0fda3633cd19e499617834cf4a5f51dd55

Comment 2 Frank Ch. Eigler 2019-08-20 15:14:15 UTC
I get the impression that something weird is happening with this machine's kernel compiler. The -Wno-tautological-compare flag is protected with runtime detection of compiler support, and the _stp_syscall_get_arguments function is defined for __arm__ in runtime/syscall.h.

Can this machine compile out-of-tree modules at all?  Can you run with "stap --vp 0005" or something like that, to get a look at the kbuild gcc invocation?

Comment 6 Frank Ch. Eigler 2019-09-27 19:11:23 UTC
Thanks, reproduced the error even with git master systemtap.

Comment 9 David Smith 2019-09-30 21:18:25 UTC
Note that this issue only affects rhel-alt kernels.

Comment 10 Frank Ch. Eigler 2019-10-02 14:52:08 UTC
upstream commit 385fcce5ec29

Comment 14 errata-xmlrpc 2019-12-10 07:49:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:4138