Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 124932 - GL applications and utilities segfault on startup
Summary: GL applications and utilities segfault on startup
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11
Version: 2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: David Lawrence
Depends On:
Blocks: FC2Update FC3Update
TreeView+ depends on / blocked
Reported: 2004-06-01 15:19 UTC by Dan Noe
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-04-15 10:47:23 UTC

Attachments (Terms of Use)
xorg.conf (deleted)
2004-06-05 03:06 UTC, Dan Noe
no flags Details
Xorg.0.log (deleted)
2004-06-05 03:08 UTC, Dan Noe
no flags Details

Description Dan Noe 2004-06-01 15:19:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040515 Firefox/0.8

Description of problem:
When starting GLX applications such as glxinfo, glxgears, or various
xscreensavers which utilize GL, the application immediately segfaults.
 This happens no matter which options are passed to the application,
and happens consistantly every time.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run glxinfo or glxgears

Actual Results:  dpn@corn:~$ glxgears
zsh: segmentation fault  glxgears
dpn@corn:~$ glxinfo
name of display: :0.0
zsh: segmentation fault  glxinfo

Expected Results:  Program starts normally

Additional info:

GDB backtrace: 

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread -150259840 (LWP 16771)]
0x00550934 in _mesa_test_os_sse_exception_support ()
   from /usr/X11R6/lib/modules/dri/
(gdb) cont
Program received signal SIGSEGV, Segmentation fault.
0x005555fd in driSetTextureSwapCounterLocation ()
   from /usr/X11R6/lib/modules/dri/
(gdb) bt
#0  0x005555fd in driSetTextureSwapCounterLocation ()
   from /usr/X11R6/lib/modules/dri/
#1  0x00556235 in r128CreateContext ()
   from /usr/X11R6/lib/modules/dri/
#2  0x00442490 in driCreateContext ()
   from /usr/X11R6/lib/modules/dri/
#3  0x00a2f5da in _glthread_SetTSD () from /usr/X11R6/lib/
#4  0x00a2f992 in _glthread_SetTSD () from /usr/X11R6/lib/
#5  0x00a2fc2e in glXCreateContext () from /usr/X11R6/lib/
#6  0x08048fda in ?? ()
#7  0x08849008 in ?? ()
#8  0x088520f8 in ?? ()
#9  0x00000000 in ?? ()

Comment 1 Mike A. Harris 2004-06-05 00:11:47 UTC
Attach the X server log and config file, so we can proceed.

Thanks in advance.

Comment 2 Dan Noe 2004-06-05 03:06:26 UTC
Created attachment 100888 [details]

Comment 3 Dan Noe 2004-06-05 03:08:50 UTC
Created attachment 100889 [details]

Comment 4 Daniel Thompson 2004-06-27 19:01:13 UTC
There is a NULL pointer check missing in r128CreateContext().

The call to driCreateTextureHeap() at r128_context.c:142 always
returns NULL when r128scrn->texSize[i] is zero. This texture size is
taken from the X server an is 0 (this can be seen from the logs).

(II) R128(0): Reserved 0 kb for textures at offset 0xfff000

driSetTextureSwapCounterLocation() will then dereference the pointer
it is given. I looked at the other DRI drivers to see what they do.
The same bug is present in the radeon driver. The other drivers do not
call driSetTextureSwapCounterLocation() and simply allow the NULL
pointer to exist in the rmesa structure.

As such I don't know what the most appropriate error recovery is. We
could either ignore the NULL pointer but avoid the call to
driSetTextureSwapCounterLocation() or we could return GL_FALSE and
abandon the attempt to initialize the card. I imagine 3D is pretty
useless without textures so in the absense of expert guidance I would
probably choose to return GL_FALSE.

Comment 6 Mike A. Harris 2005-04-15 10:47:23 UTC
Since this bugzilla report was filed, there have been several major
updates to the X Window System, which may resolve this issue.  Users
who have experienced this problem are encouraged to upgrade to the
latest version of Fedora Core, which can be obtained from:

If this issue turns out to still be reproduceable in the latest
version of Fedora Core, please file a bug report in the X.Org
bugzilla located at in the "xorg"

Once you've filed your bug report to X.Org, if you paste the new
bug URL here, Red Hat will continue to track the issue in the
centralized X.Org bug tracker, and will review any bug fixes that
become available for consideration in future updates.

Setting status to "CURRENTRELEASE".

Note You need to log in before you can comment on or make changes to this bug.