Bug 84215

Summary: [BSW]Piglit shaders/glsl-fs-inline-explosion segfault
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED DUPLICATE QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description lu hua 2014-09-23 05:32:44 UTC
System Environment:
--------------------------
Platform: BSW
Libdrm:		(master)libdrm-2.4.56-29-g666788a6062de62aa0b3560760fbb0903167a319
Mesa:		(master)d69faf851fff5d41086c9940b2fcf2aa72c40e60
Xserver:(master)xorg-server-1.16.0-317-geaee6572beefca240c42791f9a3a6e547bedd410 
Xf86_video_intel:(master)2.99.916-52-g376037e6336dfc3b32c51b774ab8a80f64390e02
Libva:		(master)e0d25ece01e7aba819c910e98c4fb4706cdab055
Libva_intel_driver:(master)bc2e06ef0f89b264fe968fbff4f06e425385c3d8
Kernel:   (drm-intel-nightly)c5660b4ad395f1e34eacc22cf81c687edfc9c83c

Bug detailed description:
---------------------------
It segfault on BSW with mesa master branch, fails on BDW.
shaders_glsl-vs-inline-explosion also segfault.

output:
piglit: info: Address space limit = 18446744073709551615, max = 18446744073709551615
piglit: info: Resetting limit to 268435456
Segmentation fault (core dumped)

(gdb) bt
#0  ir_variable::ir_variable (this=0x0, type=0x7ffff40ad840 <glsl_type::_vec4_type>, name=0x625a458 "x", mode=ir_var_auto) at ../../src/glsl/ir.cpp:1548
#1  0x00007ffff3c8042c in ir_variable::clone (this=0x625a398, mem_ctx=0x696658, ht=0xd49de0) at ../../src/glsl/ir_clone.cpp:44
#2  0x00007ffff3cb1251 in ir_call::generate_inline (this=this@entry=0x9f66f8, next_ir=next_ir@entry=0x9f66f8) at ../../src/glsl/opt_function_inlining.cpp:160
#3  0x00007ffff3cb1543 in (anonymous namespace)::ir_function_inlining_visitor::visit_enter (this=0x7fffffffdd00, ir=0x9f66f8) at ../../src/glsl/opt_function_inlining.cpp:250
#4  0x00007ffff3c867db in ir_call::accept (this=0x9f66f8, v=0x7fffffffdd00) at ../../src/glsl/ir_hv_accept.cpp:323
#5  0x00007ffff3c861ce in visit_list_elements (v=v@entry=0x7fffffffdd00, l=l@entry=0x9f6690, statement_list=statement_list@entry=true) at ../../src/glsl/ir_hv_accept.cpp:55
#6  0x00007ffff3c86317 in ir_function_signature::accept (this=0x9f6648, v=0x7fffffffdd00) at ../../src/glsl/ir_hv_accept.cpp:115
#7  0x00007ffff3c861ce in visit_list_elements (v=v@entry=0x7fffffffdd00, l=l@entry=0x9f6600, statement_list=statement_list@entry=false) at ../../src/glsl/ir_hv_accept.cpp:55
#8  0x00007ffff3c8638e in ir_function::accept (this=0x9f65d8, v=0x7fffffffdd00) at ../../src/glsl/ir_hv_accept.cpp:127
#9  0x00007ffff3c861ce in visit_list_elements (v=v@entry=0x7fffffffdd00, l=l@entry=0x8756e8, statement_list=statement_list@entry=true) at ../../src/glsl/ir_hv_accept.cpp:55
#10 0x00007ffff3c8604a in ir_hierarchical_visitor::run (this=this@entry=0x7fffffffdd00, instructions=instructions@entry=0x8756e8)
    at ../../src/glsl/ir_hierarchical_visitor.cpp:355
#11 0x00007ffff3cb0fec in do_function_inlining (instructions=instructions@entry=0x8756e8) at ../../src/glsl/opt_function_inlining.cpp:72
#12 0x00007ffff3c79c50 in do_common_optimization (ir=0x8756e8, linked=linked@entry=true, uniform_locations_assigned=uniform_locations_assigned@entry=false,
    options=options@entry=0x7ffff39cfad8, native_integers=<optimized out>) at ../../src/glsl/glsl_parser_extras.cpp:1561
