Linux Perf Users
 help / color / mirror / Atom feed
* Perf is crashing inside Flatpak runtime
@ 2024-07-25 13:37 bbhtt
  2024-07-26  1:24 ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: bbhtt @ 2024-07-25 13:37 UTC (permalink / raw)
  To: linux-perf-users

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].

```
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
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'
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/


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

end of thread, other threads:[~2024-07-26  2:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 13:37 Perf is crashing inside Flatpak runtime bbhtt
2024-07-26  1:24 ` Namhyung Kim
2024-07-26  2:13   ` bbhtt.zn0i8

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox