Bug 2126805 - stap is slow when "WARNING: missing unwind/symbol data for module" is present
Summary: stap is slow when "WARNING: missing unwind/symbol data for module" is present
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemtap
Version: 8.7
Hardware: x86_64
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
Jacob Taylor Valdez
URL:
Whiteboard:
: 2180328 (view as bug list)
Depends On: 2186932
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-14 12:57 UTC by Marek Havrila
Modified: 2023-08-02 09:12 UTC (History)
6 users (show)

Fixed In Version: systemtap-4.9-1.el8
Doc Type: Bug Fix
Doc Text:
.`systemtap` scripts using guru mode now compile more quickly The `systemtap` guru mode liveness analysis uses the `dyninst` library to parse binaries. Newer kernels enable mitigation code with `CONFIG_RETPOLINE=y`, replacing traditional RET instructions, with jumps to a thunk. As a consequence, binary analysis took a much longer time due to the liveness analysis needing to examine all additional edges of the control flow graph introduced by the jumps to the thunk. With this update, `systemtap` disables liveness analysis when the kernel code is using thunks and, as a result, `systemtap` scripts using guru mode compile more quickly.
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-133965 0 None None None 2022-09-14 13:28:36 UTC

Comment 5 William Cohen 2023-04-21 19:27:42 UTC
There is a workaround in systemtap that avoids this issue:

commit 71f89cccaf464c250c4497b7ec2a8e245b6704c4 (HEAD -> master, origin/master, origin/HEAD)
Author: Frank Ch. Eigler <fche>
Date:   Wed Apr 19 11:23:16 2023 -0400

    BZ2180328: disable pass-2 dyninst liveness analysis on CONFIG_RETPOLINE kernels
    
    As a stopgap measure, ameliorate the dramatic dyninst analysis time
    required to liveness-check $var assignments in kernels compiled with
    retpolines.  Just skip the effort (with a warning).
    
    See also: https://github.com/dyninst/dyninst/issues/1305 .


This should be fixed by the rebase of systemtap. The reproducer runs in a reasonable amount of time using a systemtap that includes that patch:


$ sudo time stap -v -g fork.stp -c "./ssh.exp bz1028643 bbb" -o fork.stp.log
Pass 1: parsed user script and 504 library scripts using 358256virt/153728res/16940shr/138804data kb, in 250usr/30sys/292real ms.
WARNING: liveness analysis skipped on CONFIG_RETPOLINE kernel /usr/lib/debug/lib/modules/4.18.0-486.el8.x86_64/vmlinux: identifier '$return' at fork.stp:23:9
 source:         $return = -1
                 ^
Pass 2: analyzed script: 1 probe, 2 functions, 0 embeds, 0 globals using 424420virt/221316res/18092shr/204968data kb, in 960usr/80sys/1039real ms.
Pass 3: using cached /root/.systemtap/cache/d0/stap_d0695e7c49ad338c333097e4c14796f6_1447.c
Pass 4: using cached /root/.systemtap/cache/d0/stap_d0695e7c49ad338c333097e4c14796f6_1447.ko
Pass 5: starting run.
spawn ssh -o ConnectTimeout=10 bz1028643@localhost pwd
Connection closed by ::1 port 22
Pass 5: run completed in 10usr/20sys/347real ms.
1.35user 0.15system 0:01.82elapsed 82%CPU (0avgtext+0avgdata 489836maxresident)k
0inputs+2776outputs (0major+58601minor)pagefaults 0swaps

Comment 7 William Cohen 2023-05-01 13:42:28 UTC
This should be addressed in systemtap-4.9-1.el8.

Comment 8 Martin Cermak 2023-05-11 12:12:59 UTC
*** Bug 2180328 has been marked as a duplicate of this bug. ***

Comment 17 William Cohen 2023-08-01 14:24:39 UTC
The doc text looks fine to me.


Note You need to log in before you can comment on or make changes to this bug.