#13 0x00007ffff3c93e26 in link_shaders (ctx=ctx@entry=0x7ffff39cf038, prog=prog@entry=0x875998) at ../../src/glsl/linker.cpp:2680
#14 0x00007ffff3c0bf6b in _mesa_glsl_link_shader (ctx=0x7ffff39cf038, prog=0x875998) at ../../src/mesa/program/ir_to_mesa.cpp:3034
#15 0x00007ffff3b14d5a in link_program (ctx=0x7ffff39cf038, program=<optimized out>) at ../../src/mesa/main/shaderapi.c:915
#16 0x00007ffff7d1cbc8 in stub_glLinkProgram (program=3) at /GFX/Test/Piglit/piglit/tests/util/piglit-dispatch-gen.c:29058
#17 0x0000000000406530 in link_and_use_shaders () at /GFX/Test/Piglit/piglit/tests/shaders/shader_runner.c:829
#18 0x000000000040b261 in piglit_init (argc=2, argv=0x7fffffffe1b8) at /GFX/Test/Piglit/piglit/tests/shaders/shader_runner.c:2686
#19 0x00007ffff7d851dc in run_test (gl_fw=0x612010, argc=2, argv=0x7fffffffe1b8) at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:72
#20 0x00007ffff7d6a885 in piglit_gl_test_run (argc=2, argv=0x7fffffffe1b8, config=0x7fffffffe080) at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl.c:151
#21 0x0000000000404ef6 in main (argc=2, argv=0x7fffffffe1b8) at /GFX/Test/Piglit/piglit/tests/shaders/shader_runner.c:60

Reproduce steps:
-------------------------
1. xinit
2. bin/shader_runner tests/shaders/glsl-fs-inline-explosion.shader_test -auto
Comment 1 Eduardo Lima Mitev 2014-09-29 09:18:24 UTC
Running with a debug build shows a failing assertion instead:


warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
piglit: info: Address space limit = 18446744073709551615, max = 18446744073709551615
piglit: info: Resetting limit to 268435456
Unexpected error.

Program received signal SIGABRT, Aborted.
0x00007ffff5af6077 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff5af6077 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff5af7458 in __GI_abort () at abort.c:89
#2  0x00007ffff5aef196 in __assert_fail_base (fmt=0x7ffff5c258c8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff161bd94 "p != __null", 
    file=file@entry=0x7ffff1657d31 "../../src/glsl/list.h", line=line@entry=79, 
    function=function@entry=0x7ffff167e520 <_ZZN9exec_nodenwEmPvE19__PRETTY_FUNCTION__> "static void* exec_node::operator new(size_t, void*)") at assert.c:92
#3  0x00007ffff5aef242 in __GI___assert_fail (assertion=0x7ffff161bd94 "p != __null", file=0x7ffff1657d31 "../../src/glsl/list.h", line=79, 
    function=0x7ffff167e520 <_ZZN9exec_nodenwEmPvE19__PRETTY_FUNCTION__> "static void* exec_node::operator new(size_t, void*)") at assert.c:101
