GPU Hang on Adreno GPU 640 (Snapdragon 855) with Chromium and Falkon Running Certain WebGL Demos (KGSL)
System information
- Device: OnePlus 7 Pro
- Selinux State: Permissive
- CPU: Qualcomm Snapdragon 855
- OS: Android 13 LineageOS
- Linux Chroot: Debian GNU/Linux 12 (bookworm)
- GPU: Adreno (TM) 640
- Kernel version: Linux localhost 4.14.180-perf+ #1 (closed) SMP PREEMPT Wed Feb 7 03:07:02 UTC 2024 aarch64 GNU/Linux
- Mesa version: 24.0.6 (tried different versions, ranging from 23.X to 24.0.6)
- Xserver: Termux X11 (Latest Version)
Describe the issue
Running Chromium or Falkon with certain WebGL demos like, https://webglsamples.org/city/city.html on a device with an Adreno 640 GPU results in an immediate application exit with a GPU hang. This triggers the following error:
Chromium:
chromium: ../src/freedreno/vulkan/tu_knl_kgsl.cc:534: VkResult kgsl_syncobj_wait(tu_device*, kgsl_syncobj*, uint64_t): Assertion `errno == ETIME' failed.
[8588:8588:0522/070257.431690:ERROR:gpu_process_host.cc(999)] GPU process exited unexpectedly: exit_code=6
Falkon:
falkon: ../src/freedreno/vulkan/tu_knl_kgsl.cc:535: VkResult kgsl_syncobj_wait(tu_device*, kgsl_syncobj*, uint64_t): Assertion `errno == ETIME' failed. Aborted
Dmesg output shows a GPU hang:
[ +1.697791] (0)[0:swapper/0]kgsl kgsl-3d0: |adreno_hang_int_callback| MISC: GPU hang detected
[ +0.000275] (1)[294:kgsl_worker_thr][20240522_09:05:52.424175]@1 kgsl kgsl-3d0: chromium[9009]: gpu fault ctx 7 ctx_type ANY ts 374 status 00E505E5 rb 183d/183d ib1 000000050494C000/00a0 ib2 0000000504958E48/0000
[ +0.000032] (1)[294:kgsl_worker_thr][20240522_09:05:52.424211]@1 kgsl kgsl-3d0: chromium[9009]: gpu fault rb 2 rb sw r/w 183d/183d
[ +0.001355] (1)[294:kgsl_worker_thr][20240522_09:05:52.425564]@1 platform 2c6a000.qcom,gmu: Suspended GMU
[ +0.010178] (3)[294:kgsl_worker_thr][20240522_09:05:52.435742]@3 kgsl kgsl-3d0: chromium[9009]: gpu skipcmd ctx 7 ts 375 policy 80
Steps to Reproduce
- Use a device with an Adreno 640 GPU (Snapdragon 855).
- Open Chromium or Falkon browser.
- Navigate to the specific WebGL demo (https://webglsamples.org/city/city.html).
- The browser crashes immediately.
Log files as attachment
- Output of
dmesg
: dmesg.txt - Output of
strace -e trace=ioctl
: strace_output.txt
Any extra information would be greatly appreciated
A quick debugging of the relevant code part reveals that during the wait_timestamp_safe
function call, the ioctl operation returns an EPROTO
error. Therefore, the assertion `errno == ETIME' fails.
Unfortunately, I am unable to debug this issue further and would require assistance from someone with more expertise in Mesa or the KGSL driver.