Bug 59242

Summary: some mesa demos start to segfault after "nouveau: improve buffer transfers" on nv43
Product: Mesa Reporter: Andrew Randrianasulu <randrik>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: masao-takahashi
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Andrew Randrianasulu 2013-01-11 14:45:05 UTC
teapot, ray, dinoshade - all started  to segfault. Reverting mesa  commit 48a45ec24ae74c00d1487552e94d9f824a428f58 restores all demos back to working state.

bt full:

bash-4.2$ gdb ./dinoshade
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /mnt/tmp/mesa-demos-8.0.1/src/demos/dinoshade...done.
(gdb) run
Starting program: /mnt/tmp/mesa-demos-8.0.1/src/demos/dinoshade
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
 
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt full
#0  0x00000000 in ?? ()
No symbol table info available.
#1  0xb6785c26 in nouveau_transfer_write (nv=nv@entry=0x805cc70, tx=tx@entry=0x82fece0, offset=offset@entry=0, size=128) at nouveau_buffer.c:185
        buf = 0x8294668
        data = 0x8309740 "\002ћ"
        base = 0
        can_cb = 1 '\001'
#2  0xb67860a7 in nouveau_buffer_transfer_unmap (pipe=0x805cc70, transfer=0x82fece0) at nouveau_buffer.c:413
        buf = 0x8294668
#3  0xb69a2c8a in u_transfer_unmap_vtbl (pipe=0x805cc70, transfer=0x82fece0) at util/u_resource.c:51
No locals.
#4  0xb66c390d in pipe_buffer_unmap (transfer=<optimized out>, pipe=0x805cc70) at ../../../../src/gallium/auxiliary/util/u_inlines.h:290
No locals.
#5  nv30_fragprog_upload (nv30=0x805cc70) at nv30_fragprog.c:54
        nv = 0x805cc70
        fp = 0x829f968
        pipe = 0x805cc70
        transfer = 0x82fece0
        map = 0x805cc70
#6  nv30_fragprog_validate (nv30=0x805cc70) at nv30_fragprog.c:96
        push = 0x8078938
        eng3d = 0x808d2d8
        fp = 0x829f968
        upload = <optimized out>
        i = <optimized out>
#7  0xb66e3e65 in nv30_state_validate (nv30=nv30@entry=0x805cc70, hwtnl=hwtnl@entry=1 '\001') at nv30_state_validate.c:487
        screen = 0x8078800
        push = 0x8078938
        bctx = 0x805d340
        bref = <optimized out>
        validate = 0xb76a9d78 <hwtnl_validate_list+88>
#8  0xb66c629e in nv30_draw_vbo (pipe=0x805cc70, info=0xbfffef10) at nv30_vbo.c:563
        push = 0x8078938
#9  0xb69a4fb3 in u_vbuf_draw_vbo (mgr=0x81144e8, info=info@entry=0xbfffef10) at util/u_vbuf.c:1128
        pipe = 0x805cc70
        start_vertex = <optimized out>
        min_index = <optimized out>
        num_vertices = <optimized out>
        unroll_indices = 0 '\000'
        used_vb_mask = <optimized out>
        user_vb_mask = 0
        incompatible_vb_mask = 0
#10 0xb6951e8a in cso_draw_vbo (cso=0x8113d30, info=info@entry=0xbfffef10) at cso_cache/cso_context.c:1344
        vbuf = <optimized out>
#11 0xb683a026 in st_draw_vbo (ctx=0x80bf6c0, prims=0x8100238, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3,
    tfb_vertcount=0x0) at ../../src/mesa/state_tracker/st_draw.c:265
        st = 0x80fe798
        ibuffer = {index_size = 0, offset = 0, buffer = 0x0, user_buffer = 0x0}
        info = {indexed = 0 '\000', mode = 7, start = 0, count = 4, start_instance = 0, instance_count = 1, index_bias = 0, min_index = 0, max_index = 3,
          primitive_restart = 0 '\000', restart_index = 0, count_from_stream_output = 0x0}
        arrays = <optimized out>
        i = <optimized out>
#12 0xb68d9db2 in vbo_exec_vtx_flush (exec=exec@entry=0x80ffdec, keepUnmapped=1 '\001') at ../../src/mesa/vbo/vbo_exec_draw.c:400
        ctx = 0x80bf6c0
---Type <return> to continue, or q <return> to quit---
#13 0xb68cb0d2 in vbo_exec_FlushVertices_internal (exec=0x80ffdec, unmap=<optimized out>) at ../../src/mesa/vbo/vbo_exec_api.c:551
No locals.
#14 0xb68d747f in vbo_exec_FlushVertices (ctx=0x80bf6c0, flags=1) at ../../src/mesa/vbo/vbo_exec_api.c:1245
        exec = <optimized out>
#15 0xb688eef5 in enable_texture (ctx=ctx@entry=0x80bf6c0, state=<optimized out>, texBit=texBit@entry=256) at ../../src/mesa/main/enable.c:218
        newenabled = 0
#16 0xb6890100 in _mesa_set_enable (ctx=0x80bf6c0, cap=cap@entry=3553, state=state@entry=0 '\000') at ../../src/mesa/main/enable.c:678
No locals.
#17 0xb6891458 in _mesa_Disable (cap=3553) at ../../src/mesa/main/enable.c:1031
        ctx = <optimized out>
#18 0x0804a792 in drawFloor () at dinoshade.c:373
No locals.
#19 0x0804add6 in redraw () at dinoshade.c:489
        start = 0
#20 0xb7eced34 in ?? () from /usr/lib/libglut.so.3
No symbol table info available.
#21 0xb7ed27ff in fgEnumWindows () from /usr/lib/libglut.so.3
No symbol table info available.
#22 0xb7ecf20e in glutMainLoopEvent () from /usr/lib/libglut.so.3
No symbol table info available.
#23 0xb7ecfa57 in glutMainLoop () from /usr/lib/libglut.so.3
No symbol table info available.
#24 0x08049e0c in main (argc=1, argv=0xbffff464) at dinoshade.c:912
        i = <optimized out>
(gdb) quit
A debugging session is active.
 
        Inferior 1 [process 2963] will be killed.
 
Quit anyway? (y or n) y
-----------------
Comment 1 MASAO TAKAHASHI 2013-01-22 06:37:31 UTC
I have a same problem.
segfault position is the same location as this issue.

SIGSEGV is occurred in gnome-shell.
Comment 2 Andrew Randrianasulu 2013-02-04 05:00:48 UTC
Probably  fixed with  mesa  update. (currently at Mesa 9.2-devel (git-8a4d952))

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.