| Summary: | perf report command hangs or crashes on arm targets | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] Kernel | Reporter: | Alexandra Safta <alexandra.safta> |
| Component: | kernel-tooling | Assignee: | Bruce Ashfield <bruce.ashfield> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | dvhart, sgw, tom.zanussi, yp.kernel.watcher, yp.watcher |
| Version: | 1.5.1 | ||
| Target Milestone: | Future | ||
| Hardware: | Other | ||
| OS: | arm | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
I've checked the perf code and noticed that the problem for the first segmentation fault is in the script_browse function (ui/browsers/scripts.c) where is no check for NULL script_opt. Alexandra, targeting for 1.5.2, but can you tell us if you observe the same behavior on master? Yes, the same behavior is on master. Tom, leaving assigned to Bruce, but if you have any thoughts here, please chime in. Sounds like just a standard userspace debugging effort, nothing special about it being perf. By default, you'll get the text-based TUI, which may be where the problem lies - you can try the stdio version by using the --stdio param to 'perf report', which may help narrow down the problem. I would say that reading and analyzing a perf .data file on an underpowered target system doesn't really make sense in general, you might want to try reading the same perf.data file on a host system with more memory, just something else to try. The problem isn't being seen on the new perf and kernel in the Yocto 1.6 release. Can we get confirmation that this isn't a problem with yocto 1.6 / master. Since this is built from the kernel tree, there are no plans to backport any changes to fix this in 1.5, but it would be nice to have a confirmation that this is indeed fixed. Assigned to person we are requesting info from per RP. Hi,
I've just retested on master. The behavior has changed, now an error appears:
- when choosing Run scripts for all samples:
/usr/libexec/perf-core/scripts/python/event_analyzing_sample.py
Traceback (most recent call last): ♦
File "/usr/libexec/perf-core/scripts/python/event_analyzing_sample.py", line ▒
import sqlite3 ▒
ImportError: No module named sqlite3 ▒
Error running python script /usr/libexec/perf-core/scripts/python/event_analyzi
- when choosing Switch to another data file ... and choosing any perf.data file:
┌Processing events...──────────────────────────────────────────────────────────┐
│ *** Error in `perf': free(): invalid next size (fast): 0x00475108 ***──────────────────────────────┘
Aborted
Response given by user. Someone else will need to look into this. I'll have no time in the 1.8 cycle to look into it. root@qemuarm:~# uname -a Linux qemuarm 4.4.3-yocto-standard #1 PREEMPT Wed Mar 23 13:30:10 EDT 2016 armv5tejl GNU/Linux % perf record -a -F 1000 sleep 5 % perf report All scripts can be executed, no segfaults. With the latest kernel, and perf python packaging fixes, this now works. Given that this is not something we can easily bisect, or backport, I'm closing this as "won't fixed", knowing that it will in fact be working for the 4.4 kernel on. |
Scenario: On an arm target (including qemuarm): Run : perf record ls Perf.data file is generated. perf report perf.data An interactive menu is open, when browsing through it we got the following choices: Run scripts for all samples Switch to another data file in PWD Exit when selecting: - Run scripts for all segment: the application crashes with the following message: "perf: Segmentation fault" - Switch to another data file ... and choosing any perf.data file makes the console freeze.