Bug 214185 - RISC-V kernel self test test.d/ftrace/func_stack_tracer.tc fails
Summary: RISC-V kernel self test test.d/ftrace/func_stack_tracer.tc fails
Status: NEW
Alias: None
Product: Tracing/Profiling
Classification: Unclassified
Component: Ftrace (show other bugs)
Hardware: Other Linux
: P1 normal
Assignee: Steven Rostedt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-26 11:18 UTC by Colin Ian King
Modified: 2021-08-26 11:20 UTC (History)
0 users

See Also:
Kernel Version: 5.13+
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Colin Ian King 2021-08-26 11:18:31 UTC
While running some kernel selftests I discovered that the kernel ftrace
func_stack_tracer.tc fails.

How to reproduce:

in the 5.13 kernel source tree:

$ cd linux/tools/testing/selftests/ftrace
$ sudo ./ftracetest test.d/ftrace/func_stack_tracer.tc

[1] ftrace - Max stack tracer	[FAIL]


# of passed:  0
# of failed:  1
# of unresolved:  0
# of untested:  0
# of unsupported:  0
# of xfailed:  0
# of undefined(test bug):  0

... I've looked at this test and the following occurs:

0. go to the tracking directory:

cd /sys/kernel/debug/tracing

1. tracer is disabled:

echo 0 > /proc/sys/kernel/stack_tracer_enabled

2. tracer is set to track all kernel functions with *lock* in the name:

echo '*lock*' > stack_trace_filter

(this takes a few minutes to configure, it's quite slow).

one can see the functions filtered on by using cat stack_trace_filter

3. emabling the tracer:

echo 0 > stack_max_size
echo 1 > /proc/sys/kernel/stack_tracer_enabled

4. check if the tracer has found any functions that match:

cat stack_trace | grep lock

..none appear in position 0 in the stack_trace file. This works on other
arches such as arm64, amd64, s390x etc.. so I'm not sure why it's not
working on RISC-V.
Comment 1 Colin Ian King 2021-08-26 11:20:43 UTC
Tested in RISC-V SiFive Unmatched dev board and QEMU.

Note You need to log in before you can comment on or make changes to this bug.