Bug 23402 - Latest CVS leads to crash in sauerbraten
Latest CVS leads to crash in sauerbraten
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100
git
Other All
: medium normal
Assigned To: Default DRI bug account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-18 19:49 UTC by David Ronis
Modified: 2009-11-26 07:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace (16.59 KB, text/plain)
2009-08-19 15:59 UTC, David Ronis
Details
Xorg.log file corresponding to the backtrace just uploaded.. (33.75 KB, text/plain)
2009-08-19 16:01 UTC, David Ronis
Details
Second backtrace (different hang?) (24.60 KB, text/plain)
2009-08-19 18:15 UTC, David Ronis
Details
3rd backtrace (2.09 KB, text/plain)
2009-08-19 18:21 UTC, David Ronis
Details
Better backtrace (2.23 KB, text/plain)
2009-08-25 18:05 UTC, David Ronis
Details
Better backtrace, different crash (5.98 KB, text/plain)
2009-08-25 20:31 UTC, David Ronis
Details
This attachement is the result of kill -ABRT (program hung). (21.32 KB, text/plain)
2009-08-27 16:03 UTC, David Ronis
Details
Crash backtrace (6.36 KB, text/plain)
2009-08-27 16:04 UTC, David Ronis
Details
Backtrace after make clean; this one SIGSEGV's (5.92 KB, text/plain)
2009-09-03 19:41 UTC, David Ronis
Details
Backtrace (SIGSEGV) (6.06 KB, text/plain)
2009-09-14 19:24 UTC, David Ronis
Details
Valgrind log file (52.25 KB, text/plain)
2009-09-16 18:29 UTC, David Ronis
Details
Backtrace has changed slightly (6.19 KB, text/plain)
2009-09-27 10:26 UTC, David Ronis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Ronis 2009-08-18 19:49:17 UTC
I follow xorg's git master branch on my laptop (with a radeon 9100 card).   The video game sauerbraten no longer works reliably.   Basically,  I get sigsegv's and most recently hangs.   I ran under valgrind 
(admittedly not with sources compiled with -g) and get:

{montroll:2} valgrind sauerbraten_unix 
==29300== Memcheck, a memory error detector.
==29300== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==29300== Using LibVEX rev 1884, a library for dynamic binary translation.
==29300== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==29300== Using valgrind-3.4.1, a dynamic binary instrumentation framework.
==29300== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==29300== For more details, rerun with: -v
==29300== 
Using home directory: /home/ronis/.sauerbraten
init: sdl
init: net
init: game
init: video: mode
init: video: misc
init: gl
Renderer: Mesa DRI R200 (RS300 5835) 20090101 AGP 8x x86/MMX/SSE2 TCL (Tungsten Graphics, Inc.)
Driver: 1.3 Mesa 7.6-devel
WARNING: No framebuffer object support. (reflective water may be slow)
WARNING: No occlusion query support! (large maps may be SLOW)
WARNING: No shader support! Using fixed-function fallback. (no fancy visuals for you)
Rendering using the OpenGL fixed-function path.
init: console
init: gl: effects
init: world
init: sound
init: cfg
init: mainloop
read map packages/base/dust2.ogz (0.6 seconds)
dust2 by viruz, thanks to drakker (rework), finn (a bit help) and penguins (skybox)
game mode is DMSP
try to beat your best score so far: 528
bo(0xc410008, 65536) is mapped (-1) can't valide it.
validated 0xc410008 [0x4B3C8000, 0x4B41E000]
*********************************WARN_ONCE*********************************
File radeon_dma.c function radeonReleaseDmaRegions line 302
Leaking dma buffer object!
***************************************************************************
bo(0xbb2fa60, 65536) is mapped (-1) can't valide it.
validated 0xbb2fa60 [0x4BEC8000, 0x4BFC8000]
bo(0x8ddf690, 65536) is mapped (-1) can't valide it.
validated 0x8ddf690 [0x49374000, 0x49474000]
bo(0xbb2fbc0, 65536) is mapped (-1) can't valide it.
validated 0xbb2fbc0 [0x4A16D000, 0x4A1C3000]
bo(0x8de8a10, 65536) is mapped (-1) can't valide it.
validated 0x8de8a10 [0xD2642000, 0xD2652000]
bo(0x8e17988, 65536) is mapped (-1) can't valide it.
validated 0x8e17988 [0x49374000, 0x49474000]
bo(0x8deb988, 65536) is mapped (-1) can't valide it.
validated 0x8deb988 [0x4BEC8000, 0x4BFC8000]
bo(0xbb2ef60, 65536) is mapped (-1) can't valide it.
validated 0xbb2ef60 [0x4B574000, 0x4B58A000]
bo(0xbb2efc0, 65536) is mapped (-1) can't valide it.
validated 0xbb2efc0 [0xD23F2000, 0xD2402000]
Aborted (core dumped)
Comment 1 Pauli 2009-08-18 23:59:26 UTC
You should updated your tree andtest again. It should have been fixed already before you finished compiling updates :)
Comment 2 David Ronis 2009-08-19 07:15:39 UTC
I just rebuilt/reinstalled the git master's for mesa and xf86-video-ati; the problem remains.   By "tree" did you have something else in mind?

Comment 3 Pauli 2009-08-19 09:34:38 UTC
mesa and drm only packages that affect opengl so that was wht I referred to. That map validation bug was found and fixed in mesa for other applications so ifthere is still crash it is something else. It would help if you provide backtrace with debug symbols installed.

After installing debug symbols:
1. ulimit -c unlimited  (enable core dumps to be written out)
2. run sauerbraten
3. gdb --core=core sauerbraten
4. bt full
5. press enter as long as you return back to gdb prompt
6. quit

