linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] perf trace: failed to load -E2BIG
@ 2024-12-06  0:14 Namhyung Kim
       [not found] ` <CA+JHD90D86YC=Kn3P_B1xLamxKS9+_zOxmKxXMWyTDQGwGnNsQ@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Namhyung Kim @ 2024-12-06  0:14 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Howard Chu; +Cc: linux-perf-users

Hello,

I'm seeing the following error in the current perf-tools[-next].
Do you see you the same?

  $ sudo ./perf trace -a sleep 1
  libbpf: prog 'sys_enter': BPF program load failed: -E2BIG
  libbpf: prog 'sys_enter': -- BEGIN PROG LOAD LOG --
  0: R1=ctx() R10=fp0
  ; int sys_enter(struct syscall_enter_args *args) @ augmented_raw_syscalls.bpf.c:527
  0: (bf) r7 = r1                       ; R1=ctx() R7_w=ctx()
  ; return bpf_get_current_pid_tgid(); @ augmented_raw_syscalls.bpf.c:423
  1: (85) call bpf_get_current_pid_tgid#14      ; R0_w=scalar()
  2: (63) *(u32 *)(r10 -4) = r0         ; R0_w=scalar() R10=fp0 fp-8=mmmm????
  3: (bf) r2 = r10                      ; R2_w=fp0 R10=fp0
  ;  @ augmented_raw_syscalls.bpf.c:0
  4: (07) r2 += -4                      ; R2_w=fp-4
  ; return bpf_map_lookup_elem(pids, &pid) != NULL; @ augmented_raw_syscalls.bpf.c:428
  ...
  140: (79) r7 = *(u64 *)(r10 -48)      ; R7_w=ctx() R10=fp0 fp-48=ctx()
  141: (79) r0 = *(u64 *)(r10 -56)
  BPF program is too large. Processed 1000001 insn
  processed 1000001 insns (limit 1000000) max_states_per_insn 28 total_states 37670 peak_states 330 mark_read 16
  -- END PROG LOAD LOG --
  libbpf: prog 'sys_enter': failed to load: -E2BIG
  libbpf: failed to load object 'augmented_raw_syscalls_bpf'
  libbpf: failed to load BPF skeleton 'augmented_raw_syscalls_bpf': -E2BIG
  libbpf: map '__augmented_syscalls__': can't use BPF map without FD (was it created?)
  libbpf: map '__augmented_syscalls__': can't use BPF map without FD (was it created?)
  libbpf: map '__augmented_syscalls__': can't use BPF map without FD (was it created?)
  libbpf: map '__augmented_syscalls__': can't use BPF map without FD (was it created?)
  Not enough memory to run!

The git bisect found this but I couldn't find anything suspicious.

395d38419f1853decab84acc16176b3fa5c96690 is the first bad commit
commit 395d38419f1853decab84acc16176b3fa5c96690
Author: Howard Chu <howardchu95@gmail.com>
Date:   Thu Oct 10 19:14:02 2024 -0700

    perf trace augmented_raw_syscalls: Add more checks to pass the verifier
    
    Add some more checks to pass the verifier in more kernels.
    
    Signed-off-by: Howard Chu <howardchu95@gmail.com>
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alan Maguire <alan.maguire@oracle.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20241011021403.4089793-3-howardchu95@gmail.com
    [ Reduced the patch removing things that can be done later ]
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

 .../perf/util/bpf_skel/augmented_raw_syscalls.bpf.c  | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
bisect found first bad commit

Thanks,
Namhyung


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-10 20:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06  0:14 [BUG] perf trace: failed to load -E2BIG Namhyung Kim
     [not found] ` <CA+JHD90D86YC=Kn3P_B1xLamxKS9+_zOxmKxXMWyTDQGwGnNsQ@mail.gmail.com>
2024-12-06  0:49   ` Namhyung Kim
2024-12-06  3:25     ` Qiao Zhao
2024-12-06 18:36       ` Howard Chu
2024-12-06 19:03         ` Howard Chu
2024-12-06 20:23           ` Namhyung Kim
2024-12-10 19:02             ` Arnaldo Carvalho de Melo
2024-12-10 20:24               ` Howard Chu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).