Segfault in Panfrost with waypipe
I 'm encountering a reproducible segfault while using waypipe on a pinebook pro, with mesa at commit 8edaa843. The easiest way to reproduce seems to be by running the fd_mirror test, found here:
https://gitlab.freedesktop.org/mstoeckl/waypipe/-/blob/master/test/fd_mirror.c
However, the segfault seems to occur whenever a waypipe client on the pinebook attempts to run a program that uses mesa. For example, waypipe ssh $SERVER sway
always segfaults, even if the server and the client are the same.
Here's a stacktrace for each case:
#0 0x0000ffff93e7d9b8 renderonly_scanout_for_resource (panfrost_dri.so + 0x1989b8)
#1 0x0000ffff93f0a6bc u_transfer_helper_resource_create (panfrost_dri.so + 0x2256bc)
#2 0x0000ffff9468d88c dri2_create_image_common (panfrost_dri.so + 0x9a888c)
#3 0x0000ffff97d6596c gbm_dri_bo_create (libgbm.so.1 + 0x796c)
#4 0x0000aaaac0656218 n/a (/home/graham/.cache/yay/waypipe-git/src/build/test/fd_mirror + 0x5218)
#5 0x0000aaaac0656218 n/a (/home/graham/.cache/yay/waypipe-git/src/build/test/fd_mirror + 0x5218)
#6 0x0000aaaac0654ae8 n/a (/home/graham/.cache/yay/waypipe-git/src/build/test/fd_mirror + 0x3ae8)
#7 0x0000ffff9660c12c __libc_start_main (libc.so.6 + 0x2412c)
#0 0x0000ffffa0b269b8 renderonly_scanout_for_resource (panfrost_dri.so + 0x1989b8)
#1 0x0000ffffa0bb36bc u_transfer_helper_resource_create (panfrost_dri.so + 0x2256bc)
#2 0x0000ffffa133688c dri2_create_image_common (panfrost_dri.so + 0x9a888c)
#3 0x0000ffffa19e828c get_back_bo (libEGL_mesa.so.0 + 0x1128c)
#4 0x0000ffffa19e86d4 image_get_buffers (libEGL_mesa.so.0 + 0x116d4)
#5 0x0000ffffa1347374 dri_image_drawable_get_buffers (panfrost_dri.so + 0x9b9374)
#6 0x0000ffffa133fd74 dri_st_framebuffer_validate (panfrost_dri.so + 0x9b1d74)
#7 0x0000ffffa134c7ec st_framebuffer_validate (panfrost_dri.so + 0x9be7ec)
#8 0x0000ffffa134dd2c st_api_make_current (panfrost_dri.so + 0x9bfd2c)
#9 0x0000ffffa1344928 dri_make_current (panfrost_dri.so + 0x9b6928)
#10 0x0000ffffa0ecc9cc driBindContext (panfrost_dri.so + 0x53e9cc)
#11 0x0000ffffa19f7084 dri2_make_current (libEGL_mesa.so.0 + 0x20084)
#12 0x0000ffffa19fed54 eglMakeCurrent (libEGL_mesa.so.0 + 0x27d54)
#13 0x0000ffffa1ed36b8 n/a (libEGL.so.1 + 0x36b8)
#14 0x0000ffffa27b62bc wlr_egl_make_current (libwlroots.so.5 + 0x262bc)
#15 0x0000ffffa27cb4f4 wlr_wl_output_create (libwlroots.so.5 + 0x3b4f4)
#16 0x0000ffffa27c9d38 n/a (libwlroots.so.5 + 0x39d38)
#17 0x0000ffffa27c8b68 n/a (libwlroots.so.5 + 0x38b68)
#18 0x0000aaaae323a35c n/a (sway + 0x1d35c)
#19 0x0000aaaae322d7d0 n/a (sway + 0x107d0)
#20 0x0000ffffa259b12c __libc_start_main (libc.so.6 + 0x2412c)
#21 0x0000aaaae322da5c n/a (sway + 0x10a5c)
#22 0x0000aaaae322da5c n/a (sway + 0x10a5c)
Some earlier discussion of the problem with waypipe's developer can be found here:
I've attached my glxinfo below, but if you need anything else, please just let me know! This is my first mesa issue, so I hope I'm including everything you need.