[PATCH] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
Mark Rutland
mark.rutland at arm.com
Thu Oct 28 07:04:38 PDT 2021
On Thu, Oct 28, 2021 at 02:45:42PM +0100, Mark Rutland wrote:
> Hi Will,
>
> Looks like there are a bunch of things that warrant a v2, so I'll go
> prepare that. It also seems there are some latent issue hit by the
> ftrace selftests, which I'm taking a look at now.
> I had a go with the selftests and there are some latent issues which show up on
> a pristine v5.15-rc4 (or v5.15-rc7), using defconfig + the ftrace selftest
> config fragment, including an OOM that could be a memory leak.
> Later the tests hang in:
>
> | [19] event tracing - enable/disable with subsystem level files
>
> ... and from trying:
>
> | # ./ftracetest -vvv test.d/event/subsystem-enable.tc
>
> ... it seems to hang after the usual reset, on the first part of the
> test, with the last output being:
>
> | + . /root/ftrace/test.d/event/subsystem-enable.tc
> | ++ echo 'sched:*'
> | ++ yield
> | ++ ping 127.0.0.1 -c 1
> | PING 127.0.0.1 (127.0.0.1): 56 data bytes
> | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=2.442 ms
> |
> | --- 127.0.0.1 ping statistics ---
> | 1 packets transmitted, 1 packets received, 0% packet loss
> | round-trip min/avg/max = 2.442/2.442/2.442 ms
> | +++ cat trace
> | +++ grep -v '^#'
> | +++ awk '{ print $5 }'
> | +++ sort -u
> | +++ wc -l
>
> I'll see if I can figure out what's actually blocking, and see if the
> remaining tests work.
Whoops; I forgot the OOM bits I mentioned above.
After ~30 mins of sitting here, I get the following:
| cat invoked oom-killer: gfp_mask=0x500cc2(GFP_HIGHUSER|__GFP_ACCOUNT), order=0, oom_score_adj=0
| CPU: 12 PID: 1999 Comm: cat Tainted: G W 5.15.0-rc7 #1
| Hardware name: linux,dummy-virt (DT)
| Call trace:
| dump_backtrace+0x0/0x1a4
| show_stack+0x24/0x30
| dump_stack_lvl+0x8c/0xb8
| dump_stack+0x1c/0x38
| dump_header+0x50/0x200
| oom_kill_process+0x208/0x210
| out_of_memory+0x21c/0x59c
| __alloc_pages+0xccc/0xdb4
| alloc_pages+0xb8/0x1a0
| pipe_write+0x298/0x700
| new_sync_write+0x17c/0x190
| vfs_write+0x224/0x290
| ksys_write+0xe8/0x100
| __arm64_sys_write+0x28/0x3c
| invoke_syscall+0x50/0x120
| el0_svc_common.constprop.0+0x104/0x124
| do_el0_svc+0x34/0x9c
| el0_svc+0x2c/0x90
| el0t_64_sync_handler+0xa8/0x12c
| el0t_64_sync+0x1a0/0x1a4
| Mem-Info:
| active_anon:18 inactive_anon:172307 isolated_anon:0
| active_file:0 inactive_file:0 isolated_file:0
| unevictable:0 dirty:0 writeback:1
| slab_reclaimable:6665 slab_unreclaimable:11051
| mapped:0 shmem:101 pagetables:645 bounce:0
| kernel_misc_reclaimable:0
| free:10800 free_pcp:0 free_cma:5198
| Node 0 active_anon:72kB inactive_anon:689228kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:4kB shmem:404kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 176128kB writeback_tmp:0kB kernel_stack:5108kB pagetables:2580kB all_unreclaimable? yes
| Node 0 DMA free:42512kB min:22528kB low:28160kB high:33792kB reserved_highatomic:0KB active_anon:72kB inactive_anon:689236kB active_file:0kB inactive_file:260kB unevictable:0kB writepending:0kB present:1048576kB managed:992188kB mlocked:0kB bounce:0kB free_pcp:132kB local_pcp:0kB free_cma:20792kB
| lowmem_reserve[]: 0 0 0 0
| Node 0 DMA: 419*4kB (UEC) 94*8kB (UMEC) 54*16kB (UMEC) 32*32kB (UMEC) 19*64kB (UEC) 12*128kB (UMEC) 6*256kB (UMC) 3*512kB (MC) 1*1024kB (C) 4*2048kB (UMEC) 6*4096kB (MC) = 43932kB
| Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
| Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB
| Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
| Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB
| 148 total pagecache pages
| 0 pages in swap cache
| Swap cache stats: add 0, delete 0, find 0/0
| Free swap = 0kB
| Total swap = 0kB
| 262144 pages RAM
| 0 pages HighMem/MovableOnly
| 14097 pages reserved
| 8192 pages cma reserved
| 0 pages hwpoisoned
| Tasks state (memory values in pages):
| [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
| [ 337] 0 337 17700 290 86016 0 -250 systemd-journal
| [ 364] 0 364 1787 139 53248 0 -1000 systemd-udevd
| [ 372] 1002 372 3803 101 45056 0 0 systemd-network
| [ 376] 1004 376 20106 91 57344 0 0 systemd-timesyn
| [ 378] 1003 378 1615 88 49152 0 0 systemd-resolve
| [ 394] 1000 394 1320 85 45056 0 -900 dbus-daemon
| [ 397] 0 397 984 132 45056 0 0 bash
| [ 406] 0 406 1690 113 53248 0 -1000 sshd
| [ 1899] 0 1899 988 161 49152 0 0 ftracetest
| [ 1981] 0 1981 988 160 45056 0 0 ftracetest
| [ 1982] 0 1982 692 11 40960 0 0 tee
| [ 1983] 0 1983 1047 248 49152 0 0 ftracetest
| [ 1998] 0 1998 1047 247 45056 0 0 ftracetest
| [ 1999] 0 1999 659 22 32768 0 0 cat
| [ 2000] 0 2000 692 56 40960 0 0 grep
| [ 2001] 0 2001 692 29 40960 0 0 awk
| [ 2002] 0 2002 171186 170542 1413120 0 0 sort
| [ 2003] 0 2003 692 12 40960 0 0 wc
| oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/system-serial\x2dgetty.slice/serial-getty at ttyAMA0.service,task=sort,pid=2002,uid=0
| Out of memory: Killed process 2002 (sort) total-vm:684744kB, anon-rss:682164kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:1380kB oom_score_adj:0
| oom_reaper: reaped process 2002 (sort), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Thanks,
Mark.
More information about the linux-arm-kernel
mailing list