Summary: | glXMakeCurrent (xdisplay, None, NULL) crashes X | ||||||
---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Jaakko Hyvätti <jaakko.hyvatti> | ||||
Component: | libglx | Assignee: | Default DRI bug account <dri-devel> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | blocker | ||||||
Priority: | high | CC: | ajax, kem, mharris, torrey | ||||
Version: | XOrg 6.7.0 | ||||||
Hardware: | x86 (IA32) | ||||||
OS: | Linux (All) | ||||||
URL: | http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=125703 | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 351 | ||||||
Attachments: |
|
Description
Jaakko Hyvätti
2004-06-04 22:19:04 UTC
What program are you running when this happens? Can you try running X with the -core flag to get a core dump, and post the backtrace from gdb? Note that direct rendering isn't enabled here... Changing product information to DRI and libglx. mass reassign to dri-devel@, i'm no longer the default component owner. sorry for the spam. Note we see the same crash on Mac OS X with XDarwin using indirect rendering. Here is a crash log with a full backtrace. The crash was during running a commercial application (Tecplot) on the top of the XFree86 tree, but it appears to be the same issue. gdb /Applications/XDarwin.app/Contents/MacOS/X Darwin GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec 7 02:14:27 GMT 2002) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-macos10". Reading symbols for shared libraries ........ done (gdb) r Starting program: /Applications/XDarwin.app/Contents/MacOS/XDarwin [Switching to process 19557 thread 0xb03] Reading symbols for shared libraries . done Reading symbols for shared libraries ....................................................... done Reading symbols for shared libraries . done 2004-07-09 09:28:22.277 XDarwin[19557] XDarwin 1.4a1 Reading symbols for shared libraries . done This is a pre-release version of XFree86, and is not supported in any way. Bugs may be reported to XFree86@XFree86.Org and patches submitted to fixes@XFree86.Org. Before reporting bugs in pre-release versions, please check the latest version in the XFree86 CVS repository (http://www.XFree86.Org/cvs) XFree86 Version 4.4.99.8 / X Window System (protocol Version 11, revision 0, vendor release 6600) Release Date: 27 June 2004 If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. (See http://www.XFree86.Org/FAQ) Operating System: Darwin Apple Computer, Inc. Using keymapping provided in /System/Library/Keyboards/USA.keymapping. _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root Loading GLX bundle glxAGL.bundle (using Apple's OpenGL) [Switching to process 19557 thread 0x1203] Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Display mode: Rootless Quartz -- Cocoa implementation PseudoramiX screen 0 added: 1280x1003 @ (0,21). PseudoramiX screen 0 placed at X11 coordinate (0,0). Screen 0 added: 1280x1003 @ (0,21) Screen 0 placed at X11 coordinate (0,0). Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list! Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. [Switching to process 19557 thread 0x1203] 0x02518d4c in DoMakeCurrent (cl=0x28dd540, drawId=0, readId=0, contextId=0, tag=1) at glxcmds.c:646 646 prevglxc->readPixmap->refcnt--; (gdb) p *prevgls xc $1 = { last = 0x0, next = 0x0, nextDrawPriv = 0x0, nextReadPriv = 0x0, gc = 0x32a5280, modes = 0x32b0f90, pScreen = 0x21bdaa0, pGlxScreen = 0x21c31b0, pVisual = 0x21bdd74, pGlxVisual = 0x21c0a20, id = 14681258, share_id = 0, vid = 0, screen = 0, idExists = 1 '\001', isCurrent = 1 '\001', isDirect = 0 '\0', pendingState = 0, hasUnflushedCommands = 0 '\0', renderMode = 7168, feedbackBuf = 0x0, feedbackBufSize = 0, selectBuf = 0x0, selectBufSize = 0, drawPixmap = 0x32a4f00, readPixmap = 0x0, drawPriv = 0x34821b0, readPriv = 0x34821b0 } (gdb) where #0 0x02518d4c in DoMakeCurrent (cl=0x28dd540, drawId=0, readId=0, contextId=0, tag=1) at glxcmds.c:646 #1 0x0251852c in __glXMakeCurrent (cl=0x28dd540, pc=0x29b4000 "\226\005") at glxcmds.c:373 #2 0x025143ec in __glXDispatch (client=0x28e2f70) at glxext.c:434 #3 0x0002c830 in Dispatch () at dispatch.c:446 #4 0x00002c58 in main (argc=1, argv=0xbffffbfc, envp=0xbffffc04) at main.c:432 #5 0x00081dd0 in -[XServer run] (self=0xea5c60, _cmd=0x906ccf68) at XServer.m:838 #6 0x97e2cc38 in forkThreadForFunction () #7 0x90020c28 in _pthread_body () (gdb) quit Created attachment 570 [details] [review] proposed fix when rendering to a pixmap, ->readPixmap is never initialized, so we can't assume it's valid when releasing the context. this fixes the crash for me, and the testcase displays identically for both cases, which i assume is correct. That patch looks good to me. This bug was introduced by me (heh) when support for GLX_SGI_make_current_read was added. I remembered to check readPixmap for NULL in the other important places, but I missed this one. Patch checked into X.Org tree. Should it also be checked into the DRI tree? no, the DRI xc tree is officially dead. it looks like the corresponding code in hw/dmx/glxproxy does the right thing in this case already. (closing) patch applied to xorg-x11-6.7.0-12 for future Fedora Core 2 official update. *** Bug 3608 has been marked as a duplicate of this bug. *** |
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.