Created attachment 140148 [details] Journalctl traces After upgrading MESA to version 18.1.1 Primus (bridge for Bumblebee, the NVIDIA Optimus implementation) segfaults while trying to use applications that require GLX.Running same applications with Intel and VirtualGL (another bridge for Bumblebee that runs slower than Primus) works fine.After downgrading to Mesa 18.0.4 everything starts working again.Applications' logs don't say much. The issue can be reproduced by: 1)Installing Bumblebee 3.2.1, MESA 18.1.1 and primus 20151110 2)Running any GLX application with primusrun
The same issue remains in git version as well.
There is a backtrace in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901701: ---------------------------------------------------------------------------- Thread 2.3 "glxgears" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffee092700 (LWP 10545)] 0x00007ffff02914a7 in do_blit_drawpixels (pixels=0x0, unpack=0x7fffe0150ac8, type=5121, format=32993, height=1080, width=1920, y=0, x=0, ctx=0x7fffe0147540) at ../../../../../../src/mesa/drivers/dri/i965/intel_pixel_draw.c:80 80 ../../../../../../src/mesa/drivers/dri/i965/intel_pixel_draw.c: Toks failas ar aplankas neegzistuoja. #0 0x00007ffff02914a7 in do_blit_drawpixels (pixels=0x0, unpack=0x7fffe0150ac8, type=5121, format=32993, height=1080, width=1920, y=0, x=0, ctx=0x7fffe0147540) at ../../../../../../src/mesa/drivers/dri/i965/intel_pixel_draw.c:80 src_offset = <optimized out> src_buffer = <optimized out> dst_format = 3761243984 src_stride = <optimized out> src_flip = <optimized out> pbo_mt = 0x0 rb = <optimized out> src_format = MESA_FORMAT_B8G8R8A8_UNORM #1 intelDrawPixels (ctx=0x7fffe0147540, x=0, y=0, width=1920, height=1080, format=32993, type=5121, unpack=0x7fffe0150ac8, pixels=0x0) at ../../../../../../src/mesa/drivers/dri/i965/intel_pixel_draw.c:167 __func__ = "intelDrawPixels" #2 0x00007fffefedaf33 in _mesa_DrawPixels (width=1920, height=1080, format=32993, type=5121, pixels=0x0) at ../../../src/mesa/main/drawpix.c:162 err = <optimized out> ctx = 0x7fffe0147540 #3 0x00007ffff76b8345 in test_drawpixels_fast (dconfig=<optimized out>, ctx=0x7fffe00239c0, dpy=0x7fffe0000b20) at libglfork.cpp:362 pbo = 1 end = 8568.4529074310012 iters = 0 is_fast = <optimized out> width = 1920 height = 1080 pbattrs = {32833, 1920, 32832, 1080, 32795, 1, 0} pbuffer = 146800642 pixeldata = <optimized out> #4 display_work (vd=<optimized out>) at libglfork.cpp:402 drawable = 144703490 width = 300 height = 300 quad_vertex_coords = {-1, -1, -1, 1, 1, 1, 1, -1} quad_texture_coords = {0, 0, 0, 1, 1, 1, 1, 0} textures = {0, 0} pbos = {0, 0} ctex = 0 state_names = {0x7ffff76c1244 "wait", 0x7ffff76c1249 "upload", 0x7ffff76c1250 "draw+swap", 0x0} profiler = {name = 0x7ffff76c1203 "display", state_names = 0x7ffff78d12e0 <display_work(void*)::state_names>, state_time = {0, 0, 0, 0, 0, 0}, prev_timestamp = 8568.2315354050006, print_timestamp = 8568.2315354050006, state = 0, nframes = 0, width = 0, height = 0} ddpy = 0x7fffe0000b20 __PRETTY_FUNCTION__ = "void* display_work(void*)" dconfigs = 0x7fffe000fff0 context = 0x7fffe00239c0 use_textures = <optimized out> #5 0x00007ffff62455aa in start_thread (arg=0x7fffee092700) at pthread_create.c:463 pd = 0x7fffee092700 now = <optimized out> unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737186965248, 6747949740819525267, 140737488347470, 140737488347471, 140737488347472, 0, -6747988065853329773, -6747970307990442349}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <optimized out> #6 0x00007ffff6aebcbf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ----------------------------------------------------------------------------
FWIW, I can't reproduce this...using primus 20151110 and bumblebee 3.2.1, X server 1.19.6+13+gd0d1a694f-2 from Archlinux, and either Mesa master or 18.1.1, and 'primusrun glxgears' is working fine for me.
Xorg server 1.20 is also required (introduced by xorg-server 8d0d89715984e321315631dd6667e05813d26e03). In mesa, this is introduced by "069fdd5f9facbd72fb6a289696c7b74e3237e70f egl/x11: Support DRI3 v1.1". The xcb_dri3_get_supported_modifiers_reply() in that change is returning an error when using primusrun. Building without HAVE_DRI3_MODIFIERS, I do not see the issue.
Problem still exists in 18.1.4
I can confirm that there is not issue if building without HAVE_DRI3_MODIFIERS.
So if this is DRI3-related, export LIBGL_DRI3_DISABLE=1 must surely be a workaround. It certainly does help in my configuration. :-)
Building MESA with LIBGL_DRI3_DISABLE and without HAVE_DRI3_MODIFIERS work fine on my config.Thanks a lot!
This is fixed. The underlying issue was shared with https://bugs.freedesktop.org/show_bug.cgi?id=107117
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.