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

zfsslower wrongly tries to attach to non-existant zpl_read (regression of #1248) #4952

Closed
seb314 opened this issue Mar 27, 2024 · 0 comments
Closed

Comments

@seb314
Copy link
Contributor

seb314 commented Mar 27, 2024

If zpl_read / zpl_write are not available, zfsslower fails to start with

cannot attach kprobe, probe entry may not exist
Traceback (most recent call last):
  File "/nix/store/3q9p3rp82vs05n7kgz6kj6fsy3ysis27-bcc-0.29.1/share/bcc/tools/.zfsslower-wrapped", line 275, in <module>
    b.attach_kprobe(event="zpl_read", fn_name="trace_rw_entry")
  File "/nix/store/3q9p3rp82vs05n7kgz6kj6fsy3ysis27-bcc-0.29.1/lib/python3.11/site-packages/bcc-0.29.1-py3.11.egg/bcc/__init__.py", line 855, in attach_kprobe
Exception: Failed to attach BPF program b'trace_rw_entry' to kprobe b'zpl_read', it's not traceable (either non-existing, inlined, or marked as "notrace")

I think this is a regression of #1248
The original fix #1324 assumed that BPF.get_kprobe_functions checks the given regex against any substring of the function name, but 2b203ea later changed get_kprobe_functions to do re.fullmatch instead.

I've run into this on a recent version of NixOS, and updating the regexes with a .* suffix appears to fix it. I'll create a PR with the fix.

seb314 pushed a commit to seb314/bcc that referenced this issue Mar 27, 2024
This fixes a regression of iovisor#1248: The original fix iovisor#1324 assumed that
BPF.get_kprobe_functions checks the given regex against any substring of
the function name, but 2b203ea later changed get_kprobe_functions to do
re.fullmatch instead.
@seb314 seb314 changed the title zfsslower fails, wrongliy trying to attach to non-existant zpl_read (regression of #1248) zfsslower wrongliy tries to attach to non-existant zpl_read (regression of #1248) Mar 27, 2024
@seb314 seb314 changed the title zfsslower wrongliy tries to attach to non-existant zpl_read (regression of #1248) zfsslower wrongly tries to attach to non-existant zpl_read (regression of #1248) Mar 27, 2024
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

1 participant