Bug 196557
Summary: | ftrace=mmiotrace cause soft lockup | ||
---|---|---|---|
Product: | Tracing/Profiling | Reporter: | Ziqian SUN (Zamir) (sztsian) |
Component: | Ftrace | Assignee: | Steven Rostedt (rostedt) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | austindh.kim, rostedt, sztsian |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.11.11-300.fc26.x86_64 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Ziqian SUN (Zamir)
2017-08-01 12:46:33 UTC
mmiotrace does some crazy mappings to device drivers. It also requires that the system is running with only one CPU. I never thought about having it enabled via the command line. It is not something that can be easily enabled. Thus the fix for this bug is to document that it can not be enabled at start up. Even better, if it is in the command line, produce a warning that it's not a tracer that can be enabled via command line, and disable it. -- Steve Sometimes, I suffered softlock-up when configuring ftrace with function_graph tracer. As far as I checked, the sudden IRQ storms in the devices, ftrace ringbuffer cannot handle the message. But after I used the following command, I have not observed any softlockup or crashes later. << Command to configure ftracer >> "echo 0 > d/tracing/tracing_on" "sleep 1" "echo function_graph > d/tracing/current_tracer" "sleep 1" "echo > d/tracing/set_ftrace_filter" "sleep 1" adb shell "echo __fd_install lpm_cpuidle_enter > d/tracing/set_graph_function" "sleep 1" "echo 1 > d/tracing/tracing_on" "sleep 1" << Command to collect ftrace log >> "echo 0 > d/tracing/tracing_on" "cat d/tracing/trace_pipe > /data/trace.txt" BR, Guillermo Austin Kim (In reply to Steven Rostedt from comment #1) > Even better, if it is in > the command line, produce a warning that it's not a tracer that can be > enabled via command line, and disable it. I proposed a patch against 4.12.9. With that patch it now reports the following message and skip that tracer. [ 0.511289] Tracer 'mmiotrace' cannot be enabled during boot I will rebase it to master branch and send it out. As this is merged so I am closing this myself. Thanks for your help Steve! c7b3ae0bd2ca658c7a71c49901d08c590294fac9 tracing: Ignore mmiotrace from kernel commandline |