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

tests: [ FAILED ] probe.kprobe_offset_fail_size #3040

Open
gkamathe opened this issue Mar 8, 2024 · 1 comment
Open

tests: [ FAILED ] probe.kprobe_offset_fail_size #3040

gkamathe opened this issue Mar 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gkamathe
Copy link
Contributor

gkamathe commented Mar 8, 2024

What reproduces the bug? Provide code if possible.

tests/runtime-tests.sh

or

$ sudo ./src/bpftrace  -e 'kprobe:vfs_read+1000000 { printf("SUCCESS %d\n", pid); exit(); }'

output

[  FAILED  ] probe.kprobe_offset_fail_size
	Command: /root/bpftrace/build/src/bpftrace  -e 'kprobe:vfs_read+1000000 { printf("SUCCESS %d\n", pid); exit(); }'
	Expected REGEX: Offset outside the function bounds \('vfs_read' size is*
	Found:
Attaching 1 probe...\ncannot attach kprobe, Invalid argument\nERROR: Error attaching probe: 'kprobe:vfs_read+1000000'\n



$ sudo ./src/bpftrace  -e 'kprobe:vfs_read+1000000 { printf("SUCCESS %d\n", pid); exit(); }'

Attaching 1 probe...
cannot attach kprobe, Invalid argument
ERROR: Error attaching probe: 'kprobe:vfs_read+1000000'
$ 

bpftrace --info output

$ sudo ./src/bpftrace --info
System
  OS: Linux 6.7.7-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Mar  1 16:51:49 UTC 2024
  Arch: x86_64

Build
  version: v0.20.0-62-g6a41
  LLVM: 16.0.6
  unsafe probe: no
  bfd: yes
  libdw (DWARF support): yes

Kernel helpers
  probe_read: yes
  probe_read_str: yes
  probe_read_user: yes
  probe_read_user_str: yes
  probe_read_kernel: yes
  probe_read_kernel_str: yes
  get_current_cgroup_id: yes
  send_signal: yes
  override_return: no
  get_boot_ns: yes
  dpath: yes
  skboutput: yes
  get_tai_ns: yes
  get_func_ip: yes
  jiffies64: yes

Kernel features
  Instruction limit: 1000000
  Loop support: yes
  btf: yes
  module btf: yes
  map batch: yes
  uprobe refcount (depends on Build:bcc bpf_attach_uprobe refcount): yes

Map types
  hash: yes
  percpu hash: yes
  array: yes
  percpu array: yes
  stack_trace: yes
  perf_event_array: yes
  ringbuf: yes

Probe types
  kprobe: yes
  tracepoint: yes
  perf_event: yes
  kfunc: yes
  kprobe_multi: yes
  uprobe_multi: no
  raw_tp_special: yes
  iter: yes

$
@gkamathe gkamathe added the bug Something isn't working label Mar 8, 2024
@viktormalik
Copy link
Contributor

Looks like the error message has changed. Could this be related to #2872 (even though this is x86)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants