Bug 30694 - wincopy will crash on Gallium drivers when going to front buffer
Summary: wincopy will crash on Gallium drivers when going to front buffer
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2010-10-07 15:39 UTC by Kevin DeKorte
Modified: 2011-01-03 13:02 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Prevents the crash in wincopy when pressing f (472 bytes, patch)
2010-10-07 15:39 UTC, Kevin DeKorte
Details | Splinter Review

Description Kevin DeKorte 2010-10-07 15:39:29 UTC
Created attachment 39273 [details] [review]
Prevents the crash in wincopy when pressing f

Run wincopy and press the f key to go to front buffer

wincopy will crash, running gdb shows this..

gdb ./wincopy 
GNU gdb (GDB) Fedora (7.1-34.fc13)
Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/kdekorte/git/mesa/progs/xdemos/wincopy...done.
(gdb) run
Starting program: /home/kdekorte/git/mesa/progs/xdemos/wincopy 
[Thread debugging using libthread_db enabled]
Press Esc to exit
Press 'f' to toggle front/back buffer drawing
Drawing to GL_FRONT buffer

Program received signal SIGSEGV, Segmentation fault.
st_Clear (ctx=0xb34a40, mask=1) at state_tracker/st_cb_clear.c:479
479	            if (!strb->surface)
Missing separate debuginfos, use: debuginfo-install expat-2.0.1-10.fc13.x86_64 glibc-2.12.1-2.x86_64 libX11-1.3.1-3.fc13.x86_64 libXau-1.0.5-1.fc12.x86_64 libXdamage-1.1.2-2.fc13.x86_64 libXext-1.1.2-2.fc13.x86_64 libXfixes-4.0.4-2.fc13.x86_64 libXxf86vm-1.1.0-1.fc13.x86_64 libdrm-2.4.22-1.fc13.x86_64 libgcc-4.4.4-10.fc13.x86_64 libstdc++-4.4.4-10.fc13.x86_64 libtalloc-2.0.1-1.fc13.x86_64 libv4l-0.8.1-1.fc13.x86_64 libxcb-1.5-1.fc13.x86_64
(gdb) bt
#0  st_Clear (ctx=0xb34a40, mask=1) at state_tracker/st_cb_clear.c:479
#1  0x00000000004013f7 in Redraw () at wincopy.c:156
#2  0x0000000000401605 in EventLoop () at wincopy.c:232
#3  0x0000000000401987 in main (argc=<value optimized out>, 
    argv=<value optimized out>) at wincopy.c:312
(gdb) print strb
$1 = (struct st_renderbuffer *) 0x0
(gdb) quit

Patch to correct is attached
Comment 1 Kevin DeKorte 2010-10-07 15:54:35 UTC
Tested with r600g, color tiling is off and application is xdemos/wincopy
Comment 2 Kevin DeKorte 2010-10-13 08:42:52 UTC
Pressing F still crashes git c3ed27ec76c5456412122d7e654a2e298409cc88
Comment 3 Kevin DeKorte 2010-12-21 10:04:13 UTC
bug still present in git fa62cf7450595b3d99259b5a212df301ca711d4b

and patch still seems to correct it.
Comment 4 Alex Deucher 2010-12-21 10:40:01 UTC
Looks like a core mesa issue.
Comment 5 Kevin DeKorte 2010-12-23 07:32:59 UTC
Alex, are you sure this is core mesa issue as the code does not crash on my intel based machine.
Comment 6 Alex Deucher 2010-12-23 07:36:16 UTC
(In reply to comment #5)
> Alex, are you sure this is core mesa issue as the code does not crash on my
> intel based machine.

It looks like a gallium state tracker bug.  The Intel drivers don't use gallium.
Comment 7 Vinson Lee 2010-12-23 09:28:41 UTC
mesa: aedbf05d31c1a8d7d3c2742524abf2db2422b2fe (master)

swrast - ok
softpipe - crash
llvmpipe - crash
Comment 8 Brian Paul 2011-01-03 13:02:16 UTC
Fixed with commit efbd33aff93d875af95d40db018b7911a3f87d02

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.