Bug 98789 - ./rasterizer/core/clip.h(429): ASSERT: numEmittedVerts <= 7
Summary: ./rasterizer/core/clip.h(429): ASSERT: numEmittedVerts <= 7
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/swr (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-19 22:39 UTC by Ilia Mirkin
Modified: 2019-09-18 18:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ilia Mirkin 2016-11-19 22:39:25 UTC
Looks like some stack stomping is preventing a full backtrace in gdb:

deqp/modules/gles2 $ KNOB_SINGLE_THREADED=1 DISPLAY=:0 GALLIUM_DRIVER=swr LIBGL_ALWAYS_SOFTWARE=1 LD_LIBRARY_PATH=/home/ilia/install/lib gdb --args ./deqp-gles2 --deqp-visibility=hidden --deqp-case=dEQP-GLES2.functional.shaders.invariance.highp.loop_2
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
Copyright (C) 2015 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./deqp-gles2...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/ilia/src/deqp/modules/gles2/deqp-gles2 --deqp-visibility=hidden --deqp-case=dEQP-GLES2.functional.shaders.invariance.highp.loop_2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
dEQP Core git-aa4099c48f58c93d951b64451ef87adb31fce406 (0xaa4099c4) starting..
  target implementation = 'X11 GLX'
SWR detected AVX2

Test case 'dEQP-GLES2.functional.shaders.invariance.highp.loop_2'..
Vertex shader compile time = 4.425000 ms
Fragment shader compile time = 0.368000 ms
Link time = 0.982000 ms
Vertex shader compile time = 0.653000 ms
Fragment shader compile time = 0.354000 ms
Link time = 0.886000 ms
vert shader  0x7ffff7fcf000
frag shader  0x7ffff7fcd000
vert shader  0x7ffff7fcb000
frag shader  0x7ffff7fc9000
fetch shader 0x7ffff7fc7000
vert shader  0x7ffff7fc5000
frag shader  0x7ffff7fc3000
./rasterizer/core/clip.h(429): ASSERT: numEmittedVerts <= 7
        ClipSimd
        Unexpected vertex count from clipper.

Program received signal SIGTRAP, Trace/breakpoint trap.
Clipper<3u>::ClipSimd(float __vector const&, float __vector const&, PA_STATE&, long long __vector const&, long long __vector const&) (this=0x7ffffffcfce0, 
    vPrimMask=..., vClipMask=..., pa=..., vPrimId=..., vViewportIdx=...)
    at ./rasterizer/core/clip.h:431
431                 uint32_t numEmittedPrims = GetNumPrims(clipTopology, numEmittedVerts);
(gdb) bt
#0  Clipper<3u>::ClipSimd(float __vector const&, float __vector const&, PA_STATE&, long long __vector const&, long long __vector const&) (this=0x7ffffffcfce0, 
    vPrimMask=..., vClipMask=..., pa=..., vPrimId=..., vViewportIdx=...)
    at ./rasterizer/core/clip.h:431
Backtrace stopped: Cannot access memory at address 0x7fffbf20cb0f

OTOH with valgrind I get this on exit:

./rasterizer/core/clip.h(429): ASSERT: numEmittedVerts <= 7
        ClipSimd
        Unexpected vertex count from clipper.
==9673== 
==9673== Process terminating with default action of signal 5 (SIGTRAP)
==9673==    at 0x10243787: Clipper<3u>::ClipSimd(float __vector(8) const&, float __vector(8) const&, PA_STATE&, long long __vector(4) const&, long long __vector(4) const&) (clip.h:431)
==9673==    by 0x1024101F: Clipper<3u>::ExecuteStage(PA_STATE&, simdvector*, unsigned int, long long __vector(4), long long __vector(4)) (clip.h:558)
==9673==    by 0x1023F6A0: ClipTriangles(DRAW_CONTEXT*, PA_STATE&, unsigned int, simdvector*, unsigned int, long long __vector(4), long long __vector(4)) (clip.cpp:187)
==9673==    by 0x10288CF7: void ProcessDraw<std::integral_constant<bool, false>, std::integral_constant<bool, false>, std::integral_constant<bool, false>, std::integral_constant<bool, false>, std::integral_constant<bool, false>, std::integral_constant<bool, true> >(SWR_CONTEXT*, DRAW_CONTEXT*, unsigned int, void*) (frontend.cpp:1370)
==9673==    by 0x106C6CB7: WorkOnFifoFE(SWR_CONTEXT*, unsigned int, unsigned int&) (threads.cpp:645)
==9673==    by 0xFF2E3B9: void QueueWork<true>(SWR_CONTEXT*) (api.cpp:214)
==9673==    by 0xFF2D82C: QueueDraw(SWR_CONTEXT*) (api.cpp:243)
==9673==    by 0xFF2C28E: DrawInstanced(void*, PRIMITIVE_TOPOLOGY, unsigned int, unsigned int, unsigned int, unsigned int) (api.cpp:1140)
==9673==    by 0xFF2C355: SwrDrawInstanced(void*, PRIMITIVE_TOPOLOGY, unsigned int, unsigned int, unsigned int, unsigned int) (api.cpp:1186)
==9673==    by 0xFF0B181: swr_draw_vbo(pipe_context*, pipe_draw_info const*) (swr_draw.cpp:212)
==9673==    by 0x9E95553: cso_draw_vbo (cso_context.c:1670)
==9673==    by 0x9CC704E: st_draw_vbo (st_draw.c:276)

Perhaps in combination with valgrind + gdbserver you can get a workable stack analysis.
Comment 1 GitLab Migration User 2019-09-18 18:24:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/186.


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.