[Bug 1224403] New: bpftrace: ERROR: Error attaching probe: 'kprobe:swap_readpage'
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Bug ID: 1224403 Summary: bpftrace: ERROR: Error attaching probe: 'kprobe:swap_readpage' Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: screening-team-bugs@suse.de Reporter: petr.vorel@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- bpftrace fails to attach probe: # echo -e "\ninterval:s:5 { exit(); }" | cat /usr/share/bpftrace/tools/swapin.bt - | bpftrace - stdin:1-16: WARNING: swap_readpage is not traceable (either non-existing, inlined, or marked as "notrace"); attaching to it will likely fail Attaching 3 probes... cannot attach kprobe, probe entry may not exist ERROR: Error attaching probe: 'kprobe:swap_readpage' # echo $? 255 It has been failing for some time (at least since 20240412, but probably much longer). -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |shung-hsi.yu@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Petr Cervinka <pcervinka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pcervinka@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 https://bugzilla.suse.com/show_bug.cgi?id=1224403#c1 Anthony Iliopoulos <ailiopoulos@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ailiopoulos@suse.com --- Comment #1 from Anthony Iliopoulos <ailiopoulos@suse.com> --- That's due to upstream kernel commit commit c9bdf768dd93 ("mm: convert swap_readpage() to swap_read_folio()"), merged in v6.8-rc1. The swapin.bt probe needs to be changed accordingly from kprobe:swap_readpage to kprobe:swap_read_folio. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Avinesh Kumar <avinesh.kumar@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |avinesh.kumar@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 https://bugzilla.suse.com/show_bug.cgi?id=1224403#c2 --- Comment #2 from Anthony Iliopoulos <ailiopoulos@suse.com> --- (In reply to Anthony Iliopoulos from comment #1)
That's due to upstream kernel commit commit c9bdf768dd93 ("mm: convert swap_readpage() to swap_read_folio()"), merged in v6.8-rc1.
The swapin.bt probe needs to be changed accordingly from kprobe:swap_readpage to kprobe:swap_read_folio.
This was fixed upstream in bpftrace via commit 19c829cbf85b ("tools/swapin: Support swap_read_folio() (#3209)"), which was released in v0.21.0. Factory bpftrace is still on v0.20.4 though, so I am leaving the bug open in case Shung-Hsi wants to update it (or backport the fix). -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 https://bugzilla.suse.com/show_bug.cgi?id=1224403#c3 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(shung-hsi.yu@suse | |.com) CC| |shung-hsi.yu@suse.com Status|NEW |CONFIRMED --- Comment #3 from Petr Vorel <petr.vorel@suse.com> --- (In reply to Anthony Iliopoulos from comment #2)
This was fixed upstream in bpftrace via commit 19c829cbf85b ("tools/swapin: Support swap_read_folio() (#3209)"), which was released in v0.21.0.
Factory bpftrace is still on v0.20.4 though, so I am leaving the bug open in case Shung-Hsi wants to update it (or backport the fix).
@Shung-Hsi ^ -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 https://bugzilla.suse.com/show_bug.cgi?id=1224403#c4 --- Comment #4 from Petr Vorel <petr.vorel@suse.com> --- bpftrace 0.21.2 was just accepted yesterday in factory [1]. Latest Tumbleweed still contains this version, the error changed [2] Retrieving: bpftrace-0.21.2-1.1.x86_64.rpm [.done] ... # echo -e "\ninterval:s:5 { exit(); }" | cat /usr/share/bpftrace/tools/bashreadline.bt - | bpftrace - Attaching 3 probes... ERROR: Could not resolve symbol: /bin/bash:readline, cannot attach probe. echo $? 255 Kernel is the same as on the previous one: 6.11.5-1-default. What could be wrong now? There is no new commit in release/0.21.x branch [3], I suppose the problem is unknown or Tumbleweed specific. I suppose fix is not in master branch [4] either. [1] https://build.opensuse.org/request/show/1218766 [2] https://openqa.opensuse.org/tests/4601181/file/serial_terminal.txt [3] https://github.com/bpftrace/bpftrace/commits/release/0.21.x/ [4] https://github.com/bpftrace/bpftrace/commits/master/ -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 https://bugzilla.suse.com/show_bug.cgi?id=1224403#c5 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Petr Vorel <petr.vorel@suse.com> --- I reported new problem in a separate bug: https://bugzilla.suse.com/show_bug.cgi?id=1232536 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.suse.com/s | |how_bug.cgi?id=1232536 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 https://bugzilla.suse.com/show_bug.cgi?id=1224403#c6 --- Comment #6 from Anthony Iliopoulos <ailiopoulos@suse.com> --- Petr, you cannot really rely on the bpftrace-tools scripts in general, as many of them aren't really actively maintained. This has nothing to do with the kernel or TW (I suppose we may want to remove bpftrace-tools but sometimes they serve as a starting point/templates). The specific example of bashreadline.bt hasn't been updated for 6 years upstream: $ git log -1 tools/bashreadline.bt commit 97fd5c4e93fc2cc2a748f169936b53cc0481c918 Author: Krzesimir Nowak <krzesimir@kinvolk.io> Date: Fri Oct 19 12:37:58 2018 +0200 Use env to find bpftrace I assume that the bpftrace syntax has changed somewhat across this time. So: $ bpftrace --version bpftrace v0.20.4 $ bpftrace -e 'ur:/lib64/libreadline.so.8:readline /comm=="bash"/ { time("%H:%M:%S "); printf("%-6d %s\n", pid, str(retval)); }' Attaching 1 probe... -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugzilla.suse.com/s | |how_bug.cgi?id=1232536 | -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|bpftrace: ERROR: Error |ERROR: Could not resolve |attaching probe: |symbol: /bin/bash:readline, |'kprobe:swap_readpage' |cannot attach probe -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224403 Petr Vorel <petr.vorel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ERROR: Could not resolve |bpftrace: ERROR: Error |symbol: /bin/bash:readline, |attaching probe: |cannot attach probe |'kprobe:swap_readpage' -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com