Bug 107442

Summary: Any GL application run with LIBGL_ALWAYS_SOFTWARE=1 will kill your Xserver
Product: Wayland Reporter: Lionel Landwerlin <lionel.g.landwerlin>
Component: XWaylandAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED WORKSFORME QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: Simple reproducer

Description Lionel Landwerlin 2018-08-01 14:17:08 UTC
This is with xwayland 1.20.0 :

btCore was generated by `/usr/bin/Xwayland :0 -rootless -terminate -accessx -core -listen 4 -listen 5 -d'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f91a0136640 (LWP 9217))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f91a242d2f1 in __GI_abort () at abort.c:79
#2  0x0000564ce8c6fd4a in OsAbort () at ../../../../os/utils.c:1350
#3  0x0000564ce8c758e3 in AbortServer () at ../../../../os/log.c:877
#4  0x0000564ce8c76705 in FatalError (
    f=f@entry=0x564ce8c99610 "Caught signal %d (%s). Server aborting\n")
    at ../../../../os/log.c:1015
#5  0x0000564ce8c6cde3 in OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>)
    at ../../../../os/osinit.c:156
#6  <signal handler called>
#7  0x00007f919cbef443 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x0000564ceb0c6a90 in ?? ()
#9  0x0000564ce8f0bf6c in __glXEventBase ()
#10 0x9e7e93418ca1ce00 in ?? ()
#11 0x000000000000a55a in ?? ()
#12 0x0000564ceb0c6a90 in ?? ()
#13 0x0000564ce8f0bf6c in __glXEventBase ()
#14 0x0000564ce8b96f39 in __glXDisp_DestroyContext (cl=<optimized out>, 
    pc=0x564ce8b92f69 <__glXDRIcontextDestroy+25> "H\211\337\350O<")
    at ../../../../glx/glxcmds.c:437
#15 0x0000564ce8c7b705 in dispatch_DestroyContext (client=0x564ceb3a7430)
    at ../../../../glx/vnd_dispatch_stubs.c:82
#16 0x0000564ce8c36f18 in Dispatch () at ../../../../dix/dispatch.c:478
#17 0x0000564ce8c3af18 in dix_main (argc=12, argv=0x7ffc2fd91378, envp=<optimized out>)
    at ../../../../dix/main.c:276
#18 0x00007f91a2418b17 in __libc_start_main (main=0x564ce8b0e520 <main>, argc=12, 
    argv=0x7ffc2fd91378, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7ffc2fd91368) at ../csu/libc-start.c:310
#19 0x0000564ce8b0e55a in _start ()

I'm really surpised that the backtrace ends up in swrast_dri.so. I would assume that the server would use i965 on my machine.
Comment 1 Lionel Landwerlin 2018-08-06 12:02:52 UTC
I'm not sure whether that's limited to XWayland or applies to Xorg in general.
Comment 2 Olivier Fourdan 2018-08-06 12:25:54 UTC
Can you try with with https://patchwork.freedesktop.org/patch/242409/ applied on Mesa?

You should be able to reproduce with "Xephyr -glamor" as well, so not Xwayland specific (actually, I think this is mesa swrast code, the the patch above)
Comment 3 Olivier Fourdan 2018-08-06 12:28:59 UTC
Created attachment 140976 [details]
Simple reproducer

Simple reproducer.
Comment 4 Lionel Landwerlin 2018-08-06 14:27:34 UTC
(In reply to Olivier Fourdan from comment #3)
> Created attachment 140976 [details]
> Simple reproducer
> Simple reproducer.

Thanks Olivier. It appears to work on master, bisecting now.
Comment 5 Olivier Fourdan 2018-08-06 15:57:04 UTC
(In reply to Lionel Landwerlin from comment #4)
> Thanks Olivier. It appears to work on master, bisecting now.

In which case it's not the same issue as the one I was thinking... Sorry for the noise.
Comment 6 Lionel Landwerlin 2018-08-06 16:08:11 UTC
Well, I don't understand.
I can't reproduce now...
Comment 7 Adam Jackson 2019-05-10 15:47:30 UTC
Closing per comment #6.

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.