Bug 656308
Summary: | segfault in libGL when try to open dual screens (xlockmore, glxinfo, etc) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ian Collier <imc> | ||||||||
Component: | mesa | Assignee: | Adam Jackson <ajax> | ||||||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 15 | CC: | ajax | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2012-08-07 19:25:51 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Created attachment 462327 [details]
Backtrace from running the test program in gdb
Can you attach the full output from glxinfo? Created attachment 462372 [details]
output from glxinfo
When run on :0.1 it does this:
$ glxinfo
name of display: :0.1
Segmentation fault (core dumped)
visTemp at the time of the crash has screen=1 and visualid=0xf9
When run on :0.0 it produces more output (attached).
visTemp at the time of the crash has screen=0 and visualid=0x1b6
It looks in fact like both of these are invalid (xdpyinfo lists 0xf9 on screen 0 and 0x1b6 on screen 1. But the values used by the test program are valid visuals (0x103 on screen 0 and 0x1c0 on screen 1). So the two crashes may have different causes despite crashing at the same line of code.
No, my mistake - the two crashes are the same. The value of visTemp.screen when the program crashes is not the same as the screen that was asked for. In fact on line 88 of drisw_glx.c it's set to the default screen. Therefore, if the default screen is not the one that contains the requested visual, it will fail to find the visual and thus crash. So it turns out I've always been running the test program on :0.0. It asks for screen 0 visual 0x103, which succeeds, and then screen 1 visual 0x1c0, which crashes with visTemp.screen set to 0. But if I run it on :0.1, it crashes on the first request (for visual 0x103) with visTemp.screen set to 1. Think I finally found the issue here. If you don't mind testing a patch: http://lists.freedesktop.org/archives/mesa-dev/2012-January/016792.html Otherwise I'll just roll that into a mesa update once it's approved upstream. This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping |
Created attachment 462324 [details] A test program which demonstrates the crash Description of problem: xlock crashes when any GL mode is started. Also, glxinfo crashes in the same place, namely drisw_glx.c:94. This happens on a display with two logical screens. I am attaching a small test program which also exhibits the same behaviour. Version-Release number of selected component (if applicable): mesa-libGL-7.9-2.fc14.x86_64 How reproducible: 100% Steps to Reproduce: 1. Configure X to have two logical screens (i.e., not using XRANDR) 2. xlock -mode pipes 2b. glxinfo Actual results: Segmentation fault Expected results: No segmentation fault Additional info: In the test program (based on what xlock does to cause the crash), 0x103 and 0x1C0 are the visuals that xlock chooses (by what method I'm not sure). They exist as verified by running: $ xdpyinfo|egrep '0x103|0x1c0' visual id: 0x103 visual id: 0x1c0 on each screen, and as verified by the non-NULL return of XGetVisualInfo. However, the second call to glXMakeCurrent segfaults in the fuction XCreateDrawable because the call pdp->visinfo = XGetVisualInfo(dpy, visMask, &visTemp, &num_visuals); on line 91 of drisw_glx.c returns NULL and this is not checked before being dereferenced in line 94. (Whether the bug is that it returns NULL or that it isn't checked, I don't know.)