Bug 56474 - [NV30 gallium] supertuxkart segfaults on NV46
Summary: [NV30 gallium] supertuxkart segfaults on NV46
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: 9.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-28 01:18 UTC by Gabriele Giacone
Modified: 2013-09-02 05:28 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (61.64 KB, text/plain)
2012-10-28 01:18 UTC, Gabriele Giacone
Details
supertuxkart backtrace (4.50 KB, text/plain)
2012-10-28 01:19 UTC, Gabriele Giacone
Details

Description Gabriele Giacone 2012-10-28 01:18:56 UTC
Created attachment 69169 [details]
dmesg

Debian Wheezy i386
Mesa 9.0-1
libdrm 2.4.39-1
xserver-xorg-video-nouveau 1.0.3
Attached dmesg.

supertuxkart segfaults on Debian. Attached backtrace.

21:16 < joi> try: "up; print res"
21:17 < gg0> (gdb) up
21:17 < gg0> #1  nv30_vbo_validate (nv30=0x94c2658) at nv30_vbo.c:239
21:17 < gg0> 239I      PUSH_RESRC(push, NV30_3D(VTXBUF(i)), user ? 
             BUFCTX_VTXTMP : BUFCTX_VTXBUF,
21:17 < gg0> (gdb) print res
21:17 < gg0> $4 = (struct nv04_resource *) 0x0

21:35 < joi> gg0: try this one: http://bpaste.net/show/54017/

diff --git a/src/gallium/drivers/nv30/nv30_vbo.c b/src/gallium/drivers/nv30/nv30_vbo.c
index 128457f..94febc3 100644
--- a/src/gallium/drivers/nv30/nv30_vbo.c
+++ b/src/gallium/drivers/nv30/nv30_vbo.c
@@ -226,6 +226,8 @@ nv30_vbo_validate(struct nv30_context *nv30)
       user = (nv30->vbo_user & (1 << ve->vertex_buffer_index));
 
       res = nv04_resource(vb->buffer);
+      if (!res)
+         continue;
 
       if (nv30->vbo_fifo || unlikely(vb->stride == 0)) {
          if (!nv30->vbo_fifo)

With patch above, stk doesn't produce core anymore and Xorg freezes.

So far, mesa 8 is better. I could use it even if often it crashes during kart races. With mesa 9, races can't even start.

Further backtraces and system info available at http://bugs.debian.org/691292
Bug describes how it behaves on current Debian wheezy, Mesa 8.
Comment 1 Gabriele Giacone 2012-10-28 01:19:49 UTC
Created attachment 69170 [details]
supertuxkart backtrace
Comment 2 Gabriele Giacone 2012-10-28 01:22:30 UTC
22:34 < joi> gg0: does it work if you set NV30_SWTNL env var?
22:39 < gg0> joi: it started but seems stuck and it's taking 100% cpu
22:47 < joi> if I understand this code correctly, only SWTNL path handles 
             user buffers, so... someone needs to implement user buffers in 
             hw path or fix sw path (which is disabled by default and 
             probably broken)
Comment 3 Ilia Mirkin 2013-09-02 05:28:09 UTC
The crash appears to be gone with mesa git, tested on NV42 and NV44. (There _was_ a nasty little issue with the fragment shaders, but that's fixed in mesa git now.) Feel free to reopen if this still doesn't work for you.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.