OpenNuvoton/NUC980-linux-4.4.y

ftrace function_graph 时崩溃

advx9600 opened this issue · 0 comments

1,用ftrace调试内核, 启动正常,echo function> /sys/kernel/debug/tracing/current_tracer 也正常
2,执行 echo function_graph > /sys/kernel/debug/tracing/current_tracer ,系统崩溃了
3,在内核中添加内核自测 FTRACE_STARTUP_TEST=y 系统也崩溃了

这是内核自测时的log,开启了设备树
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.4.289+ (nwz@nwz-System-Product-Name) (gcc version 4.8.4 (GCC) ) #815 PREEMPT Mon Oct 24 15:05:32 CST 2022
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine model: Nuvoton NUC980 IOT V1.0
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0 115200n8 mem=64M lpj=744448 ethaddr0=00:00:00:11:77:AB
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 56164K/65536K available (4454K kernel code, 378K rwdata, 1204K rodata, 2340K init, 215K bss, 9372K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc058ed94 (5660 kB)
[ 0.000000] .init : 0xc058f000 - 0xc07d8000 (2340 kB)
[ 0.000000] .data : 0xc07d8000 - 0xc0836a8c ( 379 kB)
[ 0.000000] .bss : 0xc0836a8c - 0xc086ca30 ( 216 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] Testing tracer nop: PASSED
[ 0.000000] NR_IRQS:545
[ 0.000000] clocksource: nuc980-timer5: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 62215505635 ns
[ 0.000033] sched_clock: 24 bits at 120kHz, resolution 8333ns, wraps every 69905062489ns
[ 0.000749] Console: colour dummy device 80x30
[ 0.188799] console [ttyS0] enabled
[ 0.192349] Calibrating delay loop (skipped) preset value.. 148.88 BogoMIPS (lpj=744448)
[ 0.200458] pid_max: default: 32768 minimum: 301
[ 0.205374] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.212058] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.221591] CPU: Testing write buffer coherency: ok
[ 0.227766] Setting up static identity map for 0x8400 - 0x8458
[ 0.239233] devtmpfs: initialized
[ 0.289566] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.300616] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.306808] Testing tracer function: PASSED
[ 0.443366] Testing ftrace regs(no arch support): PASSED
[ 0.448941] Testing tracer function_graph:
[ 0.454241] BUG: recent printk recursion!
[ 0.454274] Unable to handle kernel paging request at virtual address e5906000
[ 0.465599] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.472083] pgd = e5906000
[ 0.474783] Unable to handle kernel paging request at virtual address e5908000
[ 0.481966] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.488458] pgd = e5906000
[ 0.491158] Unable to handle kernel paging request at virtual address e5908000
[ 0.498349] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.504841] pgd = e5906000
[ 0.507541] Unable to handle kernel paging request at virtual address e5908000
[ 0.514724] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.521216] pgd = e5906000
[ 0.523916] Unable to handle kernel paging request at virtual address e5908000
[ 0.531108] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.537599] pgd = e5906000
[ 0.540299] Unable to handle kernel paging request at virtual address e5908000
[ 0.547491] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.553983] pgd = e5906000
[ 0.556674] Unable to handle kernel paging request at virtual address e5908000
[ 0.563866] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.570358] pgd = e5906000
[ 0.573058] Unable to handle kernel paging request at virtual address e5908000
[ 0.580249] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.586741] pgd = e5906000
[ 0.589441] Unable to handle kernel paging request at virtual address e5908000
[ 0.596624] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.603116] pgd = e5906000
[ 0.605816] Unable to handle kernel paging request at virtual address e5908000
[ 0.613008] Unhandled fault: alignment exception (0x001) at 0x800000b7
[ 0.619499] pgd = e5906000
[ 0.622199] Unable to handle kernel paging request at virtual address e5908000
** 1238 printk messages dropped ** [ 0.693683] r4:c387fd18
[ 0.693733] [] (prepare_ftrace_return) from [] (ftrace_graph_caller+0x14/0x1c)
[ 0.693799] r7:c387fd6c r6:c0096b40 r5:c04570a4 r4:c387fdc8
[ 0.693858] [] (printk) from [] (return_to_handler+0x0/0x18)
[ 0.693924] r3:c387fdcc r2:00000080 r1:c0523328 r0:c0523320
[ 0.693949] r4:c387fdc8
[ 0.694008] [] (ftrace_push_return_trace) from [] (prepare_ftrace_return+0x98/0xb0)
[ 0.694091] r10:c0096b40 r9:c04570a4 r8:c387fe7c r7:c387fdcc r6:c0096b40 r5:c04570a4
[ 0.694124] r4:c387fdc8
[ 0.694174] [] (prepare_ftrace_return) from [] (ftrace_graph_caller+0x14/0x1c)
[ 0.694241] r7:c387fe1c r6:c0096b40 r5:c04570a4 r4:c387fe78
[ 0.694299] [] (printk) from [] (return_to_handler+0x0/0x18)
[ 0.694366] r3:c387fe7c r2:00000080 r1:c0523328 r0:c0523320
[ 0.694391] r4:c387fe78
[ 0.694449] [] (ftrace_push_return_trace) from [] (prepare_ftrace_return+0x98/0xb0)
[ 0.694541] r10:c0096b40 r9:c04570a4 r8:c387ff2c r7:c387fe7c r6:c0096b40 r5:c04570a4
[ 0.694566] r4:c387fe78
[ 0.694616] [] (prepare_ftrace_return) from [] (ftrace_graph_caller+0x14/0x1c)
[ 0.694683] r7:c387fecc r6:c0096b40 r5:c04570a4 r4:c387ff28
[ 0.694741] [] (printk) from [] (return_to_handler+0x0/0x18)
[ 0.694808] r3:c387ff2c r2:00000080 r1:c0523328 r0:c0523320
[ 0.694841] r4:c387ff28
[ 0.694891] [] (ftrace_push_return_trace) from [] (prepare_ftrace_return+0x98/0xb0)
[ 0.694983] r10:c0014698 r9:c00091e8 r8:c3880064 r7:c387ff2c r6:c0096b40 r5:c04570a4
[ 0.695008] r4:c387ff28
[ 0.695058] [] (prepare_ftrace_return) from [] (ftrace_graph_caller+0x14/0x1c)
[ 0.695124] r7:c387ff7c r6:c0014698 r5:c00091e8 r4:c3880060
[ 0.695183] [] (printk) from [] (return_to_handler+0x0/0x18)
[ 0.695249] r3:c3880064 r2:00000080 r1:c0523328 r0:c0523320
[ 0.695283] r4:c3880060
[ 0.695333] [] (ftrace_push_return_trace) from [] (prepare_ftrace_return+0x98/0xb0)
[ 0.695424] r10:00000000 r9:c08377b8 r8:00000002 r7:c3880064 r6:c0014698 r5:c00091e8
[ 0.695449] r4:c3880060
[ 0.695499] [] (prepare_ftrace_return) from [] (ftrace_graph_caller+0x14/0x1c)
[ 0.695566] r7:c388009c r6:ffffffff r5:80000093 r4:c0015510