anholt / linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vc4: Lock up while using kms (stock raspbian stretch)

Ealdwulf opened this issue · comments

Was raspberrypi#2327, moved here at @popcornmix suggestion.

Steps to reproduce from stock raspbian (maybe not all necessary) :

  • Install 2017-11-29-raspbian-stretch.zip
  • Switch to full kms (using raspi-config)
  • change gpu mem to 256 (ditto)
  • enable ssh
  • connect to wifi
  • ssh in
  • export DISPLAY=:0
  • xrandr --output HDMI-1 --mode 1280x1024
  • wget https://github.com/KanoComputing/kano-video-files/raw/master/videos/minecraft.mp4
  • sudo apt-get install mpv
  • mpv --fs minecraft.mp4 --keepaspect=no

If it doesn't immediatley lock up, switching back and forth between modes and playing a video each time seems to do so pretty quickly

  • xrandr --output HDMI-1 --mode 1920x1080
  • mpv --fs minecraft.mp4 --keepaspect=no
  • xrandr --output HDMI-1 --mode 1280x1024
  • mpv --fs minecraft.mp4 --keepaspect=no

I'm not sure kms is the culprit - the whole pi locks up so it's not obvious what crashed - but since kms is experimental it seems a good bet. I've also mentioned it here: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=200556&p=1249434#p1249434,
where I also attached Xorg.0.log, in case that helps.

I can't see which Raspberry Pi is affected. Any helpful output on the debug UART before the hang?

Sorry for the long delay. Here is a log:

