[Mesa-dev] VTK Offscreen Segfaults

Kevin H. Hobbs hobbsk at ohiou.edu
Fri Aug 6 08:17:17 PDT 2010


On 08/05/2010 06:50 PM, Brian Paul wrote:
> 
> Kevin, you seem to have identified two potential commits that caused
> trouble:
> 
> 91c37599f621a0ec498c0f0add14f16470ca852b
> and
> 36b3a8bd5a317ab297f44b19fd14c7e76ec2fc77
> 
> You should go to the head of the Mesa git tree and then undo each of
> those changes one by one (either git-revert or patch -R, etc) and
> re-test to be absolutely sure that one or the other is causing the
> segfault.
> 

reverting 91c37 results in :

Mesa: Mesa 7.9-devel DEBUG build Aug  6 2010 10:20:27
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
compression/decompression unavailable
Mesa: Initializing x86-64 optimizations
RenderingCxxTests: main/renderbuffer.c:1902: _mesa_add_renderbuffer:
Assertion `bufferName == BUFFER_DEPTH || bufferName == BUFFER_STENCIL ||
fb->Attachment[bufferName].Renderbuffer == ((void *)0)' failed.
/home/kevin/kitware/os_bisect_script.sh: line 40: 14313 Aborted
        (core dumped) /tmp/VTK_Build/bin/RenderingCxxTests TestOSConeCxx
-D /home/kevin/kitware/VTKData -T /tmp/VTK_Build/Testing/Temporary -V
Baseline/Rendering/TestOSConeCxx.png


I could not figure out how to revert ( without actually manually editing
) src/mesa/drivers/osmesa/osmesa.c so I reverted 36b3a 53a53 91c37 9b990
in reverse order as the were listed in :

git log src/mesa/drivers/osmesa/osmesa.c

The resulting build produced :

Mesa: Mesa 7.9-devel DEBUG build Aug  6 2010 10:59:59
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
compression/decompression unavailable
Mesa: Initializing x86-64 optimizations
Mesa: User error: GL_INVALID_ENUM in glGetTexGenfv(coord)
/home/kevin/kitware/os_bisect_script.sh: line 40: 30622 Segmentation
fault      (core dumped) /tmp/VTK_Build/bin/RenderingCxxTests
TestOSConeCxx -D /home/kevin/kitware/VTKData -T
/tmp/VTK_Build/Testing/Temporary -V Baseline/Rendering/TestOSConeCxx.png

Which looks a lot like the error I get with HEAD.

The gdb session for this is :

$ gdb /tmp/VTK_Build/bin/RenderingCxxTests
GNU gdb (GDB) Fedora (7.1-24.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:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/VTK_Build/bin/RenderingCxxTests...done.
(gdb) run TestOSConeCxx \
  -D /home/kevin/kitware/VTKData \
  -T /tmp/VTK_Build/Testing/Temporary \
  -V Baseline/Rendering/TestOSConeCxx.png
Starting program: /tmp/VTK_Build/bin/RenderingCxxTests TestOSConeCxx
-D /home/kevin/kitware/VTKData   -T /tmp/VTK_Build/Testing/Temporary
-V Baseline/Rendering/TestOSConeCxx.png
[Thread debugging using libthread_db enabled]
Mesa: Mesa 7.9-devel DEBUG build Aug  6 2010 10:59:59
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
compression/decompression unavailable
Mesa: Initializing x86-64 optimizations
Mesa: User error: GL_INVALID_ENUM in glGetTexGenfv(coord)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3c4ff79 in vbo_exec_EvalCoord1fv (u=0x203) at
vbo/vbo_exec_api.c:458
458        vbo_exec_EvalCoord1f( u[0] );
Missing separate debuginfos, use: debuginfo-install glibc-2.12-2.x86_64
libICE-1.0.6-2.fc13.x86_64 libSM-1.1.0-7.fc12.x86_64
libX11-1.3.1-3.fc13.x86_64 libXau-1.0.5-1.fc12.x86_64
libXext-1.1-2.fc13.x86_64 libXt-1.0.7-1.fc13.x86_64
libgcc-4.4.4-2.fc13.x86_64 libstdc++-4.4.4-2.fc13.x86_64
libuuid-2.17.2-5.fc13.x86_64 libxcb-1.5-1.fc13.x86_64
(gdb) bt
#0  0x00007ffff3c4ff79 in vbo_exec_EvalCoord1fv (u=0x203) at
vbo/vbo_exec_api.c:458
#1  0x00007ffff3c3ddc3 in neutral_EvalCoord1fv (v=0x203) at
main/vtxfmt_tmp.h:79
#2  0x00007ffff7b2f735 in vtkOpenGLRenderWindow::OpenGLInit (this=0x69d770)
    at /tmp/VTK/Rendering/vtkOpenGLRenderWindow.cxx:241
#3  0x00007ffff7b8ab02 in vtkXOpenGLRenderWindow::CreateOffScreenWindow
(this=0x69d770, width=300, height=300)
    at /tmp/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:951
#4  0x00007ffff7b8af81 in vtkXOpenGLRenderWindow::Initialize (this=0x69d770)
    at /tmp/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:1066
#5  0x00007ffff7b8b387 in vtkXOpenGLRenderWindow::Start (this=0x69d770)
    at /tmp/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:1185
#6  0x00007ffff7a51c51 in vtkRenderWindow::DoStereoRender
(this=0x69d770) at /tmp/VTK/Rendering/vtkRenderWindow.cxx:687
#7  0x00007ffff7a51c22 in vtkRenderWindow::DoFDRender (this=0x69d770) at
/tmp/VTK/Rendering/vtkRenderWindow.cxx:676
#8  0x00007ffff7a51622 in vtkRenderWindow::DoAARender (this=0x69d770) at
/tmp/VTK/Rendering/vtkRenderWindow.cxx:563
#9  0x00007ffff7a50a32 in vtkRenderWindow::Render (this=0x69d770) at
/tmp/VTK/Rendering/vtkRenderWindow.cxx:376
#10 0x00007ffff7b8dde7 in vtkXOpenGLRenderWindow::Render (this=0x69d770)
    at /tmp/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:1845
#11 0x00000000004326f6 in TestOSConeCxx (argc=7, argv=0x7fffffffdf20)
    at /tmp/VTK/Rendering/Testing/Cxx/TestOSConeCxx.cxx:68
#12 0x000000000041b6e3 in main (ac=7, av=0x7fffffffdf20)
    at /tmp/VTK_Build/Rendering/Testing/Cxx/RenderingCxxTests.cxx:454

Which looks really really similar to what I get from HEAD.

The valgrind output is :

$ valgrind /tmp/VTK_Build/bin/RenderingCxxTests \
>   TestOSConeCxx \
>   -D /home/kevin/kitware/VTKData \
>   -T /tmp/VTK_Build/Testing/Temporary \
>   -V Baseline/Rendering/TestOSConeCxx.png
==30635== Memcheck, a memory error detector
==30635== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==30635== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==30635== Command: /tmp/VTK_Build/bin/RenderingCxxTests TestOSConeCxx -D
/home/kevin/kitware/VTKData -T /tmp/VTK_Build/Testing/Temporary -V
Baseline/Rendering/TestOSConeCxx.png
==30635==
Mesa: Mesa 7.9-devel DEBUG build Aug  6 2010 10:59:59
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
compression/decompression unavailable
Mesa: Initializing x86-64 optimizations
Mesa: User error: GL_INVALID_VALUE in glPixelMapusv(mapsize)
==30635== Invalid read of size 1
==30635==    at 0x4A06A68: memcpy (mc_replace_strmem.c:497)
==30635==    by 0x8BC4387: _mesa_unpack_bitmap (image.c:1215)
==30635==    by 0x8BC40A5: _mesa_unpack_polygon_stipple (image.c:1140)
==30635==    by 0x8BF38D5: _mesa_polygon_stipple (polygon.c:202)
==30635==    by 0x8BF39EC: _mesa_PolygonStipple (polygon.c:222)
==30635==    by 0x503473E: vtkOpenGLRenderWindow::OpenGLInit()
(vtkOpenGLRenderWindow.cxx:242)
==30635==    by 0x508FB01:
vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)
(vtkXOpenGLRenderWindow.cxx:951)
==30635==    by 0x508FF80: vtkXOpenGLRenderWindow::Initialize()
(vtkXOpenGLRenderWindow.cxx:1066)
==30635==    by 0x5090386: vtkXOpenGLRenderWindow::Start()
(vtkXOpenGLRenderWindow.cxx:1185)
==30635==    by 0x4F56C50: vtkRenderWindow::DoStereoRender()
(vtkRenderWindow.cxx:687)
==30635==    by 0x4F56C21: vtkRenderWindow::DoFDRender()
(vtkRenderWindow.cxx:676)
==30635==    by 0x4F56621: vtkRenderWindow::DoAARender()
(vtkRenderWindow.cxx:563)
==30635==  Address 0xb74 is not stack'd, malloc'd or (recently) free'd
==30635==
==30635==
==30635== Process terminating with default action of signal 11 (SIGSEGV)
==30635==  Access not within mapped region at address 0xB74
==30635==    at 0x4A06A68: memcpy (mc_replace_strmem.c:497)
==30635==    by 0x8BC4387: _mesa_unpack_bitmap (image.c:1215)
==30635==    by 0x8BC40A5: _mesa_unpack_polygon_stipple (image.c:1140)
==30635==    by 0x8BF38D5: _mesa_polygon_stipple (polygon.c:202)
==30635==    by 0x8BF39EC: _mesa_PolygonStipple (polygon.c:222)
==30635==    by 0x503473E: vtkOpenGLRenderWindow::OpenGLInit()
(vtkOpenGLRenderWindow.cxx:242)
==30635==    by 0x508FB01:
vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)
(vtkXOpenGLRenderWindow.cxx:951)
==30635==    by 0x508FF80: vtkXOpenGLRenderWindow::Initialize()
(vtkXOpenGLRenderWindow.cxx:1066)
==30635==    by 0x5090386: vtkXOpenGLRenderWindow::Start()
(vtkXOpenGLRenderWindow.cxx:1185)
==30635==    by 0x4F56C50: vtkRenderWindow::DoStereoRender()
(vtkRenderWindow.cxx:687)
==30635==    by 0x4F56C21: vtkRenderWindow::DoFDRender()
(vtkRenderWindow.cxx:676)
==30635==    by 0x4F56621: vtkRenderWindow::DoAARender()
(vtkRenderWindow.cxx:563)
==30635==  If you believe this happened as a result of a stack
==30635==  overflow in your program's main thread (unlikely but
==30635==  possible), you can try to increase the size of the
==30635==  main thread stack using the --main-stacksize= flag.
==30635==  The main thread stack size used in this run was 10485760.
==30635== Invalid free() / delete / delete[]
==30635==    at 0x4A04D72: free (vg_replace_malloc.c:325)
==30635==    by 0x3E5052CAAA: ??? (in /lib64/libc-2.12.so)
==30635==    by 0x3E5052C641: ??? (in /lib64/libc-2.12.so)
==30635==    by 0x480162B: _vgnU_freeres (vg_preloaded.c:62)
==30635==    by 0x7FEFFF7CF: ???
==30635==    by 0x8BC4387: _mesa_unpack_bitmap (image.c:1215)
==30635==    by 0x8BC40A5: _mesa_unpack_polygon_stipple (image.c:1140)
==30635==    by 0x8BF38D5: _mesa_polygon_stipple (polygon.c:202)
==30635==    by 0x8BF39EC: _mesa_PolygonStipple (polygon.c:222)
==30635==    by 0x503473E: vtkOpenGLRenderWindow::OpenGLInit()
(vtkOpenGLRenderWindow.cxx:242)
==30635==    by 0x508FB01:
vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int)
(vtkXOpenGLRenderWindow.cxx:951)
==30635==    by 0x508FF80: vtkXOpenGLRenderWindow::Initialize()
(vtkXOpenGLRenderWindow.cxx:1066)
==30635==  Address 0x8679380 is not stack'd, malloc'd or (recently) free'd
==30635==
==30635==
==30635== HEAP SUMMARY:
==30635==     in use at exit: 8,929,004 bytes in 2,122 blocks
==30635==   total heap usage: 2,852 allocs, 731 frees, 9,017,302 bytes
allocated
==30635==
==30635== LEAK SUMMARY:
==30635==    definitely lost: 0 bytes in 0 blocks
==30635==    indirectly lost: 0 bytes in 0 blocks
==30635==      possibly lost: 0 bytes in 0 blocks
==30635==    still reachable: 8,929,004 bytes in 2,122 blocks
==30635==         suppressed: 0 bytes in 0 blocks
==30635== Rerun with --leak-check=full to see details of leaked memory
==30635==
==30635== For counts of detected and suppressed errors, rerun with: -v
==30635== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 6 from 6)
Segmentation fault (core dumped)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100806/c9f7874c/attachment.pgp>


More information about the mesa-dev mailing list