Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Mar 2017 09:21:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        x11@FreeBSD.org
Subject:   [Bug 213732] lang/beignet: crashes with some OpenCL apps
Message-ID:  <bug-213732-7141-CAj6pap9Ag@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-213732-7141@https.bugs.freebsd.org/bugzilla/>
References:  <bug-213732-7141@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213732

--- Comment #2 from Jan Beich (mail not working) <jbeich@FreeBSD.org> ---
I can still reproduce on drm-next from 2017-03-07 (be99d136554) and
beignet-1.3.0.

$ /usr/local/lib/piglit/bin/cl-api-enqueue-fill-image
## Test: clEnqueueFillImage
(/wrkdirs/usr/ports/graphics/piglit/work/piglit-ca5350b4056ae63a93c4c207087=
b7634873b2ce2/tests/cl/api/enqueue-fill-image.c)
##

# Running on:
#   Platform: Intel Gen OCL Driver
#   Device: Intel(R) HD Graphics Skylake Desktop GT2
#   OpenCL version: 1.2
Unresolved symbol: _Z22__gen_ocl_write_imagef14ocl_image2d_woDv2_iDv4_f
Aborting...
While deleting: <2 x i32> %
Use still stuck around after Def is destroyed:  tail call void
@_Z22__gen_ocl_write_imagef14ocl_image2d_woDv2_iDv4_f(%opencl.image2d_wo_t.0
addrspace(1)* %image, <2 x i32> <badref>, <4 x float> %pattern) #4
Assertion failed: (use_empty() && "Uses remain when a value is destroyed!"),
function ~Value, file
/tmp/a/overlay/ports/devel/llvm39/work/llvm-3.9.1.src/lib/IR/Value.cpp, line
85.

$ waifu2x-converter-cpp --processor 1 -i miku_CC_BY-NC_noisy.jpg
Unresolved symbol: _Z14__gen_ocl_fmaxff
Aborting...
[...]
Segmentation fault

* thread #1, stop reason =3D signal SIGSEGV: invalid address (fault address:
0xae40003)
    frame #0: 0x000000080dab7084
libgbe.so`llvm::LLVMContext::removeModule(llvm::Module*) + 4
libgbe.so`llvm::LLVMContext::removeModule:
->  0x80dab7084 <+4>: movq   (%rdi), %rdi
    0x80dab7087 <+7>: popq   %rbp
    0x80dab7088 <+8>: jmp    0x80db6a460               ;
llvm::SmallPtrSetImplBase::erase_imp(void const*)
    0x80dab708d:      nop
(lldb) bt
* thread #1, stop reason =3D signal SIGSEGV: invalid address (fault address:
0xae40003)
  * frame #0: 0x000000080dab7084
libgbe.so`llvm::LLVMContext::removeModule(llvm::Module*) + 4
    frame #1: 0x000000080dae8cbf libgbe.so`llvm::Module::~Module(void) + 31
    frame #2:
libgbe.so`gbe::Program::buildFromLLVMFile(this=3D0x000000080ae1fcb0,
fileName=3D0x0000000000000000, module=3D0x000000080af42c00,
error=3D0x00007fffffff4b48, optLevel=3D1) at program.cpp:177
    frame #3: libgbe.so`gbe::genProgramNewFromLLVM(deviceID=3D6418,
fileName=3D0x0000000000000000, module=3D0x000000080af42c00,
llvm_ctx=3D0x000000080ae4c460, asm_file_name=3D0x0000000000000000,
stringSize=3D1048576, err=3D"", errSize=3D0x000000080ae57368, optLevel=3D1,=
 options=3D"")
at gen_program.cpp:459
    frame #4: libgbe.so`gbe::programNewFromSource(deviceID=3D6418,
source=3D"https://github.com/tanakamura/waifu2x-converter-cpp/blob/master/s=
rc/modelHandler_OpenCL.cl",
stringSize=3D1048576, options=3D"", err=3D"", errSize=3D0x000000080ae57368)=
 at
program.cpp:1111
    frame #5: libcl.so`cl_program_build(p=3D0x000000080ae572a0, options=3D"=
") at
cl_program.c:625
    frame #6: libcl.so`clBuildProgram(program=3D0x000000080ae572a0,
