I'm suffering from bug 4574, so DRI doesn't work and X falls back to software rendering; this is annoying, but the Mach64 is bad enough at 3D that it's not a killer. But on XORG-6_8_99_900, firing up amaroK, clicking on the analyzer pane until a graphical analyzer fires up, and then hitting `D' leads to the following crash: Program received signal SIGSEGV, Segmentation fault. _mesa_make_current (newCtx=0x8665da8, drawBuffer=0xb6fbd008, readBuffer=0xb6fbd008) at context.c:1563 1563 if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) { (gdb) bt #0 _mesa_make_current (newCtx=0x8665da8, drawBuffer=0xb6fbd008, readBuffer=0xb6fbd008) at context.c:1563 #1 0xb7de3bd2 in XMesaMakeCurrent2 (c=0x8665da8, drawBuffer=0xb6fbd008, readBuffer=0xb6fbd008) at xm_api.c:2069 #2 0xb7de12d5 in __MESA_makeCurrent (gc=0x8665da8) at xf86glx.c:830 #3 0xb7ec17bc in DoMakeCurrent (cl=0x86109e8, drawId=10488977, readId=10488977, contextId=140926376, tag=1) at glxcmds.c:643 #4 0xb7ec1989 in __glXMakeCurrent (cl=0xb6fef008, pc=0xb6fbd008 "") at glxcmds.c:397 #5 0xb7ec5410 in __glXDispatch (client=0x859e4a8) at glxext.c:433 #6 0x080c63e2 in Dispatch () at dispatch.c:459 #7 0x080d29f5 in main (argc=13, argv=0xbfb68d64, envp=0xb6fef008) at main.c:450 (gdb) print newCtx $1 = (GLcontext *) 0x8665da8 (gdb) print newCtx->DrawBuffer $2 = (GLframebuffer *) 0xb6fef008 (gdb) print newCtx->DrawBuffer->Name Cannot access memory at address 0xb6fef008 (gdb) frame 4 #4 0xb7ec1989 in __glXMakeCurrent (cl=0xb6fef008, pc=0xb6fbd008 "") at glxcmds.c:397 397 return DoMakeCurrent( cl, req->drawable, req->drawable, (gdb) print cl $7 = (__GLXclientState *) 0xb6fef008 (gdb) print *cl Cannot access memory at address 0xb6fef008 Probable buffer overrun somewhere, I'd say. I can do more debugging if anyone wants.
It's often *very* difficult to get useful information from inspecting variables when you build with optimization. My guess is that you get a bogus value for cl in __glXMakeCurrent because of this. Please rebuild with this line in your config/cf/host.def file and try to reproduce the segfault: #define DefaultGcc2i386Opt -O0 -ggdb3 After you rebuild, you will only need to do this command to install the relevent modules: install -m 444 exports/libs/modules/extensions/lib{glx,GLcore}.so \ /usr/X11R6/lib/modules/extensions I've also updated the bug summary. I suspect that after we get a little more information we'll change the product / component as well. My guess is that the problem is in the server-side GLX protocol layer and not in core Mesa.
Indeed the _glXMakeCurrent() cl value was wrong, almost certainly because of the sibcall optimization. My apologies for the silly incorrect debugging dumps. In mitigation, have more! This is from a -ggdb3 -g0 libGL*, as you suggested. The fundamental crash looks the same, so we can rule out compiler misoptimization as a cause. All the parameters in the crashing stack frame are dumped as well in case some of them prove useful, except for the vast newCtx, which overflows bugzilla's maximum comment length :) Program received signal SIGSEGV, Segmentation fault. 0xb7c3a1c7 in _mesa_make_current (newCtx=0x8660e40, drawBuffer=0xb6f4c008, readBuffer=0xb6f4c008) at context.c:1563 1563 if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) { (gdb) bt #0 0xb7c3a1c7 in _mesa_make_current (newCtx=0x8660e40, drawBuffer=0xb6f4c008, readBuffer=0xb6f4c008) at context.c:1563 #1 0xb7de1cb8 in XMesaMakeCurrent2 (c=0x8660e40, drawBuffer=0xb6f4c008, readBuffer=0xb6f4c008) at xm_api.c:2069 #2 0xb7dde5fa in __MESA_makeCurrent (gc=0x8660e40) at xf86glx.c:830 #3 0xb7ef4786 in DoMakeCurrent (cl=0x8633328, drawId=10488983, readId=10488983, contextId=10488981, tag=1) at glxcmds.c:643 #4 0xb7ef424b in __glXMakeCurrent (cl=0x8633328, pc=0x8ac34d8 "\235\005\004") at glxcmds.c:397 #5 0xb7efab08 in __glXDispatch (client=0x8258758) at glxext.c:433 #6 0x080c63e2 in Dispatch () at dispatch.c:459 #7 0x080d29f5 in main (argc=13, argv=0xbfba1434, envp=0xb6f7e008) at main.c:450 (gdb) print newCtx $1 = (GLcontext *) 0x8660e40 (gdb) print newCtx->DrawBuffer $2 = (GLframebuffer *) 0xb6f7e008 (gdb) print *newCtx->DrawBuffer Cannot access memory at address 0xb6f7e008 (gdb) frame 5 #5 0xb7efab08 in __glXDispatch (client=0x8258758) at glxext.c:433 433 return (*proc)(cl, (GLbyte *) stuff); (gdb) print client $3 = 0x8258758 (gdb) print *client $4 = {index = 5, clientAsMask = 10485760, requestBuffer = 0x8ac34d8, osPrivate = 0x82593e0, swapped = 0, pSwapReplyFunc = 0x80d4ef0 <CopySwap32Write>, errorValue = 10488983, sequence = 1278269, closeDownMode = 0, clientGone = 0, noClientException = 0, lastDrawable = 0x8654648, lastDrawableID = 10488983, lastGC = 0x0, lastGCID = 0, saveSet = 0x0, numSaved = 0, screenPrivate = {0x18, 0x82587b0, 0x52c, 0x100, 0x100, 0xd8, 0x18, 0x82587f8, 0x62c, 0x100, 0x100, 0x82587a0, 0x31, 0x47eae8a0, 0x47eae8a0, 0x200}, requestVector = 0x81de800, req_len = 4, big_requests = 1, priority = 0, clientState = ClientStateRunning, devPrivates = 0x825882c, xkbClientFlags = 32770, mapNotifyMask = 7, newKeyboardNotifyMask = 293, vMajor = 1, vMinor = 0, minKC = 8 '\b', maxKC = 255 'ÿ', readRequest = 0x80e8a40 <StandardReadRequestFromClient>, replyBytesRemaining = 0, authId = 131, trustLevel = 0, CheckAccess = 0, appgroup = 0x0, fontResFunc = 0, smart_priority = 5, smart_start_tick = 80400, smart_stop_tick = 82220, smart_check_tick = 82220} (gdb) frame 0 #0 0xb7c3a1c7 in _mesa_make_current (newCtx=0x8660e40, drawBuffer=0xb6f4c008, readBuffer=0xb6f4c008) at context.c:1563 1563 if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) { (gdb) info locals No locals. (gdb) print *drawBuffer $6 = {Name = 0, RefCount = 0, Visual = {next = 0x0, rgbMode = 1 '\001', floatMode = 0 '\0', colorIndexMode = 0 '\0', doubleBufferMode = 1, stereoMode = 0, haveAccumBuffer = 0 '\0', haveDepthBuffer = 1 '\001', haveStencilBuffer = 0 '\0', redBits = 5, greenBits = 6, blueBits = 5, alphaBits = 0, redMask = 63488, greenMask = 2016, blueMask = 31, alphaMask = 0, rgbBits = 16, indexBits = 0, accumRedBits = 0, accumGreenBits = 0, accumBlueBits = 0, accumAlphaBits = 0, depthBits = 16, stencilBits = 0, numAuxBuffers = 0, level = 0, pixmapMode = 0, visualID = 35, visualType = 32770, visualRating = 32768, transparentPixel = 0, transparentRed = 0, transparentGreen = 0, transparentBlue = 0, transparentAlpha = 0, transparentIndex = 0, sampleBuffers = 0, samples = 0, drawableType = 0, renderType = 0, xRenderable = 0, fbconfigID = 0, maxPbufferWidth = 0, maxPbufferHeight = 0, maxPbufferPixels = 0, optimalPbufferWidth = 0, optimalPbufferHeight = 0, visualSelectGroup = 0, swapMethod = 0, screen = 0}, Initialized = 0 '\0', Width = 0, Height = 0, _Xmin = 0, _Xmax = 0, _Ymin = 0, _Ymax = 0, _DepthMax = 65535, _DepthMaxF = 65535, _MRD = 1, _Status = 0, Attachment = {{Type = 36161, Complete = 1 '\001', Renderbuffer = 0x8ab2ea8, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, { Type = 36161, Complete = 1 '\001', Renderbuffer = 0x8654dd8, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 36161, Complete = 1 '\001', Renderbuffer = 0x8654e58, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}}, ColorDrawBuffer = { 1029}, ColorReadBuffer = 1029, _ColorDrawBufferMask = {2}, _ColorReadBufferMask = 2, _NumColorDrawBuffers = {0}, _ColorDrawBuffers = {{0x0, 0x0, 0x0, 0x0}}, _ColorReadBuffer = 0x0, _ColorDrawBit = {{0, 0, 0, 0}}, Delete = 0xb7c6452d <_mesa_destroy_framebuffer>} (gdb) print *readBuffer $7 = {Name = 0, RefCount = 0, Visual = {next = 0x0, rgbMode = 1 '\001', floatMode = 0 '\0', colorIndexMode = 0 '\0', doubleBufferMode = 1, stereoMode = 0, haveAccumBuffer = 0 '\0', haveDepthBuffer = 1 '\001', haveStencilBuffer = 0 '\0', redBits = 5, greenBits = 6, blueBits = 5, alphaBits = 0, redMask = 63488, greenMask = 2016, blueMask = 31, alphaMask = 0, rgbBits = 16, indexBits = 0, accumRedBits = 0, accumGreenBits = 0, accumBlueBits = 0, accumAlphaBits = 0, depthBits = 16, stencilBits = 0, numAuxBuffers = 0, level = 0, pixmapMode = 0, visualID = 35, visualType = 32770, visualRating = 32768, transparentPixel = 0, transparentRed = 0, transparentGreen = 0, transparentBlue = 0, transparentAlpha = 0, transparentIndex = 0, sampleBuffers = 0, samples = 0, drawableType = 0, renderType = 0, xRenderable = 0, fbconfigID = 0, maxPbufferWidth = 0, maxPbufferHeight = 0, maxPbufferPixels = 0, optimalPbufferWidth = 0, optimalPbufferHeight = 0, visualSelectGroup = 0, swapMethod = 0, screen = 0}, Initialized = 0 '\0', Width = 0, Height = 0, _Xmin = 0, _Xmax = 0, _Ymin = 0, _Ymax = 0, _DepthMax = 65535, _DepthMaxF = 65535, _MRD = 1, _Status = 0, Attachment = {{Type = 36161, Complete = 1 '\001', Renderbuffer = 0x8ab2ea8, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, { Type = 36161, Complete = 1 '\001', Renderbuffer = 0x8654dd8, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 36161, Complete = 1 '\001', Renderbuffer = 0x8654e58, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}, {Type = 0, Complete = 0 '\0', Renderbuffer = 0x0, Texture = 0x0, TextureLevel = 0, CubeMapFace = 0, Zoffset = 0}}, ColorDrawBuffer = { 1029}, ColorReadBuffer = 1029, _ColorDrawBufferMask = {2}, _ColorReadBufferMask = 2, _NumColorDrawBuffers = {0}, _ColorDrawBuffers = {{0x0, 0x0, 0x0, 0x0}}, _ColorReadBuffer = 0x0, _ColorDrawBit = {{0, 0, 0, 0}}, Delete = 0xb7c6452d <_mesa_destroy_framebuffer>} (gdb) continue Continuing. Program received signal SIGABRT, Aborted. 0xffffe410 in ?? () (gdb) quit
Er, a -ggdb3 -O0. Of course. -ggdb3 -g0 wouldn't be much use to anyone. (Dyslexia rules KO, and all that.)
Are you still able to reproduce this bug on recent bit when using indirect rendering? If not, I'll close the bug. There have been a lot of changes in this area in the last 9 months.
I'm seeing something which looks a lot like this. Here's the backgrace from Xorg.0.log: 0: /usr/bin/X(xf86SigHandler+0x87) [0x80b8727] 1: [0x391420] 2: /usr/lib/xorg/modules/extensions/libGLcore.so(_mesa_make_current+0xf2) [0x455db2] 3: /usr/lib/xorg/modules/extensions/libGLcore.so(XMesaMakeCurrent2+0x55) [0x56a0b5] 4: /usr/lib/xorg/modules/extensions/libGLcore.so(__MESA_makeCurrent+0x55) [0x530215] 5: /usr/lib/xorg/modules/extensions/libglx.so(DoMakeCurrent+0x3f8) [0x2cbd98] 6: /usr/lib/xorg/modules/extensions/libglx.so(__glXMakeCurrent+0x39) [0x2cbf69] 7: /usr/lib/xorg/modules/extensions/libglx.so [0x2cea67] 8: /usr/bin/X(Dispatch+0x19b) [0x808895b] 9: /usr/bin/X(main+0x487) [0x80701d7] 10: /lib/libc.so.6(__libc_start_main+0xc6) [0x6d54ce] 11: /usr/bin/X(FontFileCompleteXLFD+0xb1) [0x806f511] My users are reporting this on machines with Radeon 9100 and ProSavage8 video (same backtrace). The machines are all running FC5, which has: xorg-x11-drv-ati-6.5.8.0-1.i386 xorg-x11-drv-savage-2.0.2.3-1.2.i386 xorg-x11-server-Xorg-1.0.1-9.fc5.5.i386 mesa-libGL-6.4.2-6.FC5.3.i386 This seems to be in Red Hat's bugzilla as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=184072 and has ben reported to occur under FC6, which should have more current stuff. I will attach logs including backtraces from two crashes.
Created attachment 7536 [details] Log from crash on Savage hardware
Created attachment 7537 [details] Log from crash on ATI hardware.
Please try again with current Mesa and/or xserver bits. I think something like this was fixed a while ago.
(In reply to comment #8) > Please try again with current Mesa and/or xserver bits. I think something like > this was fixed a while ago. Not fixed, it's stil there.
Bugzilla Upgrade Mass Bug Change NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO. - benjsc fd.o Wrangler
Created attachment 23514 [details] Reproduce code This code reproduces the crash on mesa 6.5.1. It re-uses the same OpenGL context on 2 different windows.
I was able to reliably reproduce this crash on CentOS 5.2. No drivers from HW vendors were installed on the system. glxinfo produces: OpenGL vendor string: Mesa project: www.mesa3d.org OpenGL renderer string: Mesa GLX Indirect OpenGL version string: 1.2 (1.5 Mesa 6.5.1) I get the crash on the same line of code in context.c as the original bug reporter: if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) { The reproduce case is to create a window, create a GLX rendering context, make some GL calls, destroy the window but keep the rendering context. Then create a new window and make the existing rendering context current on the new window, the crash occurs in this glxMakeCurrent call. I tried the reproduce case on ubuntu 8.10 with no vendor drivers, this uses mesa 7.2. I wasn't able to reproduce on this system so the problem may be fixed.
I should have mentioned the machine I tested on has an nVidia 9500 GT graphics card.
Mass version move, cvs -> git
This bug is very old, and the server-side GLX support has been almost completely rewritten in the meantime. If you still experience problems with indirect rendering, please submit new bug reports. Thanks.
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.