Every GL apps crashes!

Bug #23861 reported by LGB [Gábor Lénárt]
6
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Invalid
High
Unassigned

Bug Description

Applications uses GL (glxinfo, glxgears, even hand compiled mplayer with gl or
gl2 video output driver or anything) crashes with illegal instruction. This
configuration worked well with Ubuntu 5.04 and started to not work (see bug
#21750
) with Matrox G400 DH. According bug #21750 it should be solved, but not
for me: instead of using slow sw rendering now it always crashes with illegal
instruction. I've submitted at a comment about this issue but the status of that
buf is already fixed. Which is not true for me at least. Since I don't know the
correct package which cause this, I report it as UNKNOWN.

It's a daily upgraded breezy system, as of write I'm writing this it should be
breezy stable 5.10, I guess :)

Linux oxygene 2.6.12-9-k7 #1 Mon Oct 10 13:47:52 BST 2005 i686 GNU/Linux

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 3
model name : AMD Duron(tm) processor
stepping : 0
cpu MHz : 603.362
cache size : 64 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips : 1191.93

0000:01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev
05) (prog-if 00 [VGA])
        Subsystem: Matrox Graphics, Inc. Millennium G400 Dual Head 16Mb
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (4000ns min, 8000ns max), Cache Line Size: 0x08 (32 bytes)
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at d8000000 (32-bit, prefetchable) [size=32M]
        Region 1: Memory at da000000 (32-bit, non-prefetchable) [size=16K]
        Region 2: Memory at db000000 (32-bit, non-prefetchable) [size=8M]
        Capabilities: [dc] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [f0] AGP version 2.0
                Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans-
64bit- FW- AGP3- Rate=x1,x2,x4
                Command: RQ=32 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x1

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Additional information:

lgb@oxygene:~$ glxinfo
name of display: :0.0
Illegal instruction

lgb@oxygene:~$ LIBGL_DEBUG=verbose glxinfo
name of display: :0.0
libGL: XF86DRIGetClientDriverName: 1.2.0 mga (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/mga_dri.so
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL error:
Can't open configuration file /etc/drirc: No such file or directory.
libGL error:
Can't open configuration file /home/lgb/.drirc: No such file or directory.
Illegal instruction

lgb@oxygene:~$ gdb glxinfo
[...]
run
Program received signal SIGILL, Illegal instruction.
[Switching to Thread -1213442368 (LWP 8407)]
0xb78ad4fc in mgaInitState () from /usr/lib/dri/mga_dri.so
(gdb) bt
#0 0xb78ad4fc in mgaInitState () from /usr/lib/dri/mga_dri.so
#1 0xb78ec93e in mgaFreeVB () from /usr/lib/dri/mga_dri.so
#2 0xb78a59a6 in __driUtilMessage () from /usr/lib/dri/mga_dri.so
#3 0xb7ed128a in __glFillMap2d () from /usr/lib/libGL.so.1
#4 0xb7ed1599 in glXCreateContext () from /usr/lib/libGL.so.1
#5 0x080490ee in ?? ()
#6 0x0804d008 in ?? ()

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Doing disassembly with gdb for the given address (0xb78fa4fc):

0xb78fa4f7 <mgaInitState+412>: fmul %st(1),%st
0xb78fa4f9 <mgaInitState+414>: fstps 0xfffffff0(%ebp)
0xb78fa4fc <mgaInitState+417>: movss 0xfffffff0(%ebp),%xmm0
0xb78fa501 <mgaInitState+422>: cvttss2si %xmm0,%edx
0xb78fa505 <mgaInitState+426>: movzbl %dl,%edx
0xb78fa508 <mgaInitState+429>: shl $0x10,%edx

So it's about "movss" instruction in /usr/lib/dri/mga_dri.so which belongs to
package libgl1-mesa-dri:

lgb@oxygene:~$ dpkg -S /usr/lib/dri/mga_dri.so
libgl1-mesa-dri: /usr/lib/dri/mga_dri.so

I don't exactly know what type of CPU can execute this opcode, so maybe my (AMD
Duron) can't. However this fact does need
some correction unless we don't want support hw accel. 3d gfx on this kind of
CPU, it the problem really caused by the
lacking support for this opcode on this CPU ...

Please help me!

Revision history for this message
Gert Kulyk (gkulyk) wrote :

I`m not sure, but it seems to me a Duplication of Bug #36222. I`ve got the same
problem (tested for tdfx and r128), the only resolution was to recompile drivers
from source, using a slightly modified linux-dri target without x86-optimization
(modifications were necessary, because makedepend resides in /usr/bin, not
/usr/X11R6/bin and DRI_DIR is /usr/lib/dri).

Revision history for this message
Daniel Stone (daniels) wrote :

This bug has been marked as a duplicate of bug 36222.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.