Menu

#424 MGA hang under heavy texture load

open
nobody
MGA OpenGL (56)
5
2002-04-19
2002-04-19
No

I am now able to reliably reproduce this hang on my
hardware. I will include instructions for producing it
and some brief analysis that I have done.

To do this test and collect useful data, you will have
to edit lib/GL/mesa/src/drv/mga/mgacontext.h and remove
the line

#define MGA_DEBUG 0

This should be line 266.

I am testing using v1.31 of Quake 3, and can cause the
hang using the 'four' demo. To use this demo with
v1.31, you must do the following:

cd /usr/local/games/quake3/baseq3/
unzip pak6.pk3 four.dm_66
mkdir demos
mv four.dm_66 demos/four.dm_67

I then created a simple cfg file to repeatedly play the
demo in a loop:

timedemo 1
set demoloop "demo four; set nextdemo vstr demoloop:
vstr demoloop

The following configuration file (I call it
"ultramax_stencilshadows.cfg") was also used:

set com_hunkMegs "80"
set com_maxfps "0"
set com_blood "1"
set r_allowExtensions "1"
set r_ext_compressed_textures "0"
set r_ext_gamma_control "1"
set r_ext_multitexture "1"
set r_ext_compiled_vertex_array "1"
set r_ext_texture_env_add "1"
set r_texturebits "0"
set r_colorbits "0"
set r_stereo "0"
set r_depthbits "0"
set r_overBrightBits "1"
set r_fullscreen "1"
set r_ignoreFastPath "0"
set r_finish "0"
set r_swapInterval "0"
set r_facePlaneCull "1"
set r_railWidth "16"
set r_railCoreWidth "6"
set r_railSegmentLength "32"
set r_primitives "0"
set cg_brassTime "2500"
set cg_drawCrosshair "4"
set cg_drawCrosshairNames "1"
set cg_marks "1"
set r_picmip "0"
set r_roundImagesDown "0"
set r_detailtextures "1"
set r_simpleMipMaps "0"
set r_textureMode "GL_LINEAR_MIPMAP_LINEAR"
set r_stencilbits "8"
set cg_shadows "2"
set r_vertexLight "0"set r_dynamiclight "1"
set r_dlightBacks "0"
set r_subdivisions "1"
set r_lodCurveError "2000"
set r_lodbias "0"
set r_flares "1"
set r_fastsky "0"
set r_drawSun "1"

The X server was run in 640x480 w/24-bit color (you
*must* use 24-bit). My card is only a 16MB card, so
setting the X server to this low resolution is a must.

BEFORE YOU RUN THIS TEST, BACK-UP YOUR q3config.cfg! I
*STRONGLY* suggest that this test be run from a remote
login (i.e., using ssh or telnet). Your display WILL
HANG, and you will HAVE TO REBOOT. Sorry for all the
yelling. I just don't want anyone to miss this stuff. :)

To start the test, put the two .cfg files in
~/.q3a/baseq3/. Then do the following.

cd /usr/local/games/quake3
gdb quake3.x86

From the gdb prompt, do:

(gdb) r +exec ultramax_stencilshadows.cfg +exec \
fourloop.cfg > quake.out 2>&1

When gdb stops on the SSE detection signal, do the
following:

(gdb) set MGA_DEBUG 0x10
(gdb) continue

Eventually, Quake should terminate and your screen will
hang. X will be at ~98% CPU. You can kill X, but you
won't be able to restart it. Reboot time!

I am including the last 100 or so lines of the
quake.out file that I generated. As always, I can try
other things if some master of G400 hardware has any
suggestions. :)

--- BEGIN quake.out ---
dma_buffer now: buf idx: 12 size: 65536 used: 0 addr
0x478da000
finished getbuffer
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDBlendFunc
FLUSH_BATCH in mgaDDUpdateHwState
FLUSH_BATCH in mgaDDEnable
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDUpdateHwState
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDUpdateHwState
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDBlendFunc
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 52 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 52
dma_buffer now: buf idx: 52 size: 65536 used: 0 addr
0x47b5a000
finished getbuffer
FLUSH_BATCH in mgaDDEnable
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDUpdateHwState
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDUpdateHwState
FLUSH_BATCH in mgaDDBindTexture
FLUSH_BATCH in mgaDDEnable
FLUSH_BATCH in mgaDDBlendFunc
FLUSH_BATCH in mgaDDColorMask
FLUSH_BATCH in mgaDDEnable
FLUSH_BATCH in mgaDDStencilFunc
FLUSH_BATCH in mgaDDCullFaceFrontFace
FLUSH_BATCH in mgaDDStencilOp
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 14 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 14
dma_buffer now: buf idx: 14 size: 65536 used: 0 addr
0x478fa000
finished getbuffer
FLUSH_BATCH in mgaDDCullFaceFrontFace
FLUSH_BATCH in mgaDDStencilOp
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 23 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 23
dma_buffer now: buf idx: 23 size: 65536 used: 0 addr
0x4798a000
finished getbuffer
FLUSH_BATCH in mgaDDColorMask
FLUSH_BATCH in mgaDDColorMask
FLUSH_BATCH in mgaDDCullFaceFrontFace
FLUSH_BATCH in mgaDDStencilOp
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 42 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 42
dma_buffer now: buf idx: 42 size: 65536 used: 0 addr
0x47aba000
finished getbuffer
FLUSH_BATCH in mgaDDCullFaceFrontFace
FLUSH_BATCH in mgaDDStencilOp
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 115 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 115
dma_buffer now: buf idx: 115 size: 65536 used: 0 addr
0x47f4a000
finished getbuffer
FLUSH_BATCH in mgaDDColorMask
FLUSH_BATCH in mgaDDColorMask
FLUSH_BATCH in mgaDDCullFaceFrontFace
FLUSH_BATCH in mgaDDStencilOp
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 30 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 30
dma_buffer now: buf idx: 30 size: 65536 used: 0 addr
0x479fa000
finished getbuffer
FLUSH_BATCH in mgaDDCullFaceFrontFace
FLUSH_BATCH in mgaDDStencilOp
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode 0 sz 65536 idx 20 count 1
drmDMA (get) returns size[0] 0x10000 idx[0] 20
dma_buffer now: buf idx: 20 size: 65536 used: 0 addr
0x4795a000
finished getbuffer
FLUSH_BATCH in mgaDDColorMask
FLUSH_BATCH in mgaDDStencilFunc
FLUSH_BATCH in mgaDDEnable
FLUSH_BATCH in mgaDDBlendFunc
FLUSH_BATCH in mgaDDDepthMask
FLUSH_BATCH in mgaDDUpdateHwState
Getting dma buffer
drmDMA (get) ctx 4 count 1 size 0x10000
retcode -11 sz 0 idx 0 count 0

flushmga_get_buffer_ioctl: flush ret=-16
--- END quake.out ---

Discussion

  • A Major

    A Major - 2002-04-21

    Logged In: YES
    user_id=15401

    I have created a similar log with FlightGear (CVS). The file
    can be found at

    http://andras.webhop.org/fgfs-output.bz2 .

    (warning: it is >400MB when unpacked).

    The crash did NOT happen when I turned textures off. Also,
    with logging enabled, the hang happened after a much longer
    time than with logging off, obviously due to the decreased
    graphics card load (the CPU couldn't supply the geometry
    quickly enough).

    Andras

     
  • Mart van de Wege

    Logged In: YES
    user_id=455122

    Is this a duplicate of the bug I filed (#522906)?

     

Log in to post a comment.