pi@raspberrypi:~$ [   55.201732] Unable to handle kernel NULL pointer dereference at virtual address 00000088
[   55.209955] pgd = 80004000
[   55.212693] [00000088] *pgd=00000000
[   55.216321] Internal error: Oops: 17 [#1] SMP ARM
[   55.221086] Modules linked in: fuse rfcomm cmac bnep hci_uart btbcm bluetooth sg panel_raspberrypi_touchscreen vc4 brcmfmac brcmutil drm_kms_helper cfg80211 drm snd_soc_core rfkill snd_compress snd_pcm_dmaengine syscopyarea sysfillrect snd_bcm2835 sysimgblt fb_sys_fops snd_pcm snd_timer snd i2c_gpio i2c_algo_bit i2c_bcm2835 bcm2835_gpiomem uio_pdrv_genirq fixed uio evdev joydev i2c_dev ip_tables x_tables ipv6
[   55.257964] CPU: 0 PID: 37 Comm: kworker/0:1 Not tainted 4.9.59-v7+ #1047
[   55.264843] Hardware name: BCM2835
[   55.268332] Workqueue: events vc4_overflow_mem_work [vc4]
[   55.273806] task: af25e740 task.stack: af2e2000
[   55.278422] PC is at vc4_overflow_mem_work+0x80/0x120 [vc4]
[   55.284075] LR is at _raw_spin_lock_irqsave+0x24/0x68
[   55.289194] pc : [<7f4ab760>]    lr : [<8071a1bc>]    psr: 60000093
[   55.289194] sp : af2e3ec0  ip : af2e3ea8  fp : af2e3edc
[   55.300835] r10: 00000000  r9 : 00000008  r8 : 00000000
[   55.306131] r7 : 9e3c04e0  r6 : 00000000  r5 : 00000001  r4 : 9e3c0518
[   55.312747] r3 : 00000002  r2 : 00000002  r1 : 20000013  r0 : 00080000
[   55.319365] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   55.326687] Control: 10c5383d  Table: 0fcf806a  DAC: 00000055
[   55.332511] Process kworker/0:1 (pid: 37, stack limit = 0xaf2e2210)
[   55.338864] Stack: (0xaf2e3ec0 to 0xaf2e4000)
[   55.343282] 3ec0: af2c5200 9e3c0518 af8794c0 af87cd00 af2e3f14 af2e3ee0 80136720 7f4ab6ec
[   55.351575] 3ee0: af8794d8 80c02d00 00000008 af8794c0 af2c5218 af8794c0 af8794d8 80c02d00
[   55.359869] 3f00: 00000008 af2c5200 af2e3f5c af2e3f18 80136a80 801365d4 af2e3f3c af2e2000
[   55.368162] 3f20: 80c02d00 af2c5200 80c722f7 af2e2018 00000000 00000000 af2b2800 af2c5200
[   55.376456] 3f40: 80136a1c 00000000 00000000 00000000 af2e3fac af2e3f60 8013c958 80136a28
[   55.384749] 3f60: 2ed09000 00000000 aaaaaaaa af2c5200 00000000 00000000 af2e3f78 af2e3f78
[   55.393042] 3f80: 00000000 00000000 af2e3f88 af2e3f88 af2b2800 8013c84c 00000000 00000000
[   55.401335] 3fa0: 00000000 af2e3fb0 80108148 8013c858 00000000 00000000 00000000 00000000
[   55.409627] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   55.417920] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 aaaaaaaa aaaaaaaa
[   55.426268] [<7f4ab760>] (vc4_overflow_mem_work [vc4]) from [<80136720>] (process_one_work+0x158/0x454)
[   55.435801] [<80136720>] (process_one_work) from [<80136a80>] (worker_thread+0x64/0x568)
[   55.444010] [<80136a80>] (worker_thread) from [<8013c958>] (kthread+0x10c/0x124)
[   55.451513] [<8013c958>] (kthread) from [<80108148>] (ret_from_fork+0x14/0x2c)
[   55.458838] Code: e1a03513 e5043004 f57ff04e e514000c (e5962088) 
[   55.465017] ---[ end trace 1f01e210e45fecb8 ]---
[   55.470282] Unable to handle kernel paging request at virtual address ffffffec
[   55.477633] pgd = 80004000
[   55.477644] [ffffffec] *pgd=2ff7e861, *pte=00000000, *ppte=00000000
[   55.477652] Internal error: Oops: 37 [#2] SMP ARM
[   55.477717] Modules linked in: fuse rfcomm cmac bnep hci_uart btbcm bluetooth sg panel_raspberrypi_touchscreen vc4 brcmfmac brcmutil drm_kms_helper cfg80211 drm snd_soc_core rfkill snd_compress snd_pcm_dmaengine syscopyarea sysfillrect snd_bcm2835 sysimgblt fb_sys_fops snd_pcm snd_timer snd i2c_gpio i2c_algo_bit i2c_bcm2835 bcm2835_gpiomem uio_pdrv_genirq fixed uio evdev joydev i2c_dev ip_tables x_tables ipv6
[   55.477723] CPU: 0 PID: 37 Comm: kworker/0:1 Tainted: G      D         4.9.59-v7+ #1047
[   55.477725] Hardware name: BCM2835
[   55.477734] task: af25e740 task.stack: af2e2000
[   55.477746] PC is at kthread_data+0x18/0x20
[   55.477754] LR is at wq_worker_sleeping+0x18/0xd8
[   55.477758] pc : [<8013d564>]    lr : [<801379d4>]    psr: 20000093
[   55.477758] sp : af2e3bf0  ip : af2e3c00  fp : af2e3bfc
[   55.477760] r10: 80b7e940  r9 : 00000000  r8 : 80c0442c
[   55.477763] r7 : 80b7e940  r6 : af25eb68  r5 : af25e740  r4 : af879940
[   55.477767] r3 : 00000000  r2 : 00000000  r1 : af25e740  r0 : af25e740
[   55.477771] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   55.477774] Control: 10c5383d  Table: 0fcf806a  DAC: 00000055
[   55.477776] Process kworker/0:1 (pid: 37, stack limit = 0xaf2e2210)
[   55.477780] Stack: (0xaf2e3bf0 to 0xaf2e4000)
[   55.477785] 3be0:                                     af2e3c0c af2e3c00 801379d4 8013d558
[   55.477790] 3c00: af2e3c74 af2e3c10 8071588c 801379c8 60000013 00000001 00000001 af0d0000
[   55.477795] 3c20: af2e3c4c af2e3c30 2ecfb000 8025f520 00000000 80149714 af879940 9a0a56cc
[   55.477800] 3c40: af2e3c6c af2e3c50 80430928 af25e740 af2e38d4 af2e3c90 af25eae0 00000001
[   55.477805] 3c60: 00000001 af0d0000 af2e3c84 af2e3c78 80149714 8071537c af2e3cc4 af2e3c88
[   55.477810] 3c80: 80121788 80149688 00000006 80c7b2c4 af2e3c90 af2e3c90 0000000b 80c7b2c4
[   55.477817] 3ca0: 60000193 80c08998 0000000b 7f4ab764 00000001 7f4ab762 af2e3d4c af2e3cc8
[   55.477822] 3cc0: 8010c2b0 80121040 af2e2210 0000000b 00000000 8094e25c 00000008 7f000000
[   55.477827] 3ce0: 00000000 80c08998 651720fc 33306131 20333135 34303565 34303033 37356620
[   55.477834] 3d00: 34306666 35652065 30303431 28206330 36393565 38383032 80002029 80209fa8
[   55.477839] 3d20: 8094fb50 00000088 00000017 af2e3e70 00000000 00000000 af2e2000 00000000
[   55.477844] 3d40: af2e3d64 af2e3d50 80118eb4 8010c068 af2e3e70 00000088 af2e3dbc af2e3d68
[   55.477849] 3d60: 8071b088 80118e4c 80134138 7f4ab868 0000072d deadbeef 9e202000 00000000
[   55.477855] 3d80: af2e3dac af2e3d90 af2e3da4 af2e3d98 8010e94c 80c093fc 00000017 8071ae38
[   55.477860] 3da0: 00000088 af2e3e70 af2e2000 00000000 af2e3e6c af2e3dc0 801011e8 8071ae44
[   55.477867] 3dc0: af03de40 8014e674 af25e7c0 af879978 0003bacb 8014e6e0 af25e7c0 af879978
[   55.477872] 3de0: af2e3e24 af2e3df0 8014e6e0 8014fd24 af2e3e24 af2e3e00 8014fd24 8014fa84
[   55.477877] 3e00: af17ac00 af25e7c0 af879978 80c03180 80b7e940 80c0442c af2e3e94 af2e3e28
[   55.477882] 3e20: 8015aba4 8014fc88 80197b14 805da890 ffffffff 9e3c04e0 60000013 60000013
[   55.477887] 3e40: 9e3c04e0 7f4ab760 60000093 7f4ab760 60000093 ffffffff af2e3ea4 00000000
[   55.477892] 3e60: af2e3edc af2e3e70 8071a634 801011ac 00080000 20000013 00000002 00000002
[   55.477897] 3e80: 9e3c0518 00000001 00000000 9e3c04e0 00000000 00000008 00000000 af2e3edc
[   55.477904] 3ea0: af2e3ea8 af2e3ec0 8071a1bc 7f4ab760 60000093 ffffffff 7f4ab718 00000000
[   55.477910] 3ec0: af2c5200 9e3c0518 af8794c0 af87cd00 af2e3f14 af2e3ee0 80136720 7f4ab6ec
[   55.477915] 3ee0: af8794d8 80c02d00 00000008 af8794c0 af2c5218 af8794c0 af8794d8 80c02d00
[   55.477921] 3f00: 00000008 af2c5200 af2e3f5c af2e3f18 80136a80 801365d4 af2e3f3c af2e2000
[   55.477926] 3f20: 80c02d00 af2c5200 80c722f7 af2e2018 00000000 00000000 af2b2800 af2c5200
[   55.477931] 3f40: 80136a1c 00000000 00000000 00000000 af2e3fac af2e3f60 8013c958 80136a28
[   55.477936] 3f60: 2ed09000 00000000 aaaaaaaa af2c5200 00000000 00000000 af2e3f78 af2e3f78
[   55.477942] 3f80: 00000001 00010001 af2e3f88 af2e3f88 af2b2800 8013c84c 00000000 00000000
[   55.477947] 3fa0: 00000000 af2e3fb0 80108148 8013c858 00000000 00000000 00000000 00000000
[   55.477951] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   55.477956] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 aaaaaaaa aaaaaaaa
[   55.477971] [<8013d564>] (kthread_data) from [<801379d4>] (wq_worker_sleeping+0x18/0xd8)
[   55.477985] [<801379d4>] (wq_worker_sleeping) from [<8071588c>] (__schedule+0x51c/0x7bc)
[   55.477997] [<8071588c>] (__schedule) from [<80149714>] (do_task_dead+0x98/0x9c)
[   55.478007] [<80149714>] (do_task_dead) from [<80121788>] (do_exit+0x754/0xaec)
[   55.478017] [<80121788>] (do_exit) from [<8010c2b0>] (die+0x254/0x440)
[   55.478026] [<8010c2b0>] (die) from [<80118eb4>] (__do_kernel_fault.part.0+0x74/0x1f4)
[   55.478034] [<80118eb4>] (__do_kernel_fault.part.0) from [<8071b088>] (do_page_fault+0x250/0x3bc)
[   55.478044] [<8071b088>] (do_page_fault) from [<801011e8>] (do_DataAbort+0x48/0xc4)
[   55.478050] [<801011e8>] (do_DataAbort) from [<8071a634>] (__dabt_svc+0x54/0x80)
[   55.478052] Exception stack(0xaf2e3e70 to 0xaf2e3eb8)
[   55.478056] 3e60:                                     00080000 20000013 00000002 00000002
[   55.478061] 3e80: 9e3c0518 00000001 00000000 9e3c04e0 00000000 00000008 00000000 af2e3edc
[   55.478065] 3ea0: af2e3ea8 af2e3ec0 8071a1bc 7f4ab760 60000093 ffffffff
[   55.478124] [<8071a634>] (__dabt_svc) from [<7f4ab760>] (vc4_overflow_mem_work+0x80/0x120 [vc4])
[   55.478158] [<7f4ab760>] (vc4_overflow_mem_work [vc4]) from [<80136720>] (process_one_work+0x158/0x454)
[   55.478167] [<80136720>] (process_one_work) from [<80136a80>] (worker_thread+0x64/0x568)

It is a pi3:

Hardware        : BCM2835
Revision        : a22082
Serial          : 000000006d9b13e2

Oh, that just looks like you're missing:

commit e9273b08d4fb808baeebcd2637b5257d3f0db18c
Author: Stefan Schake <stschake@gmail.com>
Date:   Fri Dec 29 17:05:43 2017 +0100

    drm/vc4: Move IRQ enable to PM path
    
    
    [ Upstream commit ce9caf2f79a5aa170a4b6456a03db639eed9c988 ]


commit 08bb42086b3e9c5619e6e82aed576eae8a6583ef
Author: Stefan Schake <stschake@gmail.com>
Date:   Fri Nov 10 02:05:06 2017 +0100

    drm/vc4: Account for interrupts in flight
    
    
    [ Upstream commit 253696ccd613fbdaa5aba1de44c461a058e0a114 ]

Please update your kernel.