num_devices=3D1, device_list=3D0x00007fffffff5648, options=3D"",
pfn_notify=3D0x0000000000000000, user_data=3D0x0000000000000000) at cl_api.=
c:835
    frame #7: libOpenCL.so.1`clBuildProgram(program=3D0x000000080ae572a0,
num_devices=3D1, device_list=3D0x00007fffffff5648, options=3D"",
pfn_notify=3D0x0000000000000000, user_data=3D0x0000000000000000) at
ocl_icd_loader_gen.c:387
    frame #8: libw2xc.so`w2xc::initOpenCL(c=3D0x000000080ae5f0a0,
env=3D0x000000080ae462f8, proc=3D0x000000080af29908) at modelHandler_OpenCL=
.cpp:361
    frame #9: libw2xc.so`::w2xconv_init_with_processor(processor_idx=3D1, n=
Job=3D8,
enable_log=3D1) at w2xconv.cpp:379
    frame #10: waifu2x-converter-cpp`main(argc=3D5, argv=3D0x00007fffffffe3=
e0) at
main.cpp:185
    frame #11: waifu2x-converter-cpp`_start(ap=3D<unavailable>,
cleanup=3D<unavailable>) at crt1.c:72

$ ffmpeg -hide_banner -i Samsung_UHD_7Wonders_of_the_World_Italy.ts -x264op=
ts
opencl:opencl-device=3D0 -codec:v libx264 -y /tmp/a.mp4
[mpegts @ 0x80ac54000] start time for stream 1 is not set in
estimate_timings_from_pts
[mpegts @ 0x80ac54000] Could not find codec parameters for stream 1 (Audio:=
 aac
([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' opt=
ions
Input #0, mpegts, from '/p/Samsung_UHD_7Wonders_of_the_World_Italy.ts':
  Duration: 00:02:12.28, start: 1.050044, bitrate: 51922 kb/s
  Program 1
    Stream #0:0[0x101]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024),
yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tb=
n,
59.94 tbc
    Stream #0:1[0x102](und): Audio: aac ([15][0][0][0] / 0x000F), 0 channel=
s,
fltp
[libx264 @ 0x80ac18d00] using SAR=3D1/1
[libx264 @ 0x80ac18d00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 =
AVX
FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x80ac18d00] OpenCL acceleration enabled with Intel Intel(R) HD
Graphics Skylake Desktop GT2
[libx264 @ 0x80ac18d00] Compiling OpenCL kernels...
Unresolved symbol: _Z23__gen_ocl_write_imageui14ocl_image2d_woDv2_iDv4_j
Aborting...
Unresolved symbol:
_Z22__gen_ocl_read_imageui14ocl_image2d_ro11ocl_samplerDv2_fj
Aborting...
[...]
Segmentation fault

* thread #1, stop reason =3D signal SIGSEGV: invalid address (fault address:
0x18)
    frame #0: libgbe.so`llvm::Value::getValueID(this=3D0x0000000000000000) =
const
at Value.h:425
   422    /// # the InstructionVal enumerator must be the highest valued
enumerator in
   423    ///   the ValueTy enum.
   424    unsigned getValueID() const {
-> 425      return SubclassID;
   426    }
   427
   428    /// \brief Return the raw optional flags value contained in this
value.
(lldb) bt
* thread #1, stop reason =3D signal SIGSEGV: invalid address (fault address:
0x18)
  * frame #0: libgbe.so`llvm::Value::getValueID(this=3D0x0000000000000000) =
const
at Value.h:425
    frame #1: libgbe.so`llvm::isa_impl<llvm::Instruction, llvm::Value,
void>::doit(Val=3D0x0000000000000000) at Value.h:734
    frame #2: libgbe.so`llvm::isa_impl_cl<llvm::Instruction, llvm::Value
const*>::doit(Val=3D0x0000000000000000) at Casting.h:96
    frame #3: libgbe.so`llvm::isa_impl_wrap<llvm::Instruction, llvm::Value
const*, llvm::Value const*>::doit(Val=3D0x00007fffffff6db0) at Casting.h:122
    frame #4: libgbe.so`llvm::isa_impl_wrap<llvm::Instruction, llvm::Value*
const, llvm::Value const*>::doit(Val=3D0x00007fffffff6df8) at Casting.h:112
    frame #5: libgbe.so`bool llvm::isa<llvm::Instruction,
llvm::Value*>(Val=3D0x00007fffffff6df8) at Casting.h:133
    frame #6: libgbe.so`llvm::cast_retty<llvm::Instruction,
llvm::Value*>::ret_type llvm::dyn_cast<llvm::Instruction,
llvm::Value>(Val=3D0x0000000000000000) at Casting.h:298
    frame #7:
libgbe.so`gbe::Scalarize::scalarizeExtract(this=3D0x000000080ac5c7c0,
extr=3D0x000000080b3517e0) at llvm_scalarize.cpp:824
    frame #8: libgbe.so`gbe::Scalarize::scalarize(this=3D0x000000080ac5c7c0,
inst=3D0x000000080b3517e0) at llvm_scalarize.cpp:517
    frame #9: libgbe.so`gbe::Scalarize::runOnFunction(this=3D0x000000080ac5=
c7c0,
F=3D0x000000080ba39848)at llvm_scalarize.cpp:905
    frame #10: 0x0000000850ec799c
