Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception:Failed to attach BPF program b'trace_req_done' to kprobe b'blk_account_io_done', it's not traceable (either non-existing, inlined, or marked as "notrace") #5124

Closed
zydmtaichi opened this issue Oct 25, 2024 · 4 comments

Comments

@zydmtaichi
Copy link

kernel version: 6.8.0-40-generic
system version: ubuntu 22.04
debug info:

cannot attach kprobe, Invalid argument
Traceback (most recent call last):
  File "/mnt/sdb/bcc/examples/tracing/bitehist.py", line 39, in <module>
    b.attach_kprobe(event="blk_account_io_done", fn_name="trace_req_done")
  File "/usr/lib/python3/dist-packages/bcc-0.31.0+0d5dcf40-py3.10.egg/bcc/__init__.py", line 881, in attach_kprobe
Exception: Failed to attach BPF program b'trace_req_done' to kprobe b'blk_account_io_done', it's not traceable (either non-existing, inlined, or marked as "notrace")

the kernel config is checked as below:

CONFIG_KPROBES=y
CONFIG_KPROBES_ON_FTRACE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_KPROBE_EVENTS=y
# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set
CONFIG_BPF_KPROBE_OVERRIDE=y
# CONFIG_KPROBE_EVENT_GEN_TEST is not set
# CONFIG_SAMPLE_KPROBES is not set

and the command grep blk_account_io_done /proc/kallsyms output as below:

ffffffff9a1c1890 t __pfx_blk_account_io_done
ffffffff9a1c18a0 t blk_account_io_done
@zydmtaichi
Copy link
Author

@chenhengqi

@we3i
Copy link
Contributor

we3i commented Feb 6, 2025

@zydmtaichi
blk_account_io_done has become an inline function even before __blk_account_io_done was moved from blk-core.c to blk-mq.c. Then, __blk_account_io_done has been taken off and its code was merged to blk_account_io_done not long ago, which means both functions are not traceable anymore.

@we3i
Copy link
Contributor

we3i commented Feb 10, 2025

The fix has been merged so please close this issue.

@zydmtaichi
Copy link
Author

The fix has been merged so please close this issue.

Hi @we3i , thanks a lot for fixing this failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants