Date: Wed, 08 Mar 2017 09:45:14 +0000 From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 217635] lang/beignet: crash in get_program_global_data() after 1.3.0 update Message-ID: <bug-217635-7141-kKUNuU6As7@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-217635-7141@https.bugs.freebsd.org/bugzilla/> References: <bug-217635-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=3D217635 --- Comment #1 from Jan Beich (mail not working) <jbeich@FreeBSD.org> --- Hmm, Beignet 1.3.0 also crashes after building with -DENABLE_OPENCL_20=3Don. (lldb) r Process 90871 launching Process 90871 launched: '/usr/local/bin/clinfo' (x86_64) 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=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 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_bu= ffer 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 Process 90871 stopped * thread #1, stop reason =3D signal SIGSEGV: invalid address (fault address: 0x20) frame #0: libdrm_intel.so.1`drm_intel_bo_set_softpin_offset(bo=3D0x0000000000000000, offset=3D34486792192) at intel_bufmgr.c:266 263 int 264 drm_intel_bo_set_softpin_offset(drm_intel_bo *bo, uint64_t offset) 265 { -> 266 if (bo->bufmgr->bo_set_softpin_offset) 267 return bo->bufmgr->bo_set_softpin_offset(bo, offset= ); 268 269 return -ENODEV; (lldb) bt * thread #1, stop reason =3D signal SIGSEGV: invalid address (fault address: 0x20) * frame #0: libdrm_intel.so.1`drm_intel_bo_set_softpin_offset(bo=3D0x0000000000000000, offset=3D34486792192) at intel_bufmgr.c:266 frame #1: libcl.so`get_program_global_data(prog=3D0x000000080126c1c0) at cl_program.c:227 frame #2: libcl.so`cl_program_build(p=3D0x000000080126c1c0, options=3D"= ") at cl_program.c:678 frame #3: libcl.so`clBuildProgram(program=3D0x000000080126c1c0, num_devices=3D1, device_list=3D0x00007fffffffe1d0, options=3D"", pfn_notify=3D0x0000000000000000, user_data=3D0x0000000000000000) at cl_api.= c:835 frame #4: libcl.so`cl_self_test(device=3D0x000000080168af30, atomic_in_l3_flag=3DSELF_TEST_PASS) at cl_device_id.c:852 frame #5: libcl.so`cl_get_device_ids(platform=3D0x0000000801687068, device_type=3D4294967295, num_entries=3D0, devices=3D0x0000000000000000, num_devices=3D0x0000000801300d10) at cl_device_id.c:907 frame #6: libcl.so`clGetDeviceIDs(platform=3D0x0000000801687068, device_type=3D4294967295, num_entries=3D0, devices=3D0x0000000000000000, num_devices=3D0x0000000801300d10) at cl_api_device_id.c:43 frame #7: libOpenCL.so.1`clGetDeviceIDs(platform=3D0x0000000801687068, device_type=3D4294967295, num_entries=3D0, devices=3D0x0000000000000000, num_devices=3D0x0000000801300d10) at ocl_icd_loader_gen.c:58 frame #8: clinfo`printPlatformInfo(p=3D0) at clinfo.c:459 frame #9: clinfo`main(argc=3D1, argv=3D0x00007fffffffe438) at clinfo.c:= 2676 frame #10: clinfo`_start(ap=3D<unavailable>, cleanup=3D<unavailable>) at crt1.c:72 $ valgrind --track-origins=3Dyes clinfo =3D=3D90907=3D=3D Memcheck, a memory error detector =3D=3D90907=3D=3D Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward = et al. =3D=3D90907=3D=3D Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyr= ight info =3D=3D90907=3D=3D Command: clinfo =3D=3D90907=3D=3D =3D=3D90907=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D90907=3D=3D at 0x6C26EEB: drm_intel_bufmgr_gem_init (intel_bufmgr_= gem.c:3746) =3D=3D90907=3D=3D by 0x5C47E9C: intel_driver_memman_init (intel_driver.c= :129) =3D=3D90907=3D=3D by 0x5C45F73: intel_driver_init (intel_driver.c:172) =3D=3D90907=3D=3D by 0x5C45F09: intel_driver_init_shared (intel_driver.c= :302) =3D=3D90907=3D=3D by 0x5C48185: intel_driver_open (intel_driver.c:226) =3D=3D90907=3D=3D by 0x5C47865: intel_get_device_id (intel_driver.c:430) =3D=3D90907=3D=3D by 0x5C47609: intel_setup_callbacks (intel_driver.c:10= 41) =3D=3D90907=3D=3D by 0x5C3AA10: (anonymous namespace)::OCLDriverCallBackInitializer::OCLDriverCallBackInitializer() (cl_driver.cpp:33) =3D=3D90907=3D=3D by 0x5C3A9EF: __cxx_global_var_init (cl_driver.cpp:38) =3D=3D90907=3D=3D by 0x5C3AA28: _GLOBAL__sub_I_cl_driver.cpp (cl_driver.= cpp:0) =3D=3D90907=3D=3D by 0x5C4AE51: __do_global_ctors_aux (in /usr/local/lib/beignet/libcl.so) =3D=3D90907=3D=3D by 0x5C0B74D: ??? (in /usr/local/lib/beignet/libcl.so) =3D=3D90907=3D=3D Uninitialised value was created by a stack allocation =3D=3D90907=3D=3D at 0x6C25140: drm_intel_bufmgr_gem_init (intel_bufmgr_= gem.c:3623) =3D=3D90907=3D=3D =3D=3D90907=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D90907=3D=3D at 0x6C27056: drm_intel_bufmgr_gem_init (intel_bufmgr_= gem.c:3778) =3D=3D90907=3D=3D by 0x5C47E9C: intel_driver_memman_init (intel_driver.c= :129) =3D=3D90907=3D=3D by 0x5C45F73: intel_driver_init (intel_driver.c:172) =3D=3D90907=3D=3D by 0x5C45F09: intel_driver_init_shared (intel_driver.c= :302) =3D=3D90907=3D=3D by 0x5C48185: intel_driver_open (intel_driver.c:226) =3D=3D90907=3D=3D by 0x5C47865: intel_get_device_id (intel_driver.c:430) =3D=3D90907=3D=3D by 0x5C47609: intel_setup_callbacks (intel_driver.c:10= 41) =3D=3D90907=3D=3D by 0x5C3AA10: (anonymous namespace)::OCLDriverCallBackInitializer::OCLDriverCallBackInitializer() (cl_driver.cpp:33) =3D=3D90907=3D=3D by 0x5C3A9EF: __cxx_global_var_init (cl_driver.cpp:38) =3D=3D90907=3D=3D by 0x5C3AA28: _GLOBAL__sub_I_cl_driver.cpp (cl_driver.= cpp:0) =3D=3D90907=3D=3D by 0x5C4AE51: __do_global_ctors_aux (in /usr/local/lib/beignet/libcl.so) =3D=3D90907=3D=3D by 0x5C0B74D: ??? (in /usr/local/lib/beignet/libcl.so) =3D=3D90907=3D=3D Uninitialised value was created by a stack allocation =3D=3D90907=3D=3D at 0x6C25140: drm_intel_bufmgr_gem_init (intel_bufmgr_= gem.c:3623) =3D=3D90907=3D=3D 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=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 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_bu= ffer 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 =3D=3D90907=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D90907=3D=3D at 0x9A0537E: clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x95D7CBA: gbe::buildModuleFromSource(char const*, llvm::Module**, llvm::LLVMContext*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char= >, std::__1::allocator<char> > > >&, unsigned long, char*, unsigned long*, unsigned int) (program.cpp:720) =3D=3D90907=3D=3D by 0x95C0E0B: gbe::programNewFromSource(unsigned int, = char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) =3D=3D90907=3D=3D by 0x5C1DA46: cl_program_build (cl_program.c:625) =3D=3D90907=3D=3D by 0x5C0E631: clBuildProgram (cl_api.c:835) =3D=3D90907=3D=3D by 0x5C31EF3: cl_self_test (cl_device_id.c:852) =3D=3D90907=3D=3D by 0x5C32179: cl_get_device_ids (cl_device_id.c:907) =3D=3D90907=3D=3D by 0x5C11362: clGetDeviceIDs (cl_api_device_id.c:43) =3D=3D90907=3D=3D by 0x4E38044: clGetDeviceIDs (ocl_icd_loader_gen.c:58) =3D=3D90907=3D=3D by 0x402310: printPlatformInfo (clinfo.c:459) =3D=3D90907=3D=3D by 0x40A34A: main (clinfo.c:2676) =3D=3D90907=3D=3D =3D=3D90907=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D90907=3D=3D at 0x9A15241: ParseLangArgs(clang::LangOptions&, llvm::opt::ArgList&, clang::InputKind,clang::TargetOptions const&, clang::PreprocessorOptions&, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A08095: clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x95D7CBA: gbe::buildModuleFromSource(char const*, llvm::Module**, llvm::LLVMContext*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char= >, std::__1::allocator<char> > > >&, unsigned long, char*, unsigned long*, unsigned int) (program.cpp:720) =3D=3D90907=3D=3D by 0x95C0E0B: gbe::programNewFromSource(unsigned int, = char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) =3D=3D90907=3D=3D by 0x5C1DA46: cl_program_build (cl_program.c:625) =3D=3D90907=3D=3D by 0x5C0E631: clBuildProgram (cl_api.c:835) =3D=3D90907=3D=3D by 0x5C31EF3: cl_self_test (cl_device_id.c:852) =3D=3D90907=3D=3D by 0x5C32179: cl_get_device_ids (cl_device_id.c:907) =3D=3D90907=3D=3D by 0x5C11362: clGetDeviceIDs (cl_api_device_id.c:43) =3D=3D90907=3D=3D by 0x4E38044: clGetDeviceIDs (ocl_icd_loader_gen.c:58) =3D=3D90907=3D=3D by 0x402310: printPlatformInfo (clinfo.c:459) =3D=3D90907=3D=3D by 0x40A34A: main (clinfo.c:2676) =3D=3D90907=3D=3D =3D=3D90907=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D90907=3D=3D at 0x9A16B6A: ParseLangArgs(clang::LangOptions&, llvm::opt::ArgList&, clang::InputKind,clang::TargetOptions const&, clang::PreprocessorOptions&, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A08095: clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x95D7CBA: gbe::buildModuleFromSource(char const*, llvm::Module**, llvm::LLVMContext*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char= >, std::__1::allocator<char> > > >&, unsigned long, char*, unsigned long*, unsigned int) (program.cpp:720) =3D=3D90907=3D=3D by 0x95C0E0B: gbe::programNewFromSource(unsigned int, = char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) =3D=3D90907=3D=3D by 0x5C1DA46: cl_program_build (cl_program.c:625) =3D=3D90907=3D=3D by 0x5C0E631: clBuildProgram (cl_api.c:835) =3D=3D90907=3D=3D by 0x5C31EF3: cl_self_test (cl_device_id.c:852) =3D=3D90907=3D=3D by 0x5C32179: cl_get_device_ids (cl_device_id.c:907) =3D=3D90907=3D=3D by 0x5C11362: clGetDeviceIDs (cl_api_device_id.c:43) =3D=3D90907=3D=3D by 0x4E38044: clGetDeviceIDs (ocl_icd_loader_gen.c:58) =3D=3D90907=3D=3D by 0x402310: printPlatformInfo (clinfo.c:459) =3D=3D90907=3D=3D by 0x40A34A: main (clinfo.c:2676) =3D=3D90907=3D=3D vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0xF6 0xC1 0x5D 0x= C3 0x31 vex amd64->IR: REX=3D0 REX.W=3D0 REX.R=3D0 REX.X=3D0 REX.B=3D0 vex amd64->IR: VEX=3D0 VEX.L=3D0 VEX.nVVVV=3D0x0 ESC=3D0F38 vex amd64->IR: PFX.66=3D1 PFX.F2=3D0 PFX.F3=3D0 =3D=3D90907=3D=3D valgrind: Unrecognised instruction at address 0xa7b77b2. =3D=3D90907=3D=3D at 0xA7B77B2: clang::TargetInfo::getLeastIntTypeByWidt= h(unsigned int, bool) const (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A47EBF: DefineLeastWidthIntType(unsigned int, bo= ol, clang::TargetInfo const&, clang::MacroBuilder&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A4508C: InitializePredefinedMacros(clang::Target= Info const&, clang::LangOptions const&, clang::FrontendOptions const&, clang::MacroBuild= er&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A41082: clang::InitializePreprocessor(clang::Pre= processor&, clang::PreprocessorOptions const&, clang::PCHContainerReader const&, clang::FrontendOptions const&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x99F06E1: clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A2B856: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x99F4034: clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x95D86F9: gbe::buildModuleFromSource(char const*, llvm::Module**, llvm::LLVMContext*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char= >, std::__1::allocator<char> > > >&, unsigned long, char*, unsigned long*, unsigned int) (program.cpp:763) =3D=3D90907=3D=3D by 0x95C0E0B: gbe::programNewFromSource(unsigned int, = char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) =3D=3D90907=3D=3D by 0x5C1DA46: cl_program_build (cl_program.c:625) =3D=3D90907=3D=3D by 0x5C0E631: clBuildProgram (cl_api.c:835) =3D=3D90907=3D=3D by 0x5C31EF3: cl_self_test (cl_device_id.c:852) =3D=3D90907=3D=3D Your program just tried to execute an instruction that Va= lgrind =3D=3D90907=3D=3D did not recognise. There are two possible reasons for th= is. =3D=3D90907=3D=3D 1. Your program has a bug and erroneously jumped to a non= -code =3D=3D90907=3D=3D location. If you are running Memcheck and you just sa= w a =3D=3D90907=3D=3D warning about a bad jump, it's probably your program's= fault. =3D=3D90907=3D=3D 2. The instruction is legitimate but Valgrind doesn't han= dle it, =3D=3D90907=3D=3D i.e. it's Valgrind's fault. If you think this is the = case or =3D=3D90907=3D=3D you are not sure, please let us know and we'll try to = fix it. =3D=3D90907=3D=3D Either way, Valgrind will now raise a SIGILL signal which= will =3D=3D90907=3D=3D probably kill your program. =3D=3D90907=3D=3D =3D=3D90907=3D=3D Process terminating with default action of signal 4 (SIGI= LL): dumping core =3D=3D90907=3D=3D Illegal opcode at address 0xA7B77B2 =3D=3D90907=3D=3D at 0xA7B77B2: clang::TargetInfo::getLeastIntTypeByWidt= h(unsigned int, bool) const (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A47EBF: DefineLeastWidthIntType(unsigned int, bo= ol, clang::TargetInfo const&, clang::MacroBuilder&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A4508C: InitializePredefinedMacros(clang::Target= Info const&, clang::LangOptions const&, clang::FrontendOptions const&, clang::MacroBuild= er&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A41082: clang::InitializePreprocessor(clang::Pre= processor&, clang::PreprocessorOptions const&, clang::PCHContainerReader const&, clang::FrontendOptions const&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x99F06E1: clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x9A2B856: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x99F4034: clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (in /usr/local/lib/beignet/libgbe.so) =3D=3D90907=3D=3D by 0x95D86F9: gbe::buildModuleFromSource(char const*, llvm::Module**, llvm::LLVMContext*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char= >, std::__1::allocator<char> > > >&, unsigned long, char*, unsigned long*, unsigned int) (program.cpp:763) =3D=3D90907=3D=3D by 0x95C0E0B: gbe::programNewFromSource(unsigned int, = char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) =3D=3D90907=3D=3D by 0x5C1DA46: cl_program_build (cl_program.c:625) =3D=3D90907=3D=3D by 0x5C0E631: clBuildProgram (cl_api.c:835) =3D=3D90907=3D=3D by 0x5C31EF3: cl_self_test (cl_device_id.c:852) =3D=3D90907=3D=3D =3D=3D90907=3D=3D HEAP SUMMARY: =3D=3D90907=3D=3D in use at exit: 1,752,551 bytes in 6,847 blocks =3D=3D90907=3D=3D total heap usage: 7,843 allocs, 996 frees, 2,107,960 by= tes allocated =3D=3D90907=3D=3D =3D=3D90907=3D=3D LEAK SUMMARY: =3D=3D90907=3D=3D definitely lost: 416 bytes in 17 blocks =3D=3D90907=3D=3D indirectly lost: 0 bytes in 0 blocks =3D=3D90907=3D=3D possibly lost: 0 bytes in 0 blocks =3D=3D90907=3D=3D still reachable: 1,752,135 bytes in 6,830 blocks =3D=3D90907=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D90907=3D=3D Rerun with --leak-check=3Dfull to see details of leaked m= emory =3D=3D90907=3D=3D =3D=3D90907=3D=3D For counts of detected and suppressed errors, rerun with:= -v =3D=3D90907=3D=3D ERROR SUMMARY: 15 errors from 5 contexts (suppressed: 0 f= rom 0) Killed --=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-217635-7141-kKUNuU6As7>