To reproduce: 0) Download and build piglit (OpenGL test suite runninng many small OpenGL programs); install dwm or other tiling window manager 1) run X with a tiling window manager (eg dwm) 2) make sure you are in tiling mode - run two terminals and they should appear side by side (or one below other) 3) run piglit from each ./piglit-run.py tests/all.test results/all.1 ./piglit-run.py tests/all.test results/all.2 watch the X server crash in a few minutes. X server 1.10.4 card: r600 or Evergreen Backtrace: 0: Xorg (xorg_backtrace+0x26) [0x4618e6] 1: Xorg (0x400000+0x65d09) [0x465d09] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fe615c54000+0xf020) [0x7fe615c63020] 3: /usr/lib/x86_64-linux-gnu/dri/r600_dri.so (0x7fe611bce000+0x45931) [0x7fe611c13931] 4: /usr/lib/xorg/modules/extensions/libdri2.so (0x7fe612bc3000+0x1ab2) [0x7fe612bc4ab2] 5: /usr/lib/xorg/modules/extensions/libdri2.so (0x7fe612bc3000+0x1b87) [0x7fe612bc4b87] 6: Xorg (0x400000+0xa7c93) [0x4a7c93] 7: Xorg (ConfigureWindow+0x222) [0x457352] 8: Xorg (0x400000+0x2d99b) [0x42d99b] 9: Xorg (0x400000+0x32ee9) [0x432ee9] 10: Xorg (0x400000+0x26ffe) [0x426ffe] 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7fe614991ead] 12: Xorg (0x400000+0x272ed) [0x4272ed] Segmentation fault at address 0x4d
Can you install debugging symbols and get a proper backtrace with gdb?
Created attachment 51539 [details] stack trace X.Org X Server 1.11.0 Release Date: 2011-08-26 X Protocol Version 11, Revision 0 Build Operating System: Linux 3.0.0-1-amd64 x86_64 Debian Build Date: 28 August 2011 10:58:30AM xorg-server 2:1.11.0-1 (Cyril Brulebois <kibi@debian.org>) Current version of pixman: 0.22.2
Created attachment 51770 [details] [review] st/dri: Guard against NULL drawable Does this Mesa patch fix the problem? P.S. Are you running piglit with indirect rendering on purpose?
I am running with direct rendering enabled: libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/r600_dri.so libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/r600_dri.so libGL: Can't open configuration file /etc/drirc: No such file or directory. libGL: Can't open configuration file /root/.drirc: No such file or directory. libGL: Can't open configuration file /etc/drirc: No such file or directory. libGL: Can't open configuration file /root/.drirc: No such file or directory. name of display: :1.0 display: :1 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.4 Backtrace: 0: X (xorg_backtrace+0x26) [0x5689d6] 1: X (0x400000+0x16c5c9) [0x56c5c9] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fe049340000+0xf020) [0x7fe04934f020] 3: /usr/lib/x86_64-linux-gnu/dri/r600_dri.so (0x7fe0452bd000+0x45755) [0x7fe045302755] 4: /usr/lib/xorg/modules/extensions/libdri2.so (0x7fe0462b0000+0x1aca) [0x7fe0462b1aca] 5: /usr/lib/xorg/modules/extensions/libdri2.so (0x7fe0462b0000+0x1b97) [0x7fe0462b1b97] 6: X (0x400000+0xbc783) [0x4bc783] 7: X (ConfigureWindow+0x222) [0x45e2d2] 8: X (0x400000+0x3257b) [0x43257b] 9: X (0x400000+0x37ae9) [0x437ae9] 10: X (0x400000+0x26eaa) [0x426eaa] 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7fe04807dead] 12: X (0x400000+0x2719d) [0x42719d] Segmentation fault at address (nil)
The patch does not seem to make any difference unless the X server needs to load the patched mesa somehow. I run only the application with LD_LIBRARY_PATH. unpatched: Backtrace: 0: X (xorg_backtrace+0x26) [0x5689d6] 1: X (0x400000+0x16c5c9) [0x56c5c9] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f1fa6277000+0xf020) [0x7f1fa6286020] 3: /usr/lib/xorg/modules/extensions/libglx.so (0x7f1fa3a0a000+0x3e124) [0x7f1fa3a48124] 4: /usr/lib/xorg/modules/extensions/libdri2.so (0x7f1fa31e7000+0x1aca) [0x7f1fa31e8aca] 5: /usr/lib/xorg/modules/extensions/libdri2.so (0x7f1fa31e7000+0x1b97) [0x7f1fa31e8b97] 6: X (0x400000+0xbc783) [0x4bc783] 7: X (ConfigureWindow+0x222) [0x45e2d2] 8: X (0x400000+0x3257b) [0x43257b] 9: X (0x400000+0x37ae9) [0x437ae9] 10: X (0x400000+0x26eaa) [0x426eaa] 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7f1fa4fb4ead] 12: X (0x400000+0x2719d) [0x42719d] Segmentation fault at address 0xa8 patched: Backtrace: 0: X (xorg_backtrace+0x26) [0x5689d6] 1: X (0x400000+0x16c5c9) [0x56c5c9] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f264a877000+0xf020) [0x7f264a886020] 3: /usr/lib/xorg/modules/extensions/libglx.so (0x7f264800a000+0x3e124) [0x7f2648048124] 4: /usr/lib/xorg/modules/extensions/libdri2.so (0x7f26477e7000+0x1aca) [0x7f26477e8aca] 5: /usr/lib/xorg/modules/extensions/libdri2.so (0x7f26477e7000+0x1b97) [0x7f26477e8b97] 6: X (0x400000+0xbc783) [0x4bc783] 7: X (ConfigureWindow+0x222) [0x45e2d2] 8: X (0x400000+0x3257b) [0x43257b] 9: X (0x400000+0x37ae9) [0x437ae9] 10: X (0x400000+0x26eaa) [0x426eaa] 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7f26495b4ead] 12: X (0x400000+0x2719d) [0x42719d] Segmentation fault at address (nil)
(In reply to comment #5) > The patch does not seem to make any difference unless the X server needs to > load the patched mesa somehow. It does. (In reply to comment #4) > I am running with direct rendering enabled: The crash can only happen with indirect rendering, so at least some OpenGL app(s) end up using indirect rendering or you.
(In reply to comment #6) > (In reply to comment #5) > > The patch does not seem to make any difference unless the X server needs to > > load the patched mesa somehow. > > It does. Running the X server with LD_LIBRARY_PATH set to the patched mesa does not make a difference either. > > (In reply to comment #4) > > I am running with direct rendering enabled: > > The crash can only happen with indirect rendering, so at least some OpenGL > app(s) end up using indirect rendering or you. Then it is a bug in itself that some applications use indirect rendering at random.
(In reply to comment #7) > Running the X server with LD_LIBRARY_PATH set to the patched mesa does not make > a difference either. Did you check the log file that it actually loaded the patched r600_dri.so? > Then it is a bug in itself that some applications use indirect rendering at > random. More likely a configuration/setup issue.
(In reply to comment #8) > More likely a configuration/setup issue. Or maybe some piglit tests force indirect rendering.
I copied the patched libraries over the system libraries and the X server still crashes. It might be crashing in different place, though. The original stack trace does not seem to include the glx module.
Created attachment 51796 [details] stack trace with glx module
Created attachment 51797 [details] [review] st/dri: Guard against NULL drawable (v2) How about this patch instead?
Created attachment 51800 [details] backtrace with the new patch still crashes in glx
Looks like an xserver GLX/DRI2 issue then.
Looking at the test logs it seems one of the tests running at the time X crashed was a glx (=possibly indirect) test. So it might be that X server fails at running indirect applications together with direct applications (possibly after some non-trivial number of attempts).
I expect that this is still an issue in 1.11.1, but can you please confirm. Thanks.
yes, the last stack traces were with 1.11.1
cannot reproduce with X server 1.12.2/mesa 8.1-dev
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.