Summary: | OpenCL kernel segfaults during compilation on Clover RadeonSI with Pitcairn GPU | ||
---|---|---|---|
Product: | Mesa | Reporter: | Tyson Whitehead <twhitehead> |
Component: | Drivers/Gallium/radeonsi | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 99553 | ||
Attachments: |
Simplified kernel that causes compiler segfault
Simplified kernel that causes other (different) compiler segfault |
Description
Tyson Whitehead
2016-03-11 20:38:43 UTC
This compiles fine with trunk llvm. This backtrace looks sort of familiar, and I think it was fixed within the last 3 months Thanks for the heads-up Matt. I rebuilt the Debian package of mesa 11.2.0-rc3 against the Debian package of llvm 3.9~svn262954 and am pleased to say the simplified kernel I provided also now compiles for me. Unfortunately the full set of my OpenCL code I still causing a segfault. Pruning code reveals it is a different kernel though, and the backtrace is entirely different too, so progress is being made! I'm attaching a simplified version of this next kernel function. I would appreciate it if you could give it a go on your setup and see if it is segfaulting for you as well. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff3bad2a0 in (anonymous namespace)::JoinVals::pruneValues (this=this@entry=0x7fffffffb8a0, Other=..., EndPoints=..., changeInstrs=changeInstrs@entry=false) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2388 #0 0x00007ffff3bad2a0 in (anonymous namespace)::JoinVals::pruneValues (this=this@entry=0x7fffffffb8a0, Other=..., EndPoints=..., changeInstrs=changeInstrs@entry=false) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2388 #1 0x00007ffff3bb38da in (anonymous namespace)::RegisterCoalescer::joinSubRegRanges (this=0x2386a50, this=0x2386a50, CP=..., LaneMask=8, RRange=..., LRange=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2569 #2 (anonymous namespace)::RegisterCoalescer::mergeSubRangeInto (this=this@entry=0x2386a50, LI=..., ToMerge=..., LaneMask=8, CP=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2622 #3 0x00007ffff3bb4a31 in (anonymous namespace)::RegisterCoalescer::joinVirtRegs ( this=this@entry=0x2386a50, CP=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2688 #4 0x00007ffff3bb54a0 in (anonymous namespace)::RegisterCoalescer::joinIntervals (CP=..., this=0x2386a50) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2734 #5 (anonymous namespace)::RegisterCoalescer::joinCopy (Again=<synthetic pointer>, CopyMI=0xb991b0, this=0x2386a50) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:1449 #6 (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList (this=this@entry=0x2386a50, CurrList=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2805 #7 0x00007ffff3bb70bb in (anonymous namespace)::RegisterCoalescer::coalesceLocals ( this=this@entry=0x2386a50) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2930 #8 0x00007ffff3bb7da8 in (anonymous namespace)::RegisterCoalescer::joinAllIntervals (this=0x2386a50) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:2956 #9 (anonymous namespace)::RegisterCoalescer::runOnMachineFunction (this=0x2386a50, fn=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/CodeGen/RegisterCoalescer.cpp:3006 #10 0x00007ffff39cc752 in llvm::FPPassManager::runOnFunction (this=0x238d260, F=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/IR/LegacyPassManager.cpp:1550 #11 0x00007ffff39cca8b in llvm::FPPassManager::runOnModule (this=0x238d260, M=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/IR/LegacyPassManager.cpp:1571 #12 0x00007ffff39cc3cf in (anonymous namespace)::MPPassManager::runOnModule (M=..., this=0x238cfd0) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/IR/LegacyPassManager.cpp:1627 #13 llvm::legacy::PassManagerImpl::run (this=0xa96580, M=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/IR/LegacyPassManager.cpp:1730 #14 0x00007ffff39cc569 in llvm::legacy::PassManager::run (this=this@entry=0x7fffffffc6a0, M=...) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/IR/LegacyPassManager.cpp:1761 #15 0x00007ffff4507ef7 in LLVMTargetMachineEmit (T=T@entry=0x239f8a0, M=M@entry=0xb42a60, OS=..., codegen=codegen@entry=LLVMObjectFile, ErrorMessage=ErrorMessage@entry=0x7fffffffc948) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/Target/TargetMachineC.cpp:206 #16 0x00007ffff4508219 in LLVMTargetMachineEmitToMemoryBuffer (T=T@entry=0x239f8a0, M=M@entry=0xb42a60, codegen=codegen@entry=LLVMObjectFile, ErrorMessage=ErrorMessage@entry=0x7fffffffc948, OutMemBuf=OutMemBuf@entry=0x7fffffffcae8) at /tmp/buildd/llvm-toolchain-snapshot-3.9~svn262954/lib/Target/TargetMachineC.cpp:230 #17 0x00007ffff6605584 in (anonymous namespace)::emit_code (tm=tm@entry=0x239f8a0, mod=mod@entry=0xb42a60, file_type=file_type@entry=LLVMObjectFile, out_buffer=out_buffer@entry=0x7fffffffcae8, r_log="test2.c:36:31: warning: double precision constant requires cl_khr_fp64, casting to single precision\ntest2.c:44:45: warning: double precision constant requires cl_khr_fp64, casting to single precision\n"...) at ../../../../../src/gallium/state_trackers/clover/llvm/invocation.cpp:621 #18 0x00007ffff660a34e in (anonymous namespace)::compile_native ( r_log="test2.c:36:31: warning: double precision constant requires cl_khr_fp64, casting to single precision\ntest2.c:44:45: warning: double precision constant requires cl_khr_fp64, casting to single precision\n"..., dump_asm=<optimized out>, processor="pitcairn", triple="amdgcn--", mod=0xb42a60) at ../../../../../src/gallium/state_trackers/clover/llvm/invocation.cpp:679 #19 clover::compile_program_llvm ( source="#line 1 \"test2.c\"\n//", '-' <repeats 111 times>, "//\nfloat foldf3_mul(const float3 a) {\n ---Type <return> to continue, or q <return> to quit--- return a.s0*a.s1*a.s2;\n}\n\nint"..., headers=..., ir=<optimized out>, target="pitcairn-amdgcn--", opts="", r_log="test2.c:36:31: warning: double precision constant requires cl_khr_fp64, casting to single precision\ntest2.c:44:45: warning: double precision constant requires cl_khr_fp64, casting to single precision\n"...) at ../../../../../src/gallium/state_trackers/clover/llvm/invocation.cpp:890 #20 0x00007ffff6600290 in clover::program::build (this=this@entry=0xb4a500, devs=..., opts=opts@entry=0xb506d0 "", headers=std::vector of length 0, capacity 0) at ../../../../../src/gallium/state_trackers/clover/core/program.cpp:63 #21 0x00007ffff65e1a98 in clBuildProgram (d_prog=0xb4a508, num_devs=1, d_devs=0x7fffffffe1f0, p_opts=<optimized out>, pfn_notify=0x0, user_data=0x0) at ../../../../../src/gallium/state_trackers/clover/api/program.cpp:184 #22 0x000000000040460f in CL_programCreate (context=0xb38018, device=0x6486b8, codes=..., options=...) at clcc.c:1466 #23 0x0000000000406651 in Action_compile (settings=...) at clcc.c:1716 #24 0x0000000000406344 in main (argc=4, argv=0x7fffffffe508) at clcc.c:1658 I've got a good feeling if this one can get resolved as well the whole thing might just compile. Thanks! -Tyson Created attachment 122262 [details]
Simplified kernel that causes other (different) compiler segfault
Neither kernel crashes anymore here with Mesa git and LLVM git, but it's possible that stable versions also work. Please reopen if this is still an issue. |
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.