From: Namhyung Kim <namhyung@kernel.org>
To: bbhtt.zn0i8@slmail.me
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Perf is crashing inside Flatpak runtime
Date: Thu, 25 Jul 2024 18:24:31 -0700 [thread overview]
Message-ID: <ZqL6z5WwJKeFf9FW@google.com> (raw)
In-Reply-To: <a69b8aca-9b37-4a72-a657-f708696c192b@slmail.me>
Hello,
On Thu, Jul 25, 2024 at 07:07:09PM +0530, bbhtt wrote:
> Hello,
>
> We were reported by a user that perf is crashing inside the
> `org.freedesktop.Sdk` Flatpak runtime.
>
> To reproduce, please install Flatpak for your distribution [1] and
> then install the `org.freedesktop.Sdk` runtime using the command
> `flatpak install org.freedesktop.Sdk//23.08`. Then get a working shell
> inside the sandbox using
> `flatpak run --command=sh --devel org.freedesktop.Sdk//23.08`.
>
> Once inside the sandbox, run `perf record -v -- ls` and see that it
> crashes.
>
> The output and a backtrace is below. Any help is appreciated. The
> downstream issue can be found at [2].
Thanks for the report. I tried to reproduce it with v6.9.9 but my
system worked fine. Is there anything special on your system?
I guess you're running on x86..
Btw I'm not familiar with Flatpak, does it run on the host kernel?
>
> ```
> perf --version
> perf version 6.9.9
>
> perf record -v -- ls
> DEBUGINFOD_URLS=
> No PMU found for 'cycles:Pu'
> Failed to read max cpus, using default of 4096
Maybe this is the problem.
> nr_cblocks: 0
> affinity: SYS
> mmap flush: 1
> comp level: 0
> Problems creating module maps, continuing anyway...
> No PMU found for 'cycles:u'
> No PMU found for 'instructions:u'
> No PMU found for 'cpu-clock:u'
Hmm.. no PMUs? Is it running a guest kernel or is sysfs mounted
correctly?
Thanks,
Namhyung
> mmap size 528384B
> libperf: Miscounted nr_mmaps 0 vs 1
> Control descriptor is not initialized
> WARNING: No sample_id_all support, falling back to unordered processing
> Couldn't start the BPF side band thread:
> BPF programs starting from now on won't be annotatable
> perf: Segmentation fault
> Obtained 13 stack frames.
> perf(sighandler_dump_stack+0x48) [0x55fab63072a8]
> /usr/lib/x86_64-linux-gnu/libc.so.6(+0x3ee80) [0x7f2f4ac51e80]
> perf(perf_cpu_map__max+0x4) [0x55fab63f3104]
> perf(+0x1de854) [0x55fab635d854]
> perf(perf_event__synthesize_cpu_map+0x56) [0x55fab6360c76]
> perf(+0x854cf) [0x55fab62044cf]
> perf(+0x88e2c) [0x55fab6207e2c]
> perf(cmd_record+0xf95) [0x55fab620b155]
> perf(+0x12e8b1) [0x55fab62ad8b1]
> perf(main+0x687) [0x55fab61f30e7]
> /usr/lib/x86_64-linux-gnu/libc.so.6(+0x2808a) [0x7f2f4ac3b08a]
> /usr/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7f2f4ac3b14b]
> perf(_start+0x25) [0x55fab61f3425]
> Segmentation fault (core dumped)
> ```
>
> ```
> perf_cpu_map__max (map=0x0) at cpumap.c:382
> 382 return __perf_cpu_map__nr(map) > 0
> (gdb) bt
> #0 perf_cpu_map__max (map=0x0) at cpumap.c:382
> #1 0x0000555555732854 in cpu_map_data__alloc (syn_data=syn_data@entry=0x7fffffff7c80, header_size=header_size@entry=8) at util/synthetic-events.c:1289
> #2 0x0000555555735c76 in cpu_map_event__new (map=<optimized out>) at util/synthetic-events.c:1337
> #3 perf_event__synthesize_cpu_map (tool=tool@entry=0x555555eb4b80 <record>, map=<optimized out>,
> process=process@entry=0x5555555db480 <process_synthesized_event>, machine=machine@entry=0x0) at util/synthetic-events.c:1357
> #4 0x00005555555d94cf in record__synthesize (tail=tail@entry=false, rec=0x555555eb4b80 <record>) at builtin-record.c:2103
> #5 0x00005555555dce2c in __cmd_record (argc=argc@entry=1, argv=argv@entry=0x7fffffffd880, rec=0x555555eb4b80 <record>) at builtin-record.c:2536
> #6 0x00005555555e0155 in cmd_record (argc=<optimized out>, argv=<optimized out>) at builtin-record.c:4257
> #7 0x00005555556828b1 in run_builtin (p=p@entry=0x555555eb7728 <commands+264>, argc=argc@entry=4, argv=argv@entry=0x7fffffffd880) at perf.c:349
> #8 0x00005555555c80e7 in handle_internal_command (argv=<optimized out>, argc=4) at perf.c:402
> #9 run_argv (argv=<synthetic pointer>, argcp=<synthetic pointer>) at perf.c:446
> #10 main (argc=<optimized out>, argv=0x7fffffffd880) at perf.c:562
> ```
>
> [1]: https://flatpak.org/setup/
> [2]: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1739
>
> - bbhtt
>
> https://bbhtt.github.io/
>
next prev parent reply other threads:[~2024-07-26 1:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 13:37 Perf is crashing inside Flatpak runtime bbhtt
2024-07-26 1:24 ` Namhyung Kim [this message]
2024-07-26 2:13 ` bbhtt.zn0i8
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqL6z5WwJKeFf9FW@google.com \
--to=namhyung@kernel.org \
--cc=bbhtt.zn0i8@slmail.me \
--cc=linux-perf-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox