Bug 76044 - [i915g+llvm] commit "gallium: Use C11 thread abstractions." breaks memento by conspiracy
Summary: [i915g+llvm] commit "gallium: Use C11 thread abstractions." breaks memento by...
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/i915g (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-11 21:37 UTC by Christopher Egert
Modified: 2019-09-18 19:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Christopher Egert 2014-03-11 21:37:46 UTC
This commit breaks the intro memento by conspiracy (http://www.pouet.net/prod.php?which=24472).

Backtrace with git-3330dec:

glretrace: i915_prim_vbuf.c:477: draw_arrays_fallback: Assertion `0' failed.

Program received signal SIGABRT, Aborted.
0xb7fde424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fde424 in __kernel_vsyscall ()
#1  0xb7b664d6 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb7b69853 in __GI_abort () at abort.c:89
#3  0xb7b5f857 in __assert_fail_base (fmt=0xb7c9a554 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xb7693f8a "0", file=file@entry=0xb775f5b3 "i915_prim_vbuf.c", line=line@entry=477, 
    function=function@entry=0xb775f6ea <__PRETTY_FUNCTION__.9215> "draw_arrays_fallback") at assert.c:92
#4  0xb7b5f907 in __GI___assert_fail (assertion=assertion@entry=0xb7693f8a "0", file=file@entry=0xb775f5b3 "i915_prim_vbuf.c", line=477, function=0xb775f6ea <__PRETTY_FUNCTION__.9215> "draw_arrays_fallback") at assert.c:101
#5  0xb7638d65 in draw_arrays_fallback (nr=<optimized out>, start=<optimized out>, render=<optimized out>) at i915_prim_vbuf.c:477
#6  i915_vbuf_render_draw_arrays (render=0x83a0ff0, start=<optimized out>, nr=4092) at i915_prim_vbuf.c:503
#7  0xb7417cf1 in draw_pt_emit_linear (emit=0x83a1cc0, vert_info=0xbfffeff0, prim_info=0xbffff020) at draw/draw_pt_emit.c:258
#8  0xb75eee7d in emit (prim_info=0xbffff020, vert_info=0xbfffeff0, emit={void (const struct draw_prim_info *, const struct draw_vertex_info *, struct pt_emit *)} 0xb75eedd3 <llvm_middle_end_linear_run+883>) at draw/draw_pt_fetch_shade_pipeline_llvm.c:336
#9  llvm_pipeline_generic (in_prim_info=0xbffff020, fetch_info=0x0, middle=0x83ec5a0) at draw/draw_pt_fetch_shade_pipeline_llvm.c:468
#10 llvm_middle_end_linear_run (middle=0x83ec5a0, start=0, count=4092, prim_flags=0) at draw/draw_pt_fetch_shade_pipeline_llvm.c:532
#11 0xb74207a0 in vsplit_segment_simple_linear (vsplit=0x83d6f90, icount=4092, istart=0, flags=0) at draw/draw_pt_vsplit_tmp.h:240
#12 vsplit_run_linear (frontend=0x83d6f90, start=0, count=4092) at draw/draw_split_tmp.h:60
#13 0xb7416fb7 in draw_pt_arrays (draw=draw@entry=0x840c650, prim=7, start=0, count=count@entry=4092) at draw/draw_pt.c:149
#14 0xb741744a in draw_vbo (draw=0x840c650, info=0xbffff1d0, info@entry=0xbffff2c0) at draw/draw_pt.c:562
#15 0xb762c98e in i915_draw_vbo (pipe=0x83ebc38, info=0xbffff2c0) at i915_context.c:103
#16 0xb73ff258 in cso_draw_vbo (cso=0x8408db0, info=info@entry=0xbffff2c0) at cso_cache/cso_context.c:1400
#17 0xb72d7690 in st_draw_vbo (ctx=0x84b7390, prims=0x84052b4, nr_prims=2, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=4095, tfb_vertcount=0x0, indirect=0x0) at state_tracker/st_draw.c:286
#18 0xb72a238f in vbo_exec_vtx_flush (exec=exec@entry=0x8404f04, keepUnmapped=keepUnmapped@entry=0 '\000') at vbo/vbo_exec_draw.c:409
#19 0xb728d55c in vbo_exec_wrap_buffers (exec=0x8404f04) at vbo/vbo_exec_api.c:89
#20 vbo_exec_vtx_wrap (exec=0x8404f04) at vbo/vbo_exec_api.c:124
#21 0x080b5396 in _glVertex2f(float, float) ()
#22 0x080f9681 in retrace_glVertex2f(trace::Call&) ()
#23 0x0806ce8e in retrace::Retracer::retrace(trace::Call&) ()
#24 0x08063d37 in retrace::retraceCall(trace::Call*) ()
#25 0x08065994 in retrace::RelayRunner::runLeg(trace::Call*) ()
#26 0x0806587c in retrace::RelayRunner::runRace() ()
#27 0x08064053 in retrace::RelayRace::run() ()
#28 0x0806420f in retrace::mainLoop() ()
#29 0x08064985 in main ()


$ git bisect bad
fd33a6bcd7f1271e80332379131e82e00fe10586 is the first bad commit
commit fd33a6bcd7f1271e80332379131e82e00fe10586
Author: José Fonseca <jfonseca@vmware.com>
Date:   Fri Apr 26 08:03:33 2013 +0100

    gallium: Use C11 thread abstractions.
    
    Note that PIPE_ROUTINE now returns an int.
    
    Reviewed-by: Brian Paul <brianp@vmware.com>
    Reviewed-by: Chad Versace <chad.versace@linux.intel.com>

:040000 040000 dec5215b27af2e3f703e701e323dd5fdeba072eb a8b06eaa9746db86fa603a657a7b6a5dcd9e3633 M	src


Reverting this commit on top of master fixes this crash.
Comment 1 Christopher Egert 2014-03-11 22:57:42 UTC
Apitrace: http://deepserve.info/blar/cns%21mmnt.trace.xz
Comment 2 Jose Fonseca 2014-03-12 15:32:43 UTC
I don't have a i915 test system handy.

This doesn't happen with llvmpipe.

I've reviewed fd33a6bcd7f1271e80332379131e82e00fe10586 once again, and it looks alright -- I don't spot anything wrong -- it really should lead to pretty much the same code.

The crash too, is quite peculiar: i915 has no threading, so I don't see how this would change anything.

Could you double check this crash is not random?
Comment 3 Christopher Egert 2014-03-12 20:01:50 UTC
I've tried to revert this commit on master and the trace worked fine, after reverting the revert, it crashed again. I've also tried (with and without this commit) to build with -O0 to rule out compiler optimization bugs.

This is on Debian unstable with gcc (Debian 4.8.2-16) 4.8.2
Comment 4 GitLab Migration User 2019-09-18 19:30:51 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/663.


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.