Then save the output to file and attach it to this bug report, please.

Also xorg.log might have useful info.

Thanks.
Comment 4 David Ronis 2009-08-19 15:59:51 UTC
Created attachment 28798 [details]
Backtrace

This is a backtrace made after rebuilding saurbraten, mesa and drm with "-O0 -g".   The program hung and I had to exit X (ctrl-alt-f2) and kill it with -ABRT.
Comment 5 David Ronis 2009-08-19 16:01:17 UTC
Created attachment 28799 [details]
Xorg.log file corresponding to the backtrace just uploaded..

As requested: xorg.log
Comment 6 David Ronis 2009-08-19 18:15:10 UTC
Created attachment 28802 [details]
Second backtrace (different hang?)

Here's another backtrace created from a different hang (haven't checked to see how it differs)
Comment 7 David Ronis 2009-08-19 18:21:16 UTC
Created attachment 28803 [details]
3rd backtrace

This time the program core'd with a SIGSEGV.
Comment 8 ajax at nwnk dot net 2009-08-24 12:33:15 UTC
Mass version move, cvs -> git
Comment 9 David Ronis 2009-08-25 18:05:27 UTC
Created attachment 28910 [details]
Better backtrace

This is a case the SIGSEGV'd.  I'd updated/rebuilt drm and mesa as well (I'd messsed up the -g flags earlier).  Looks like there is a null pointer issue in radeon_bo_unref.
Comment 10 David Ronis 2009-08-25 20:31:17 UTC
Created attachment 28911 [details]
Better backtrace, different crash

Here's a better backtrace, different from 28910
Comment 11 Pauli 2009-08-27 15:43:29 UTC
(In reply to comment #10)
> Created an attachment (id=28911) [details]
> Better backtrace, different crash
> 
> Here's a better backtrace, different from 28910
> 

Does the latest mesa version work now for you? Swtcl was fixed yesterday that seems like cause of your 2nd problem.
Comment 12 David Ronis 2009-08-27 16:03:56 UTC
Created attachment 28965 [details]
This attachement is the result of kill -ABRT (program hung).

I just did:

git pull --rebase
./autogen.sh --prefix=/usr
make
sudo make install

in mesa and reran sauerbrauten.  The program hung or crashed, depending on which game I selected.  This attachment corresponds to the hang.  I'll upload the crash next.
Comment 13 David Ronis 2009-08-27 16:04:25 UTC
Created attachment 28966 [details]
Crash backtrace
Comment 14 Nicolai Hähnle 2009-08-28 07:36:45 UTC
Try running make clean before rebuilding Mesa.
Comment 15 David Ronis 2009-09-03 19:41:44 UTC
Created attachment 29198 [details]
Backtrace after make clean; this one SIGSEGV's

I ran make clean before rebuilding.   If I understand the backtrace correctly, it looks like it's trying to dereference bo which is NULL in thread 1.  Also not I get the following message on the console:


*********************************WARN_ONCE*********************************
 line -1207660556nction ÃCÑ
Leaking dma buffer object!
***************************************************************************

which is garbled.
Comment 16 David Ronis 2009-09-14 19:24:41 UTC
Created attachment 29548 [details]
Backtrace (SIGSEGV)

Now I see 

*********************************WARN_ONCE*********************************
File radeon_dma.c function radeonReleaseDmaRegions line 345
Leaking dma buffer object!
***************************************************************************

on the console before SIGSEGV.   I've attached a copy of the backtrace, although, it probably equivalent to one's I've attached in the past.

I'm using tonight's git master drm and mesa (as well as xf-video-ati and xserver and related required modules).

P.S.,  can anybody reproduce this bug?  As I mentioned before, it looks like a null pointer dereference is the cause.
Comment 17 Pauli 2009-09-15 01:58:10 UTC
It doesn't reproduce with KMS and kernel memory manager. So if you want to test in your system yo ucan upgrade to 2.6.31 kernel and enable stagging drivers to build KMS support. You will need user-space driver support for KMS.

http://xorg.freedesktop.org/wiki/radeonBuildHowTo
Comment 18 David Ronis 2009-09-15 18:18:25 UTC
I tried setting up KMS as described in the wiki.  I'm not sure I was successful, but if so, there's no change with the bug.  Couple of things:

1.  I didn't activate any of the device specific staging drivers in the kernel (just the overall staging CONFIG_STAGING=y option).

2.  XOrg.0.log shows only one reference to KMS: 

(II) [KMS] drm report modesetting isn't supported.

Comment 19 David Ronis 2009-09-16 18:29:38 UTC
Created attachment 29611 [details]
Valgrind log file

I've run under valgrind --trace-children=yes (which is painful).  Perhaps this will help track down the bug.  There are several mesa related issues that show up.
Comment 20 David Ronis 2009-09-27 10:26:37 UTC
Created attachment 29887 [details]
Backtrace has changed slightly

The latest git master of mesa and/or drm seem to have changed the crash.   The backtrace is attached.
Comment 21 David Ronis 2009-11-24 19:44:45 UTC
I upgraded mesa today--there were several r200 fixes.  They seem to have fixed the problem.

Comment 22 Fabio Pedretti 2009-11-26 07:05:31 UTC
(In reply to comment #21)
> I upgraded mesa today--there were several r200 fixes.  They seem to have fixed
> the problem.
> 

Closing. See bug #25179 if you are still getting this:
*********************************WARN_ONCE*********************************
File radeon_dma.c function radeonReleaseDmaRegions line 302
Leaking dma buffer object!
***************************************************************************