Summary: | Crash when trying to enable 3D with KMS/DRI2 | ||
---|---|---|---|
Product: | Mesa | Reporter: | Nikos Chantziaras <realnc> |
Component: | GLX | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Nikos Chantziaras
2010-08-03 00:29:19 UTC
This bug is the same I reported on the mailing list last week and it is related to bug 29181. Nevertheless, Kristian Høgsberg told me that it should not return NULL since there should always be a __GLXDRIdrawable in the hash table. dri2_glx.c, line 508ff says the following: /* Old servers don't send invalidate events */ if (!pdp->invalidateAvailable) dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); I am not sure if xorg-server 1.8.2 sends invalidate events which might conflict with this function call - but then pdp->invalidateAvailable should not be false... What happens to pdp in dri2CreateDisplay(Display * dpy), dri2_glx.c? This function sets pdp->invalidateAvailable but pdp is neither stored in a global variable nor is it returned by the function (just &pdp->base and pdp->base does not contain a pointer to pdp, does it?). (In reply to comment #1) > This bug is the same I reported on the mailing list last week and it is related > to bug 29181. Nevertheless, Kristian Høgsberg told me that it should not return > NULL since there should always be a __GLXDRIdrawable in the hash table. > > dri2_glx.c, line 508ff says the following: > > /* Old servers don't send invalidate events */ > if (!pdp->invalidateAvailable) > dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); > > I am not sure if xorg-server 1.8.2 sends invalidate events which might conflict > with this function call - but then pdp->invalidateAvailable should not be > false... 1.8.2 doesn't send invalidate events, so this call is correctly taken. Even if it were taken erroneously, it wouldn't matter or cause these symptoms. Could also be that something goes wrong inside dri2InvalidateBuffers(Display *dpy, XID drawable) { __GLXDRIdrawable *pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, drawable); struct dri2_screen *psc = (struct dri2_screen *) pdraw->psc; struct dri2_drawable *pdp = (struct dri2_drawable *) pdraw; when it calls dri2GetGlxDrawableFromXDrawableId() and that one returns an invalid result. However i tested mesa master with both 1.8.2 (no invalidate events) and master (invalidate events) and it worked well. Didn't test with KWin though, so i don't know. One thing I'd like to point out is that KDE with compositing is totally unusable right now at current Git master because UMS doesn't work either. KMS crashes due to the present bug, and UMS crashes because of bug 28181. So if a developer could install KDE4 and try to reproduce, that would be really awesome. (In reply to comment #0) > KWin crashes when trying to activate OpenGL desktop effects. I do not know if > bug 29181 is related; could be. > > I'm on Mesa git master, kernel 2.6.35 using Radeon KMS, xorg-server 1.8.2, > xf86-video-ati git master, Radeon HD4870. > > This is the backtrace: > > Application: KWin (kwin), signal: Segmentation fault > [KCrash Handler] > #6 dri2InvalidateBuffers (dpy=<value optimized out>, drawable=<value optimized > out>) at dri2_glx.c:643 > #7 0x0000003008c5106d in dri2SwapBuffers (pdraw=<value optimized out>, > target_msc=<value optimized out>, divisor=<value optimized out>, > remainder=<value optimized out>) at dri2_glx.c:510 Ah, I see, this is the compatibility path for servers that don't send invalidate events. When dri2SwapBuffers call dri2Invalidate handle it passes the GLX drawable XID, but that's wrong, it should pass the X drawable XID. I just committed: commit 9da1c9da139327132dea57b18048a4eb386b6bad Author: Kristian Høgsberg <krh@bitplanet.net> Date: Wed Aug 4 08:43:08 2010 -0400 glx: dri2InvalidateBuffers() needs the X drawable XID not the GLX one This never ceases to entertain. to mesa master, please give it a try. (In reply to comment #5) > Ah, I see, this is the compatibility path for servers that don't send > invalidate events. When dri2SwapBuffers call dri2Invalidate handle it passes > the GLX drawable XID, but that's wrong, it should pass the X drawable XID. I > just committed: > > commit 9da1c9da139327132dea57b18048a4eb386b6bad > Author: Kristian Høgsberg <krh@bitplanet.net> > Date: Wed Aug 4 08:43:08 2010 -0400 > > glx: dri2InvalidateBuffers() needs the X drawable XID not the GLX one > > This never ceases to entertain. > > to mesa master, please give it a try. Thanks. Just pulled it. With this I've now got compositing to work. However, only to discover that performance is abysmal (and unfortunately I'm not overstating). Every animation seems to happen at about 10FPS; extremely skippy and uneven. So in other words, still totally unusable :-P Do devs really never test with KDE? I had the same problem, try to disable the function check. Nevertheless there still seems to be the bind_tex_image problem I posted on the mailing list (NULL pointer check after the pointer was dereferenced). (In reply to comment #6) > (In reply to comment #5) > > Ah, I see, this is the compatibility path for servers that don't send > > invalidate events. When dri2SwapBuffers call dri2Invalidate handle it passes > > the GLX drawable XID, but that's wrong, it should pass the X drawable XID. I > > just committed: > > > > commit 9da1c9da139327132dea57b18048a4eb386b6bad > > Author: Kristian Høgsberg <krh@bitplanet.net> > > Date: Wed Aug 4 08:43:08 2010 -0400 > > > > glx: dri2InvalidateBuffers() needs the X drawable XID not the GLX one > > > > This never ceases to entertain. > > > > to mesa master, please give it a try. > > Thanks. Just pulled it. With this I've now got compositing to work. However, > only to discover that performance is abysmal (and unfortunately I'm not > overstating). Every animation seems to happen at about 10FPS; extremely skippy > and uneven. Are you using the radeon dri driver for that recent pull too or just the new libGL? I think jglisse fixed the slowness recently, not sure. Either way, that's a different issue, closing this bug. thanks, Kristian (In reply to comment #7) > I had the same problem, try to disable the function check. Which function check? > Nevertheless there still seems to be the bind_tex_image problem I posted on the > mailing list (NULL pointer check after the pointer was dereferenced). Fixed. (In reply to comment #9) > (In reply to comment #7) > > I had the same problem, try to disable the function check. > > Which function check? In KWin 's settings you can enable an OpenGL function check for all enabled effects. If I enable it some animations become quite slow. I think I read an advice by a kde developer to try to disable it afterwards, too, so this might be a kde bug. (In reply to comment #7) > I had the same problem, try to disable the function check. > > Nevertheless there still seems to be the bind_tex_image problem I posted on the > mailing list (NULL pointer check after the pointer was dereferenced). Disabling VSync and the functionality check in Desktop Settings seems to fix the performance drop (fortunately, VSync is still applied even when disabling it in KDE.) While tweaking the settings, I've still got a few crashes in dri2InvalidateBuffers(), never exactly reproducible. But at least it kind of works now. Oh, did I mention that it would be a good idea if the devs would install KDE so that they can sanity check their commits from time to time? :-) |
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.