#4  0x00007ffff1205cd2 in exec_node::operator new (mem_ctx=0x6caba0, size=48) at ../../src/glsl/list.h:79
#5  0x00007ffff146bcab in operator new (mem_ctx=0x6caba0, size=48) at ../../src/glsl/ir_clone.cpp:189
#6  ir_dereference_variable::clone (this=<optimized out>, mem_ctx=0x6caba0, ht=<optimized out>) at ../../src/glsl/ir_clone.cpp:192
#7  0x00007ffff146bda6 in ir_assignment::clone (this=0x4a8b170, mem_ctx=0x6caba0, ht=0xdcb730) at ../../src/glsl/ir_clone.cpp:267
#8  0x00007ffff14a1a72 in ir_call::generate_inline (this=this@entry=0x872020, next_ir=next_ir@entry=0x872020) at ../../src/glsl/opt_function_inlining.cpp:160
#9  0x00007ffff14a1dc3 in (anonymous namespace)::ir_function_inlining_visitor::visit_enter (this=0x7fffffffd9b0, ir=0x872020) at ../../src/glsl/opt_function_inlining.cpp:250
#10 0x00007ffff147347b in ir_call::accept (this=0x872020, v=0x7fffffffd9b0) at ../../src/glsl/ir_hv_accept.cpp:323
#11 0x00007ffff1472e36 in visit_list_elements (v=v@entry=0x7fffffffd9b0, l=l@entry=0x871fb8, statement_list=statement_list@entry=true) at ../../src/glsl/ir_hv_accept.cpp:55
#12 0x00007ffff1472f97 in ir_function_signature::accept (this=0x871f70, v=0x7fffffffd9b0) at ../../src/glsl/ir_hv_accept.cpp:115
#13 0x00007ffff1472e36 in visit_list_elements (v=v@entry=0x7fffffffd9b0, l=l@entry=0xa51d98, statement_list=statement_list@entry=false) at ../../src/glsl/ir_hv_accept.cpp:55
#14 0x00007ffff147300e in ir_function::accept (this=0xa51d70, v=0x7fffffffd9b0) at ../../src/glsl/ir_hv_accept.cpp:127
#15 0x00007ffff1472e36 in visit_list_elements (v=v@entry=0x7fffffffd9b0, l=l@entry=0xa5d450, statement_list=statement_list@entry=true) at ../../src/glsl/ir_hv_accept.cpp:55
#16 0x00007ffff1472cba in ir_hierarchical_visitor::run (this=this@entry=0x7fffffffd9b0, instructions=instructions@entry=0xa5d450) at ../../src/glsl/ir_hierarchical_visitor.cpp:355
#17 0x00007ffff14a180c in do_function_inlining (instructions=instructions@entry=0xa5d450) at ../../src/glsl/opt_function_inlining.cpp:72
#18 0x00007ffff14643c0 in do_common_optimization (ir=0xa5d450, linked=<optimized out>, uniform_locations_assigned=<optimized out>, options=0x7ffff7fa9ae0, native_integers=<optimized out>)
    at ../../src/glsl/glsl_parser_extras.cpp:1561
#19 0x00007ffff148523a in link_shaders (ctx=0x5dc2, ctx@entry=0x7ffff7fa9040, prog=0xa67380) at ../../src/glsl/linker.cpp:2687
#20 0x00007ffff13f572b in _mesa_glsl_link_shader (ctx=0x7ffff7fa9040, prog=0xa67380) at ../../src/mesa/program/ir_to_mesa.cpp:3034
#21 0x00007ffff12f532a in link_program (ctx=0x7ffff7fa9040, program=<optimized out>) at ../../src/mesa/main/shaderapi.c:914
#22 0x00007ffff7affcbe in stub_glLinkProgram (program=3) at /opt/devel/piglit/tests/util/piglit-dispatch-gen.c:29058
#23 0x0000000000406514 in link_and_use_shaders () at /opt/devel/piglit/tests/shaders/shader_runner.c:829
#24 0x000000000040b26b in piglit_init (argc=2, argv=0x7fffffffde78) at /opt/devel/piglit/tests/shaders/shader_runner.c:2686
#25 0x00007ffff7b68212 in run_test (gl_fw=0x611010, argc=2, argv=0x7fffffffde78) at /opt/devel/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:72
#26 0x00007ffff7b4d8c5 in piglit_gl_test_run (argc=2, argv=0x7fffffffde78, config=0x7fffffffdd40) at /opt/devel/piglit/tests/util/piglit-framework-gl.c:151
#27 0x0000000000404ebc in main (argc=2, argv=0x7fffffffde78) at /opt/devel/piglit/tests/shaders/shader_runner.c:60
Comment 2 Ian Romanick 2014-09-29 16:41:33 UTC

*** This bug has been marked as a duplicate of bug 70920 ***

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.