glmark2 segfualt and kernel pannic
ning@kvim1:~$ glmark2 -s 400x300 -b build
=======================================================
glmark2 2017.07
=======================================================
OpenGL Information
GL_VENDOR: lima
GL_RENDERER: Mali450
GL_VERSION: 2.1 Mesa 19.3.0-devel (git-e3f54cb0c1)
=======================================================
[build] <default>: FPS: 518 FrameTime: 1.931 ms
=======================================================
glmark2 Score: 518
=======================================================
above is glmark2 on S905X.
if not running in size 400x300, glmark2 will segfault with below kernel log:
ning@kvim1:~$ glmark2 -b build
=======================================================
glmark2 2017.07
=======================================================
OpenGL Information
GL_VENDOR: lima
GL_RENDERER: Mali450
GL_VERSION: 2.1 Mesa 19.3.0-devel (git-e3f54cb0c1)
=======================================================
[build] <default>: segfault
[ 240.993567] alloc_contig_range: [6e600, 6e7db) PFNs busy
[ 240.993880] alloc_contig_range: [6e700, 6e8db) PFNs busy
[ 240.994124] alloc_contig_range: [6e800, 6e9db) PFNs busy
[ 245.556771] glmark2: page allocation failure: order:0, mode:0x4(GFP_DMA32), nodemask=(null),cpuset=/,mems_allowed=0
[ 245.556801] CPU: 1 PID: 3134 Comm: glmark2 Tainted: G C 5.3.0-rc3-meson64 #5.93.1
[ 245.556803] Hardware name: Khadas VIM (DT)
[ 245.556808] Call trace:
[ 245.556828] dump_backtrace+0x0/0x150
[ 245.556834] show_stack+0x14/0x20
[ 245.556843] dump_stack+0xa8/0xcc
[ 245.556852] warn_alloc+0x110/0x1a0
[ 245.556856] __alloc_pages_nodemask+0xaac/0xb70
[ 245.556864] shmem_alloc_page+0x7c/0xa0
[ 245.556869] shmem_alloc_and_acct_page+0x10c/0x1d8
[ 245.556874] shmem_getpage_gfp.isra.6+0x124/0x838
[ 245.556879] shmem_read_mapping_page_gfp+0x54/0x98
[ 245.557066] drm_gem_get_pages+0xe0/0x218 [drm]
[ 245.557086] lima_bo_create+0x164/0x210 [lima]
[ 245.557093] lima_gem_create_handle+0x34/0x88 [lima]
[ 245.557100] lima_ioctl_gem_create+0x34/0x48 [lima]
[ 245.557186] drm_ioctl_kernel+0x94/0x110 [drm]
[ 245.557248] drm_ioctl+0x1b8/0x408 [drm]
[ 245.557257] do_vfs_ioctl+0xb8/0x8f8
[ 245.557261] ksys_ioctl+0x80/0xb8
[ 245.557264] __arm64_sys_ioctl+0x1c/0x28
[ 245.557274] el0_svc_common.constprop.0+0x64/0x160
[ 245.557278] el0_svc_handler+0x20/0x78
[ 245.557283] el0_svc+0x8/0xc
[ 245.557287] Mem-Info:
[ 245.557300] active_anon:51788 inactive_anon:13136 isolated_anon:0
active_file:27662 inactive_file:44260 isolated_file:0
unevictable:265780 dirty:26 writeback:0 unstable:0
slab_reclaimable:7840 slab_unreclaimable:14427
mapped:35596 shmem:270355 pagetables:1415 bounce:0
free:61675 free_pcp:708 free_cma:52739
[ 245.557309] Node 0 active_anon:207152kB inactive_anon:52544kB active_file:110648kB inactive_file:177040kB unevictable:1063120kB isolated(anon):0kB isolated(file):0kB mapped:142384kB dirty:104kB writeback:0kB shmem:1081420kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 59392kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[ 245.557320] DMA32 free:247204kB min:36864kB low:42496kB high:48128kB active_anon:207152kB inactive_anon:52580kB active_file:110764kB inactive_file:176996kB unevictable:1062564kB writepending:104kB present:2075648kB managed:2019384kB mlocked:0kB kernel_stack:4320kB pagetables:5660kB bounce:0kB free_pcp:2848kB local_pcp:248kB free_cma:210956kB
[ 245.557322] lowmem_reserve[]: 0 0 0
[ 245.557328] DMA32: 465*4kB (UMEC) 127*8kB (UMEC) 327*16kB (UMEC) 255*32kB (MEC) 125*64kB (MEC) 49*128kB (MEC) 17*256kB (UMC) 5*512kB (M) 1*1024kB (C) 2*2048kB (C) 50*4096kB (C) = 247372kB
[ 245.557355] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[ 245.557359] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=32768kB
[ 245.557363] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[ 245.557366] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB
[ 245.557368] 342256 total pagecache pages
[ 245.557378] 0 pages in swap cache
[ 245.557381] Swap cache stats: add 24, delete 24, find 0/0
[ 245.557383] Free swap = 1009176kB
[ 245.557385] Total swap = 1009688kB
[ 245.557388] 518912 pages RAM
[ 245.557390] 0 pages HighMem/MovableOnly
[ 245.557392] 14066 pages reserved
[ 245.557394] 65536 pages cma reserved
[ 245.579411] lima d00c0000.gpu: mmu page fault at 0x239c7c0 from bus id 0 of type read on ppmmu1
[ 245.579424] lima d00c0000.gpu: mmu page fault at 0x2399ec0 from bus id 0 of type read on ppmmu0
[ 245.579431] lima d00c0000.gpu: mmu page fault at 0x2397b40 from bus id 0 of type read on ppmmu2
[ 245.579463] lima d00c0000.gpu: pp task error 0 int_state=0 status=1
[ 245.579468] lima d00c0000.gpu: pp task error 1 int_state=0 status=1
[ 245.579474] lima d00c0000.gpu: pp task error 2 int_state=0 status=1
[ 245.579479] lima d00c0000.gpu: mmu resume
if run full glmark2 test with size 400x300, get kernel panic:
ning@kvim1:~$ glmark2 -s 400x300
=======================================================
glmark2 2017.07
=======================================================
OpenGL Information
GL_VENDOR: lima
GL_RENDERER: Mali450
GL_VERSION: 2.1 Mesa 19.3.0-devel (git-e3f54cb0c1)
=======================================================
[build] use-vbo=false: FPS: 287 FrameTime: 3.484 ms
[build] use-vbo=true:[ 52.828062] Unable to handle kernel read from unreadable memory at virtual address ffff80007ef686fc
[ 52.831459] Mem abort info:
[ 52.834217] ESR = 0x8600000f
[ 52.837236] Exception class = IABT (current EL), IL = 32 bits
[ 52.843097] SET = 0, FnV = 0
[ 52.846116] EA = 0, S1PTW = 0
[ 52.849223] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000008eb5000
[ 52.855863] [ffff80007ef686fc] pgd=000000007fff9003, pud=000000007fe07003, pmd=000000007fc0f003, pte=00e800007ef68713
[ 52.866387] Internal error: Oops: 8600000f [#1] PREEMPT SMP
[ 52.871906] Modules linked in: rfcomm overlay fuse bnep lz4hc lz4hc_compress snd_soc_hdmi_codec dw_hdmi_i2s_audio dw_hdmi_cec btsdio brcmfmac brcmutil cfg80211 snd_soc_meson_aiu_spdif snd_soc_meson_aiu_i2s snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_pcm_dmaengine snd_pcm meson_dw_hdmi snd_timer snd meson_drm soundcore dw_hdmi lima gpu_sched hci_uart ir_nec_decoder btbcm meson_vdec(C) drm_kms_helper btintel amlogic_crypto v4l2_mem2mem videobuf2_dma_contig drm videobuf2_memops crypto_engine videobuf2_v4l2 bluetooth videobuf2_common rc_geekbox videodev drm_panel_orientation_quirks mc meson_rng meson_canvas rng_core meson_ir rc_core pwm_meson ecdh_generic ecc ao_cec rfkill cec meson_gxbb_wdt snd_soc_meson_audio_core scpi_hwmon leds_pwm zram ip_tables x_tables
[ 52.939961] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G WC 5.3.0-rc3-meson64 #5.93.1
[ 52.948581] Hardware name: Khadas VIM (DT)
[ 52.952636] pstate: 00000085 (nzcv daIf -PAN -UAO)
[ 52.957382] pc : 0xffff80007ef686fc
[ 52.960829] lr : 0xffff80007ef686fc
[ 52.964278] sp : ffff000010003b50
[ 52.967556] x29: 0000000000000000 x28: 0000000000000060
[ 52.972817] x27: ffff000010db8a68 x26: ffff000010f626c8
[ 52.978078] x25: ffff000010b44d38 x24: ffff000010f59000
[ 52.983339] x23: ffff000010f34000 x22: ffff800060594000
[ 52.988601] x21: ffff800060588d40 x20: ffff80007fbb2700
[ 52.993862] x19: 0000000000000080 x18: 0000000000000000
[ 52.999123] x17: 0000000000000000 x16: 0000000000000000
[ 53.004384] x15: 0000000000000000 x14: 0000000000000000
[ 53.009646] x13: 0000000000000000 x12: 0000000000000000
[ 53.014907] x11: 0000000000000000 x10: 0000000000000920
[ 53.020168] x9 : ffff000010003b30 x8 : ffff000010f62ac0
[ 53.025429] x7 : 0000000000005425 x6 : 0000000004964869
[ 53.030691] x5 : 0000000000000000 x4 : 0000000000000000
[ 53.035952] x3 : 0000000000000000 x2 : 000080006ec44000
[ 53.041213] x1 : ffff000010f62140 x0 : ffff800060588d40
[ 53.046475] Call trace:
[ 53.048892] 0xffff80007ef686fc
[ 53.052000] Code: 00000000 00000000 00000000 00000000 (00000000)
[ 53.058039] ---[ end trace 6b910bd0af073a10 ]---
[ 53.062606] Kernel panic - not syncing: Attempted to kill the idle task!
[ 53.069246] SMP: stopping secondary CPUs
[ 54.114796] SMP: failed to stop secondary CPUs 0,2
[ 54.114814] Kernel Offset: disabled
[ 54.117390] CPU features: 0x0002,20002004
[ 54.121356] Memory Limit: none
[ 54.124379] Rebooting in 10 seconds..
[ 64.367958] SMP: stopping secondary CPUs
[ 65.409640] SMP: failed to stop secondary CPUs 0,2
you can't finish glmark2 test with smaller size.
Edited by zhangn1985