[Regression] weston-simple-egl crashes since 1b4e877d with software egl on virtual hardware
I am compiling Mesa with meson setup -Ddebug=true -Doptimization=0 --prefix=$INSTALLDIR --libdir=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) $ARCHARGS -Dgles1=enabled -Dgles2=enabled -Dplatforms=x11,wayland -Dosmesa=true -Dgallium-xa=enabled -Dgbm=enabled -Dshared-glapi=enabled -Dllvm=enabled -Dshared-llvm=enabled -Dvulkan-drivers=intel,intel_hasvk,amd,swrast,virtio,nouveau-experimental -Dllvm=enabled build -Dglvnd=true
on QEMU with virtio and vga, it seems that there is a recent change that is making certain programs crash including weston-simple-egl
Trying the commit 7ac0dbd7 and software egl works but 1b4e877d introduces a segfault
This is the stack trace
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {93824992421232}}
ret = <optimized out>
#1 0x00007ffff7d47d9f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
No locals.
#2 0x00007ffff7cf8f32 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007ffff7ce3472 in __GI_abort () at ./stdlib/abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {2313, 93824992329216, 18, 7, 93824999383456, 51539607552, 0, 140737488342856, 17496252568905126656, 5, 18446744073709551488, 12, 140737348865464, 2313, 140737348866047, 93824992421232}}, sa_flags = -137011809, sa_restorer = 0x7ffff7e5447c <_nl_C_name>}
#4 0x00007ffff7ce3395 in __assert_fail_base (fmt=0x7ffff7e57a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff7af8fff "!\"assumption failed\"", file=file@entry=0x7ffff7af8db8 "../src/egl/drivers/dri2/platform_wayland.c", line=line@entry=2313, function=function@entry=0x7ffff7af9240 <__PRETTY_FUNCTION__.5> "dri2_wl_swrast_get_stride_for_format") at ./assert/assert.c:92
str = 0x55555556be00 "\213\352<"
total = 4096
#5 0x00007ffff7cf1e32 in __GI___assert_fail (assertion=assertion@entry=0x7ffff7af8fff "!\"assumption failed\"", file=file@entry=0x7ffff7af8db8 "../src/egl/drivers/dri2/platform_wayland.c", line=line@entry=2313, function=function@entry=0x7ffff7af9240 <__PRETTY_FUNCTION__.5> "dri2_wl_swrast_get_stride_for_format") at ./assert/assert.c:101
No locals.
#6 0x00007ffff7aea266 in dri2_wl_swrast_get_stride_for_format (format=<optimized out>, w=<optimized out>) at ../src/egl/drivers/dri2/platform_wayland.c:2313
visual_idx = <optimized out>
__PRETTY_FUNCTION__ = "dri2_wl_swrast_get_stride_for_format"
#7 dri2_wl_swrast_get_stride_for_format (format=<optimized out>, w=<optimized out>) at ../src/egl/drivers/dri2/platform_wayland.c:2309
visual_idx = -1
__PRETTY_FUNCTION__ = "dri2_wl_swrast_get_stride_for_format"
#8 0x00007ffff7aea4d5 in dri2_wl_swrast_allocate_buffer (buffer=0x55555556cd18, size=0x55555556cd40, data=0x55555556cd38, h=250, w=250, format=875713089, dri2_surf=0x55555556ca60) at ../src/egl/drivers/dri2/platform_wayland.c:2329
pool = <optimized out>
fd = <optimized out>
size_map = <optimized out>
dri2_dpy = 0x555555582570
stride = <optimized out>
data_map = <optimized out>
dri2_dpy = <optimized out>
pool = <optimized out>
fd = <optimized out>
stride = <optimized out>
size_map = <optimized out>
data_map = <optimized out>
#9 swrast_update_buffers (dri2_surf=dri2_surf@entry=0x55555556ca60) at ../src/egl/drivers/dri2/platform_wayland.c:2404
i = 0
dri2_dpy = 0x555555582570
zink = false
#10 0x00007ffff7aea70a in dri2_wl_swrast_get_drawable_info (draw=<optimized out>, x=0x7fffffffd0c8, y=0x7fffffffd0cc, w=0x55555556d138, h=0x55555556d13c, loaderPrivate=0x55555556ca60) at ../src/egl/drivers/dri2/platform_wayland.c:2522
dri2_surf = 0x55555556ca60
#11 0x00007ffff574404d in drisw_update_drawable_info (drawable=<optimized out>) at ../src/gallium/frontends/dri/drisw.c:148
x = -137009678
y = 32767
#12 0x00007ffff57480ce in dri_st_framebuffer_validate (st=<optimized out>, pdrawable=0x55555556cf60, statts=0x55555556d680, count=1, out=0x7fffffffd1b0, resolve=0x7fffffffd178) at ../src/gallium/frontends/dri/dri_drawable.c:77
ctx = 0x5555555f8a90
drawable = 0x55555556cf60
screen = 0x5555555f3210
statt_mask = 2
new_mask = 2
new_stamp = <optimized out>
i = <optimized out>
lastStamp = 0
textures = 0x55555556d0a8
pscreen = <optimized out>
#13 0x00007ffff57d627f in st_framebuffer_validate (stfb=0x55555556d220, st=st@entry=0x5555575a8d60) at ../src/mesa/state_tracker/st_manager.c:239
textures = {0x0, 0x20, 0x0, 0x0, 0x0, 0x0}
resolve = 0x0
width = <optimized out>
height = <optimized out>
i = <optimized out>
changed = false
new_stamp = 1
__PRETTY_FUNCTION__ = "st_framebuffer_validate"
#14 0x00007ffff57d6950 in st_api_make_current (st=0x5555575a8d60, stdrawi=stdrawi@entry=0x55555556cf60, streadi=streadi@entry=0x55555556cf60) at ../src/mesa/state_tracker/st_manager.c:1151
stdraw = 0x55555556d220
stread = 0x55555556d220
ret = <optimized out>
#15 0x00007ffff5747dec in dri_make_current (ctx=0x5555555f8a90, draw=0x55555556cf60, read=0x55555556cf60) at ../src/gallium/frontends/dri/dri_context.c:350
__PRETTY_FUNCTION__ = "dri_make_current"
#16 0x00007ffff574ac8a in driBindContext (pcp=<optimized out>, pdp=<optimized out>, prp=<optimized out>) at ../src/gallium/frontends/dri/dri_util.c:699
No locals.
#17 0x00007ffff7ae2e28 in dri2_make_current (disp=0x55555556ae30, dsurf=0x55555556ca60, rsurf=0x55555556ca60, ctx=<optimized out>) at ../src/egl/drivers/dri2/egl_dri2.c:1683
dri2_dpy = 0x555555582570
dri2_ctx = 0x5555555f88b0
old_disp = 0x0
old_dri2_dpy = 0x0
old_ctx = 0x0
old_dsurf = 0x0
old_rsurf = 0x0
tmp_dsurf = 0x5555575b0d40
tmp_rsurf = 0xe8b
ddraw = <optimized out>
rdraw = <optimized out>
cctx = <optimized out>
egl_error = 12288
__PRETTY_FUNCTION__ = "dri2_make_current"
#18 0x00007ffff7ad7c19 in eglMakeCurrent (dpy=<optimized out>, draw=<optimized out>, read=0x55555556ca60, ctx=<optimized out>) at ../src/egl/main/eglapi.c:974
__rs = {0x0, 0x55555556ca60, 0x55555556ca60, 0x5555555f88b0}
__rsp = <optimized out>
disp = 0x55555556ae30
context = 0x5555555f88b0
draw_surf = 0x55555556ca60
read_surf = 0x55555556ca60
ret = 0
__func__ = "eglMakeCurrent"
#19 0x00007ffff7ec39fa in InternalMakeCurrentVendor () from /opt/lib/x86_64-linux-gnu/libEGL.so.1
No symbol table info available.
#20 0x00007ffff7ec3ab1 in InternalMakeCurrentDispatch () from /opt/lib/x86_64-linux-gnu/libEGL.so.1
No symbol table info available.
#21 0x0000555555558fcb in main ()
No symbol table info available.