libgbe.so`llvm::FPPassManager::runOnFunction(llvm::Function&) + 540
    frame #11: 0x0000000850cb06b4 libgbe.so`(anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) + 1412
    frame #12: 0x0000000850ec815c
libgbe.so`llvm::legacy::PassManagerImpl::run(llvm::Module&) + 988
    frame #13: libgbe.so`gbe::llvmToGen(unit=3D0x000000080dba6780,
fileName=3D0x0000000000000000, module=3D0x000000080aff5300, optLevel=3D1,
strictMath=3Dtrue, profiling=3D0, errors=3D0x00007fffffff9748) at llvm_to_g=
en.cpp:409
    frame #14:
libgbe.so`gbe::Program::buildFromLLVMFile(this=3D0x000000080adeb150,
fileName=3D0x0000000000000000, module=3D0x000000080aff5f00,
error=3D0x00007fffffff9748, optLevel=3D1) at program.cpp:146
    frame #15: libgbe.so`gbe::genProgramNewFromLLVM(deviceID=3D6418,
fileName=3D0x0000000000000000, module=3D0x000000080aff5f00,
llvm_ctx=3D0x000000080ac44568, asm_file_name=3D0x0000000000000000,
stringSize=3D1048576, err=3D"", errSize=3D0x000000080acd7fa8, optLevel=3D1,=
 options=3D"")
at gen_program.cpp:459
    frame #16: libgbe.so`gbe::programNewFromSource(deviceID=3D6418,
source=3D"http://sprunge.us/iSib", stringSize=3D1048576, options=3D"", err=
=3D"",
errSize=3D0x000000080acd7fa8)at program.cpp:1111
    frame #17: libcl.so`cl_program_build(p=3D0x000000080acd7ee0, options=3D=
"") at
cl_program.c:625
    frame #18: libcl.so`clBuildProgram(program=3D0x000000080acd7ee0,
num_devices=3D1, device_list=3D0x000000080dbbd6b8, options=3D"",
pfn_notify=3D0x0000000000000000, user_data=3D0x0000000000000000) at cl_api.=
c:835
    frame #19: libOpenCL.so.1`clBuildProgram(program=3D0x000000080acd7ee0,
num_devices=3D1, device_list=3D0x000000080dbbd6b8, options=3D"",
pfn_notify=3D0x0000000000000000, user_data=3D0x0000000000000000) at
ocl_icd_loader_gen.c:387
    frame #20: libx264.so.148`x264_opencl_compile(h=3D0x000000080dbb1720) at
opencl.c:277
    frame #21: libx264.so.148`x264_opencl_lookahead_alloc(h=3D0x000000080db=
b1720)
at opencl.c:363
    frame #22: libx264.so.148`x264_opencl_lookahead_init(h=3D0x000000080dbb=
1720)
at opencl.c:543
    frame #23: libx264.so.148`x264_encoder_open_148(param=3D0x000000080ac55=
208)
at encoder.c:1674
    frame #24: 0x000000080121e5ee libavcodec.so.57`X264_init + 4190
    frame #25: 0x00000008014b75d0 libavcodec.so.57`avcodec_open2 + 5072
    frame #26: 0x000000000022a498 ffmpeg`transcode + 4440
    frame #27: 0x0000000000228ac1 ffmpeg`main + 3169
    frame #28: ffmpeg`_start(ap=3D<unavailable>, cleanup=3D<unavailable>) at
crt1.c:72

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213732-7141-CAj6pap9Ag>