I'm trying to get some unit tests from Chromium to work on Mesa. It's using their dri backend. It crash in the eglSwapBuffers() call, it's pretty simple to reproduce, just call eglSwapBuffers() twice. This only works if you call glClear() before doing eglSwapBuffers(). Here is the backtrace : Program received signal SIGSEGV, Segmentation fault. dri2_drm_swap_buffers (drv=<optimized out>, disp=<optimized out>, draw=0x555555a741d0) at platform_drm.c:391 391 platform_drm.c: No such file or directory. (gdb) bt Python Exception <type 'exceptions.ImportError'> No module named gdb.frames: #0 dri2_drm_swap_buffers (drv=<optimized out>, disp=<optimized out>, draw=0x555555a741d0) at platform_drm.c:391 #1 0x00007ffff5dbfb76 in eglSwapBuffers (dpy=0x555555a72790, surface=<optimized out>) at eglapi.c:811 #2 0x00005555555c1342 in gfx::NativeViewGLSurfaceEGL::SwapBuffers (this=this@entry=0x555555868e20) at ../../../../../../../home/djdeath/chrome_root/src/ui/gl/gl_surface_egl.cc:420 #3 0x00005555555c01d5 in gfx::(anonymous namespace)::GLSurfaceOzoneEGL::SwapBuffers (this=0x555555868e20) at ../../../../../../../home/djdeath/chrome_root/src/ui/gl/gl_surface_ozone.cc:47 #4 0x000055555558a985 in DemoWindow::RenderFrameGL (this=0x555555868c80) at ../../../../../../../home/djdeath/chrome_root/src/ui/ozone/demo/ozone_demo.cc:160 #5 0x00005555555a0f11 in Run (this=0x7fffffffdbd0) at ../../../../../../../home/djdeath/chrome_root/src/base/callback.h:401 #6 base::Timer::RunScheduledTask (this=0x555555868c88) at ../../../../../../../home/djdeath/chrome_root/src/base/timer/timer.cc:201 #7 0x00005555555a9bc6 in Run (this=0x7fffffffdf78) at ../../../../../../../home/djdeath/chrome_root/src/base/callback.h:401 #8 base::debug::TaskAnnotator::RunTask (this=this@entry=0x7fffffffe2d8, queue_function=queue_function@entry=0x5555557abe06 "MessageLoop::PostTask", run_function=run_function@entry=0x5555557abdf1 "MessageLoop::RunTask", pending_task=...) at ../../../../../../../home/djdeath/chrome_root/src/base/debug/task_annotator.cc:62 #9 0x0000555555592dea in base::MessageLoop::RunTask (this=this@entry=0x7fffffffe180, pending_task=...) at ../../../../../../../home/djdeath/chrome_root/src/base/message_loop/message_loop.cc:447 #10 0x0000555555593199 in base::MessageLoop::DeferOrRunPendingTask (this=0x7fffffffe180, pending_task=...) at ../../../../../../../home/djdeath/chrome_root/src/base/message_loop/message_loop.cc:456 #11 0x0000555555594674 in base::MessageLoop::DoDelayedWork (this=0x7fffffffe180, next_delayed_work_time=0x555555859110) at ../../../../../../../home/djdeath/chrome_root/src/base/message_loop/message_loop.cc:603 #12 0x00005555555a44fa in base::MessagePumpLibevent::Run (this=0x555555859100, delegate=0x7fffffffe180) at ../../../../../../../home/djdeath/chrome_root/src/base/message_loop/message_pump_libevent.cc:242 #13 0x000055555559a9cd in base::RunLoop::Run (this=0x7fffffffe150) at ../../../../../../../home/djdeath/chrome_root/src/base/run_loop.cc:49 #14 0x0000555555589edd in main (argc=<optimized out>, argv=<optimized out>) at ../../../../../../../home/djdeath/chrome_root/src/ui/ozone/demo/ozone_demo.cc:219
Created attachment 106199 [details] [review] egl/drm: do not crash when swapping buffers without any rendering Reproducing the bit in the swap_buffers from the wayland platform : http://cgit.freedesktop.org/mesa/mesa/tree/src/egl/drivers/dri2/platform_wayland.c#n607
Lionel, Can you send this patch for review to mesa dev mailing list? Br, Kalyan
Lionel, could you specify a minimal testcase for this? I'm not able to reproduce this using a small app (egl and gles2) that just calls eglSwapBuffers() few times (with or without glclear calls in between).
(In reply to Tapani Pälli from comment #3) > Lionel, could you specify a minimal testcase for this? I'm not able to > reproduce this using a small app (egl and gles2) that just calls > eglSwapBuffers() few times (with or without glclear calls in between). Oops, now I realized I'm using 'x11' platform and that is why my test works. Anyway, a small test case (for piglit) would be nice. I see that Wayland platform has identical behavior.
was fixed
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.