[Bug 220767] lang/beignet: hangs if consumer is not linked against libpthread after jemalloc 5.0.0 update
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun May 13 05:46:06 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220767
--- Comment #7 from Jan Beich <jbeich at FreeBSD.org> ---
(In reply to Jason Evans from comment #6)
Some facts:
- libpthread-stubs is an alias to -pthread since ports r437182
- beignet doesn't use libpthread-stubs
- mesa-libs uses libpthread-stubs
- beignet optionally uses mesa-libs for cl_khr_gl_sharing
- libcl (from beignet) is already linked against libpthread
- ocl-icd uses dlopen() to pull libcl
- clinfo isn't linked against libpthread
After disabling beignet -> mesa-libs dependency clinfo crashes if not passed
LD_PRELOAD=/lib/libthr.so.3:
$ clinfo
Number of platforms 1
Platform Name Intel Gen OCL Driver
Platform Vendor Intel
Platform Version OpenCL 2.0 beignet 1.3
Platform Profile FULL_PROFILE
Platform Extensions
cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer
cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator
cl_intel_subgroups cl_intel_subgroups_short
Platform Extensions function suffix Intel
[New LWP 101911 of process 86314]
Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000802463650 in clang::CodeGen::LValue::MakeAddr(clang::CodeGen::Address,
clang::QualType, clang::ASTContext&, clang::CodeGen::LValueBaseInfo,
clang::CodeGen::TBAAAccessInfo) () from /usr/local/lib/beignet//libgbe.so
(gdb) backtrace
#0 0x0000000802463650 in
clang::CodeGen::LValue::MakeAddr(clang::CodeGen::Address, clang::QualType,
clang::ASTContext&, clang::CodeGen::LValueBaseInfo,
clang::CodeGen::TBAAAccessInfo) () from /usr/local/lib/beignet//libgbe.so
#1 0x0000000802482287 in
clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*)
()
from /usr/local/lib/beignet//libgbe.so
#2 0x0000000802477b79 in
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) ()
from /usr/local/lib/beignet//libgbe.so
#3 0x000000080247fc13 in
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind) () from
/usr/local/lib/beignet//libgbe.so
#4 0x0000000802519c36 in clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) () from
/usr/local/lib/beignet//libgbe.so
#5 0x00000008025205fa in (anonymous
namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) ()
from /usr/local/lib/beignet//libgbe.so
#6 0x0000000802510258 in
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) ()
from /usr/local/lib/beignet//libgbe.so
#7 0x000000080247f015 in
clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(clang::Expr const*,
clang::CodeGen::LValueBaseInfo*, clang::CodeGen::TBAAAccessInfo*) () from
/usr/local/lib/beignet//libgbe.so
#8 0x0000000802480352 in
clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(clang::ArraySubscriptExpr
const*, bool) () from /usr/local/lib/beignet//libgbe.so
#9 0x0000000802477c51 in
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) ()
from /usr/local/lib/beignet//libgbe.so
#10 0x000000080247fc13 in
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind) () from
/usr/local/lib/beignet//libgbe.so
#11 0x0000000802519c36 in clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) () from
/usr/local/lib/beignet//libgbe.so
#12 0x00000008025205fa in (anonymous
namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) ()
from /usr/local/lib/beignet//libgbe.so
#13 0x0000000802515f57 in clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) () from
/usr/local/lib/beignet//libgbe.so
#14 0x0000000802510258 in
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) ()
from /usr/local/lib/beignet//libgbe.so
#15 0x0000000802477572 in
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) () from /usr/local/lib/beignet//libgbe.so
#16 0x0000000802477524 in
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) ()
from /usr/local/lib/beignet//libgbe.so
#17 0x00000008024c07b1 in clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>) () from
/usr/local/lib/beignet//libgbe.so
#18 0x00000008024c933f in
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) () from
/usr/local/lib/beignet//libgbe.so
#19 0x00000008026085d5 in
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) () from
/usr/local/lib/beignet//libgbe.so
#20 0x000000080261db9c in
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) () from /usr/local/lib/beignet//libgbe.so
#21 0x0000000802617c64 in
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) () from /usr/local/lib/beignet//libgbe.so
#22 0x0000000802620852 in
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) ()
from /usr/local/lib/beignet//libgbe.so
#23 0x00000008026f1d3f in (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ()
from /usr/local/lib/beignet//libgbe.so
#24 0x000000080243956a in
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) ()
from /usr/local/lib/beignet//libgbe.so
#25 0x000000080303ac22 in clang::ParseAST(clang::Sema&, bool, bool) () from
/usr/local/lib/beignet//libgbe.so
#26 0x000000080212f969 in clang::FrontendAction::Execute() () from
/usr/local/lib/beignet//libgbe.so
#27 0x00000008020e6ec1 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
from /usr/local/lib/beignet//libgbe.so
#28 0x0000000801c84381 in gbe::buildModuleFromSource (
source=0x8013392a0 "__kernel void self_test(__global int *buf) { __local
int tmp[3]; tmp[get_local_id(0)] = buf[get_local_id(0)];
barrier(CLK_LOCAL_MEM_FENCE); buf[get_global_id(0)] = tmp[2 - get_local_id(0)]
+ buf[g"..., out_module=0x7fffffffda70, llvm_ctx=0x800257440,
dumpLLVMFileName=..., dumpSPIRBinaryName=..., options=...,
stringSize=1048576, err=0x8078435c0 "", errSize=0x801339288,
oclVersion=120)
at backend/src/backend/program.cpp:735
#29 0x0000000801c7035d in gbe::programNewFromSource (deviceID=6418,
source=0x8013392a0 "__kernel void self_test(__global int *buf) { __local
int tmp[3]; tmp[get_local_id(0)] = buf[get_local_id(0)];
barrier(CLK_LOCAL_MEM_FENCE); buf[get_global_id(0)] = tmp[2 - get_local_id(0)]
+ buf[g"..., stringSize=1048576, options=0x8008addaa "", err=0x8078435c0 "",
errSize=0x801339288)
at backend/src/backend/program.cpp:1058
#30 0x00000008008d2b77 in cl_program_build (p=0x8013391c0, options=0x8008addaa
"") at src/cl_program.c:597
#31 0x00000008008c2cdd in clBuildProgram (program=0x8013391c0, num_devices=1,
device_list=0x7fffffffe040,
options=0x8008addaa "", pfn_notify=0x0, user_data=0x0) at src/cl_api.c:835
#32 0x00000008008e85d4 in cl_self_test (device=0x800945218
<intel_skl_gt2_device>,
atomic_in_l3_flag=SELF_TEST_PASS) at src/cl_device_id.c:900
#33 0x00000008008e885e in cl_get_device_ids (platform=0x800941238
<intel_platform_data>, device_type=4294967295,
num_entries=0, devices=0x0, num_devices=0x8033dbeb0) at
src/cl_device_id.c:955
#34 0x00000008008c6093 in clGetDeviceIDs (platform=0x800941238
<intel_platform_data>, device_type=4294967295,
num_entries=0, devices=0x0, num_devices=0x8033dbeb0) at
src/cl_api_device_id.c:43
#35 0x000000080025fada in clGetDeviceIDs_hid () from
/usr/local/lib/libOpenCL.so.1
#36 0x0000000000207071 in printPlatformInfo (p=0) at src/clinfo.c:459
#37 0x000000000020f0ed in main (argc=1, argv=0x7fffffffe278) at
src/clinfo.c:2676
Sorry, I didn't build devel/llvm* with debug symbols this time.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-x11
mailing list