Bug 50776 - Arithmetic exception and segfault in mga_dri.o
Arithmetic exception and segfault in mga_dri.o
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: XFree86 (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-02 20:36 EDT by Alexei Podtelezhnikov
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-07 16:21:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexei Podtelezhnikov 2001-08-02 20:36:05 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.3-12 i686)

Description of problem:
The following is the gbd output of a segmentation fault inside mga_dri.o
The program "VMD" tries to use DRI but fails. Aparently the driver fails.
 

[apodtele@chemcca18 ~]$ source /usr/local/bin/vmd
[1] 5834
[apodtele@chemcca18 ~]$ gdb /usr/local/lib/vmd/vmd_LINUX
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 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 "i386-redhat-linux"...
(gdb) run
Starting program: /usr/local/lib/vmd/vmd_LINUX
[New Thread 1024 (LWP 5839)]

Info) vmd for LINUX, version 1.7 (August 2, 2001)
Info) VMD WWW Page:  http://www.ks.uiuc.edu/Research/vmd/
Info) Please email all comments and bug reports to vmd@ks.uiuc.edu
Info) The authors request that any published work which utilizes
Info) VMD please include the following reference:
Info)    Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
Info)    Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
Info) -------------------------------------------------------------
Info) Multithreading available, 1 CPU detected.
Info) Stereo in a window is NOT available.

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 1024 (LWP 5839)]
0x40607697 in gl_test_os_katmai_exception_support ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
(gdb) where
#0  0x40607697 in gl_test_os_katmai_exception_support ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#1  0x4060739c in check_os_katmai_support ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#2  0x406074ff in gl_init_all_x86_transform_asm ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#3  0x4060602b in gl_init_transformation ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#4  0x4052f10e in one_time_init () from
/usr/X11R6/lib/modules/dri/mga_dri.so
#5  0x4053131f in _mesa_initialize_context ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#6  0x40531639 in gl_create_context ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#7  0x4050479b in driMesaCreateContext ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#8  0x40065bd9 in CreateContext () at eval.c:41
#9  0x40065cf8 in glXCreateContext () at eval.c:41
#10 0x0807458f in OpenGLDisplayDevice::open_window () at eval.c:41
#11 0x00000023 in __strtol_internal (nptr=0x4 <Address 0x4 out of bounds>,
    endptr=0xf800, base=2016, group=31) at eval.c:36

How reproducible:
Always

Steps to Reproduce:
1. Get vmd source and compile it. Or just get OpenGL dynamic binary.
2.  Fire it up
3.
	

Actual Results:  Segmentatio fault (core dumped) 
It happens inside mga_dri.o which is documanted by gdb.

Expected Results:  normal fast operation

Additional info:

I have XFree86-4.0.3-24 and Mesa-3.4.2-2
Comment 1 Mike A. Harris 2001-08-03 02:45:13 EDT
Please cut 'n' paste a gdb backtrace of the coredump.

Comment 2 Alexei Podtelezhnikov 2001-08-03 15:31:04 EDT
Is this what you need? 

[apodtele@chemcca18 ~/debug]$ gdb /usr/local/lib/vmd/vmd_LINUX core
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 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 "i386-redhat-linux"...
Core was generated by `/usr/local/lib/vmd/vmd_LINUX'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/X11R6/lib/libGL.so.1...done.
Loaded symbols for /usr/X11R6/lib/libGL.so.1
Reading symbols from /usr/X11R6/lib/libGLU.so.1...done.
Loaded symbols for /usr/X11R6/lib/libGLU.so.1
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /lib/i686/libpthread.so.0...done.

warning: Unable to set global thread event mask: generic error
[New Thread 1024 (LWP 6635)]
Error while reading shared library symbols:
Cannot enable thread event reporting for Thread 1024 (LWP 6635): generic error
Reading symbols from /usr/lib/libtk.so...done.
Loaded symbols for /usr/lib/libtk.so
Reading symbols from /usr/lib/libtcl.so...done.
Loaded symbols for /usr/lib/libtcl.so
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/X11R6/lib/modules/dri/mga_dri.so...done.
Loaded symbols for /usr/X11R6/lib/modules/dri/mga_dri.so
---Type <return> to continue, or q <return> to quit---
#0  0x40504068 in driMesaBindContext ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
(gdb) where
#0  0x40504068 in driMesaBindContext ()
   from /usr/X11R6/lib/modules/dri/mga_dri.so
#1  0x40068a50 in glXMakeCurrent () at eval.c:41
#2  0x080747f9 in OpenGLDisplayDevice::open_window () at eval.c:41
#3  0x0819ae40 in ?? () at eval.c:41
(gdb)
Comment 3 Alexei Podtelezhnikov 2001-08-03 20:51:10 EDT
Okey, all this is similar to bug 41592. Probably my indescriminate updates
from rawhide (XFree86-4.0.3-24 / Mesa-3.4.2-2) resulted in this 
incompatibility. Suprisingly Xscreensaver-3.32-3 still work.

Change it to DUP, I guess
Comment 4 Mike A. Harris 2001-08-04 03:16:59 EDT
Take the core file, and do:

gdb --core core
bt

Post the results.
Comment 5 Alexei Podtelezhnikov 2001-08-07 16:21:43 EDT
[apodtele@chemcca18 ~/debug]$ gdb --core core
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 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 "i386-redhat-linux".
Core was generated by `/usr/local/lib/vmd/vmd_LINUX'.
Program terminated with signal 11, Segmentation fault.
#0  0x40504068 in ?? ()
(gdb) bt
#0  0x40504068 in ?? ()
#1  0x40068a50 in ?? ()
#2  0x080747f9 in ?? ()
#3  0x0819ae40 in ?? ()

Sorry, I guess there is not much info here. 
The problem occurs with XFree86-4.0.3-24 and Mesa-3.4.2-[1,2],
It does not show up on vanilla 7.1.
Comment 6 Mike A. Harris 2001-08-08 01:04:39 EDT
The core file was not caused by X crashing, the core file is from the
application itself crashing.  This is a bug in the application.

The officially released and supported XFree86 and Mesa work as you say,
so I do not see a bug.  Either way, it there is a bug in the application
if it SEGV's.
Comment 7 Alexei Podtelezhnikov 2001-08-13 16:00:33 EDT
No X didn't crash, the application crashed after failing to initialize DRI, I
guess. Again vanilla 7.1 doesn;t have this problem.
Mike, the problem is in the unofficial updates from
ftp://people.redhat.com/mharris only. I hope that future errata won't be affected.

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