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=217635 --- Comment #1 from Jan Beich (mail not working) <jbeich@FreeBSD.org> --- Hmm, Beignet 1.3.0 also crashes after building with -DENABLE_OPENCL_20=on. (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 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 Process 90871 stopped * thread #1, stop reason = signal SIGSEGV: invalid address (fault address: 0x20) frame #0: libdrm_intel.so.1`drm_intel_bo_set_softpin_offset(bo=0x0000000000000000, offset=34486792192) 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 = signal SIGSEGV: invalid address (fault address: 0x20) * frame #0: libdrm_intel.so.1`drm_intel_bo_set_softpin_offset(bo=0x0000000000000000, offset=34486792192) at intel_bufmgr.c:266 frame #1: libcl.so`get_program_global_data(prog=0x000000080126c1c0) at cl_program.c:227 frame #2: libcl.so`cl_program_build(p=0x000000080126c1c0, options="") at cl_program.c:678 frame #3: libcl.so`clBuildProgram(program=0x000000080126c1c0, num_devices=1, device_list=0x00007fffffffe1d0, options="", pfn_notify=0x0000000000000000, user_data=0x0000000000000000) at cl_api.c:835 frame #4: libcl.so`cl_self_test(device=0x000000080168af30, atomic_in_l3_flag=SELF_TEST_PASS) at cl_device_id.c:852 frame #5: libcl.so`cl_get_device_ids(platform=0x0000000801687068, device_type=4294967295, num_entries=0, devices=0x0000000000000000, num_devices=0x0000000801300d10) at cl_device_id.c:907 frame #6: libcl.so`clGetDeviceIDs(platform=0x0000000801687068, device_type=4294967295, num_entries=0, devices=0x0000000000000000, num_devices=0x0000000801300d10) at cl_api_device_id.c:43 frame #7: libOpenCL.so.1`clGetDeviceIDs(platform=0x0000000801687068, device_type=4294967295, num_entries=0, devices=0x0000000000000000, num_devices=0x0000000801300d10) at ocl_icd_loader_gen.c:58 frame #8: clinfo`printPlatformInfo(p=0) at clinfo.c:459 frame #9: clinfo`main(argc=1, argv=0x00007fffffffe438) at clinfo.c:2676 frame #10: clinfo`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:72 $ valgrind --track-origins=yes clinfo ==90907== Memcheck, a memory error detector ==90907== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==90907== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==90907== Command: clinfo ==90907== ==90907== Conditional jump or move depends on uninitialised value(s) ==90907== at 0x6C26EEB: drm_intel_bufmgr_gem_init (intel_bufmgr_gem.c:3746) ==90907== by 0x5C47E9C: intel_driver_memman_init (intel_driver.c:129) ==90907== by 0x5C45F73: intel_driver_init (intel_driver.c:172) ==90907== by 0x5C45F09: intel_driver_init_shared (intel_driver.c:302) ==90907== by 0x5C48185: intel_driver_open (intel_driver.c:226) ==90907== by 0x5C47865: intel_get_device_id (intel_driver.c:430) ==90907== by 0x5C47609: intel_setup_callbacks (intel_driver.c:1041) ==90907== by 0x5C3AA10: (anonymous namespace)::OCLDriverCallBackInitializer::OCLDriverCallBackInitializer() (cl_driver.cpp:33) ==90907== by 0x5C3A9EF: __cxx_global_var_init (cl_driver.cpp:38) ==90907== by 0x5C3AA28: _GLOBAL__sub_I_cl_driver.cpp (cl_driver.cpp:0) ==90907== by 0x5C4AE51: __do_global_ctors_aux (in /usr/local/lib/beignet/libcl.so) ==90907== by 0x5C0B74D: ??? (in /usr/local/lib/beignet/libcl.so) ==90907== Uninitialised value was created by a stack allocation ==90907== at 0x6C25140: drm_intel_bufmgr_gem_init (intel_bufmgr_gem.c:3623) ==90907== ==90907== Conditional jump or move depends on uninitialised value(s) ==90907== at 0x6C27056: drm_intel_bufmgr_gem_init (intel_bufmgr_gem.c:3778) ==90907== by 0x5C47E9C: intel_driver_memman_init (intel_driver.c:129) ==90907== by 0x5C45F73: intel_driver_init (intel_driver.c:172) ==90907== by 0x5C45F09: intel_driver_init_shared (intel_driver.c:302) ==90907== by 0x5C48185: intel_driver_open (intel_driver.c:226) ==90907== by 0x5C47865: intel_get_device_id (intel_driver.c:430) ==90907== by 0x5C47609: intel_setup_callbacks (intel_driver.c:1041) ==90907== by 0x5C3AA10: (anonymous namespace)::OCLDriverCallBackInitializer::OCLDriverCallBackInitializer() (cl_driver.cpp:33) ==90907== by 0x5C3A9EF: __cxx_global_var_init (cl_driver.cpp:38) ==90907== by 0x5C3AA28: _GLOBAL__sub_I_cl_driver.cpp (cl_driver.cpp:0) ==90907== by 0x5C4AE51: __do_global_ctors_aux (in /usr/local/lib/beignet/libcl.so) ==90907== by 0x5C0B74D: ??? (in /usr/local/lib/beignet/libcl.so) ==90907== Uninitialised value was created by a stack allocation ==90907== at 0x6C25140: drm_intel_bufmgr_gem_init (intel_bufmgr_gem.c:3623) ==90907== 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 ==90907== Conditional jump or move depends on uninitialised value(s) ==90907== at 0x9A0537E: clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) ==90907== 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) ==90907== by 0x95C0E0B: gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) ==90907== by 0x5C1DA46: cl_program_build (cl_program.c:625) ==90907== by 0x5C0E631: clBuildProgram (cl_api.c:835) ==90907== by 0x5C31EF3: cl_self_test (cl_device_id.c:852) ==90907== by 0x5C32179: cl_get_device_ids (cl_device_id.c:907) ==90907== by 0x5C11362: clGetDeviceIDs (cl_api_device_id.c:43) ==90907== by 0x4E38044: clGetDeviceIDs (ocl_icd_loader_gen.c:58) ==90907== by 0x402310: printPlatformInfo (clinfo.c:459) ==90907== by 0x40A34A: main (clinfo.c:2676) ==90907== ==90907== Conditional jump or move depends on uninitialised value(s) ==90907== at 0x9A15241: ParseLangArgs(clang::LangOptions&, llvm::opt::ArgList&, clang::InputKind,clang::TargetOptions const&, clang::PreprocessorOptions&, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A08095: clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) ==90907== 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) ==90907== by 0x95C0E0B: gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) ==90907== by 0x5C1DA46: cl_program_build (cl_program.c:625) ==90907== by 0x5C0E631: clBuildProgram (cl_api.c:835) ==90907== by 0x5C31EF3: cl_self_test (cl_device_id.c:852) ==90907== by 0x5C32179: cl_get_device_ids (cl_device_id.c:907) ==90907== by 0x5C11362: clGetDeviceIDs (cl_api_device_id.c:43) ==90907== by 0x4E38044: clGetDeviceIDs (ocl_icd_loader_gen.c:58) ==90907== by 0x402310: printPlatformInfo (clinfo.c:459) ==90907== by 0x40A34A: main (clinfo.c:2676) ==90907== ==90907== Conditional jump or move depends on uninitialised value(s) ==90907== at 0x9A16B6A: ParseLangArgs(clang::LangOptions&, llvm::opt::ArgList&, clang::InputKind,clang::TargetOptions const&, clang::PreprocessorOptions&, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A08095: clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, char const* const*, char const* const*, clang::DiagnosticsEngine&) (in /usr/local/lib/beignet/libgbe.so) ==90907== 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) ==90907== by 0x95C0E0B: gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) ==90907== by 0x5C1DA46: cl_program_build (cl_program.c:625) ==90907== by 0x5C0E631: clBuildProgram (cl_api.c:835) ==90907== by 0x5C31EF3: cl_self_test (cl_device_id.c:852) ==90907== by 0x5C32179: cl_get_device_ids (cl_device_id.c:907) ==90907== by 0x5C11362: clGetDeviceIDs (cl_api_device_id.c:43) ==90907== by 0x4E38044: clGetDeviceIDs (ocl_icd_loader_gen.c:58) ==90907== by 0x402310: printPlatformInfo (clinfo.c:459) ==90907== by 0x40A34A: main (clinfo.c:2676) ==90907== vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0xF6 0xC1 0x5D 0xC3 0x31 vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0 vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F38 vex amd64->IR: PFX.66=1 PFX.F2=0 PFX.F3=0 ==90907== valgrind: Unrecognised instruction at address 0xa7b77b2. ==90907== at 0xA7B77B2: clang::TargetInfo::getLeastIntTypeByWidth(unsigned int, bool) const (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A47EBF: DefineLeastWidthIntType(unsigned int, bool, clang::TargetInfo const&, clang::MacroBuilder&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A4508C: InitializePredefinedMacros(clang::TargetInfo const&, clang::LangOptions const&, clang::FrontendOptions const&, clang::MacroBuilder&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A41082: clang::InitializePreprocessor(clang::Preprocessor&, clang::PreprocessorOptions const&, clang::PCHContainerReader const&, clang::FrontendOptions const&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x99F06E1: clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A2B856: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x99F4034: clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (in /usr/local/lib/beignet/libgbe.so) ==90907== 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) ==90907== by 0x95C0E0B: gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) ==90907== by 0x5C1DA46: cl_program_build (cl_program.c:625) ==90907== by 0x5C0E631: clBuildProgram (cl_api.c:835) ==90907== by 0x5C31EF3: cl_self_test (cl_device_id.c:852) ==90907== Your program just tried to execute an instruction that Valgrind ==90907== did not recognise. There are two possible reasons for this. ==90907== 1. Your program has a bug and erroneously jumped to a non-code ==90907== location. If you are running Memcheck and you just saw a ==90907== warning about a bad jump, it's probably your program's fault. ==90907== 2. The instruction is legitimate but Valgrind doesn't handle it, ==90907== i.e. it's Valgrind's fault. If you think this is the case or ==90907== you are not sure, please let us know and we'll try to fix it. ==90907== Either way, Valgrind will now raise a SIGILL signal which will ==90907== probably kill your program. ==90907== ==90907== Process terminating with default action of signal 4 (SIGILL): dumping core ==90907== Illegal opcode at address 0xA7B77B2 ==90907== at 0xA7B77B2: clang::TargetInfo::getLeastIntTypeByWidth(unsigned int, bool) const (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A47EBF: DefineLeastWidthIntType(unsigned int, bool, clang::TargetInfo const&, clang::MacroBuilder&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A4508C: InitializePredefinedMacros(clang::TargetInfo const&, clang::LangOptions const&, clang::FrontendOptions const&, clang::MacroBuilder&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A41082: clang::InitializePreprocessor(clang::Preprocessor&, clang::PreprocessorOptions const&, clang::PCHContainerReader const&, clang::FrontendOptions const&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x99F06E1: clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x9A2B856: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/local/lib/beignet/libgbe.so) ==90907== by 0x99F4034: clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (in /usr/local/lib/beignet/libgbe.so) ==90907== 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) ==90907== by 0x95C0E0B: gbe::programNewFromSource(unsigned int, char const*, unsigned long, char const*, char*, unsigned long*) (program.cpp:1094) ==90907== by 0x5C1DA46: cl_program_build (cl_program.c:625) ==90907== by 0x5C0E631: clBuildProgram (cl_api.c:835) ==90907== by 0x5C31EF3: cl_self_test (cl_device_id.c:852) ==90907== ==90907== HEAP SUMMARY: ==90907== in use at exit: 1,752,551 bytes in 6,847 blocks ==90907== total heap usage: 7,843 allocs, 996 frees, 2,107,960 bytes allocated ==90907== ==90907== LEAK SUMMARY: ==90907== definitely lost: 416 bytes in 17 blocks ==90907== indirectly lost: 0 bytes in 0 blocks ==90907== possibly lost: 0 bytes in 0 blocks ==90907== still reachable: 1,752,135 bytes in 6,830 blocks ==90907== suppressed: 0 bytes in 0 blocks ==90907== Rerun with --leak-check=full to see details of leaked memory ==90907== ==90907== For counts of detected and suppressed errors, rerun with: -v ==90907== ERROR SUMMARY: 15 errors from 5 contexts (suppressed: 0 from 0) Killed -- 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>
