From owner-freebsd-x11@freebsd.org Sun Jul 16 15:18:54 2017 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA084C0966E for ; Sun, 16 Jul 2017 15:18:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C0A4B80F91 for ; Sun, 16 Jul 2017 15:18:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id BF9A4C0966D; Sun, 16 Jul 2017 15:18:54 +0000 (UTC) Delivered-To: x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF43DC0966C for ; Sun, 16 Jul 2017 15:18:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAEDA80F90 for ; Sun, 16 Jul 2017 15:18:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6GFIrq8078558 for ; Sun, 16 Jul 2017 15:18:54 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 220767] lang/beignet: hangs if not linked against libpthread after jemalloc 5.0.0 update Date: Sun, 16 Jul 2017 15:18:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: needs-qa, regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jbeich@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: x11@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2017 15:18:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220767 Bug ID: 220767 Summary: lang/beignet: hangs if not linked against libpthread after jemalloc 5.0.0 update Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: needs-qa, regression Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: x11@FreeBSD.org Reporter: jbeich@FreeBSD.org CC: eric@camachat.org, jasone@FreeBSD.org, threads@FreeBSD.org Assignee: x11@FreeBSD.org Flags: maintainer-feedback?(x11@FreeBSD.org) After base r319971 some applications not already linked against threading library started to hang in [umtxn] state. It affects at least Beignet. Howe= ver, bisecting jemalloc as part of libc requires 8 steps of rebasing FreeBSD-specific changes. Maybe someone can suggest more apps to try that can trigger the issue. $ pkg install clinfo beignet # requires bug 217635 $ LD_PRELOAD=3D/lib/libthr.so.3 clinfo # works fine $ gdb clinfo (gdb) r Starting program: /usr/local/bin/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=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 cl_khr_gl_sharing Platform Extensions function suffix Intel [New LWP 102018 of process 60317] ^C Thread 1 received signal SIGINT, Interrupt. _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 37 RSYSCALL_ERR(_umtx_op) (gdb) bt #0 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:= 37 #1 0x0000000803c579e4 in __thr_umutex_lock (mtx=3D0x803e7dc78 <_mutex_static_lock>, id=3D101914) at /usr/src/lib/libthr/thread/thr_umtx.c:80 #2 0x0000000803c61acc in _thr_umutex_lock (mtx=3D0x803e7dc78 <_mutex_static_lock>, id=3D101914) at /usr/src/lib/libthr/thread/thr_umtx.h:123 #3 0x0000000803c619b4 in init_static (thread=3D0x80068b000, mutex=3D0x8013= 48e50) at /usr/src/lib/libthr/thread/thr_mutex.c:304 #4 0x0000000803c602f8 in check_and_init_mutex (mutex=3D0x801348e50, m=3D0x7fffffff2de0) at /usr/src/lib/libthr/thread/thr_mutex.c:598 #5 0x0000000803c5f689 in __pthread_mutex_trylock (mutex=3D0x801348e50) at /usr/src/lib/libthr/thread/thr_mutex.c:614 #6 0x0000000800d656b9 in malloc_mutex_trylock_final (mutex=3D0x801348e10) at /usr/src/contrib/jemalloc/include/jemalloc/internal/mutex.h:144 #7 0x0000000800d59602 in malloc_mutex_lock (tsdn=3D0x80063c088, mutex=3D0x801348e10) at /usr/src/contrib/jemalloc/include/jemalloc/internal/mutex.h:202 #8 0x0000000800d5b6b8 in __je_arena_tcache_fill_small (tsdn=3D0x80063c088, arena=3D0x801344980, tcache=3D0x80063c240, tbin=3D0x80063c2e0, binind=3D6, prof_accumbytes= =3D0) at jemalloc_arena.c:1433 #9 0x0000000800cd7013 in __je_tcache_alloc_small_hard (tsdn=3D0x80063c088, arena=3D0x801344980, tcache=3D0x80063c240, tbin=3D0x80063c2e0, binind=3D6, tcache_success=3D0x7fffffff53f6) at jemalloc_tcache.c:93 #10 0x0000000800d8ea3e in tcache_alloc_small (tsd=3D0x80063c088, arena=3D0x801344980, tcache=3D0x80063c240, size=3D96, binind=3D6, zero=3Dtrue, slow_path=3Df= alse) at /usr/src/contrib/jemalloc/include/jemalloc/internal/tcache_inlines.h= :86 #11 arena_malloc (tsdn=3D0x80063c088, arena=3D0x0, size=3D96, ind=3D6, zero= =3Dtrue, tcache=3D0x80063c240, slow_path=3Dfalse) at /usr/src/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h:101 #12 iallocztm (tsdn=3D0x80063c088, size=3D96, ind=3D6, zero=3Dtrue, tcache= =3D0x80063c240, is_internal=3Dfalse, arena=3D0x0, slow_path=3Dfalse) at /usr/src/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlin= es_c.h:33 #13 imalloc_no_sample (sopts=3D0x7fffffff5300, dopts=3D0x7fffffff52d0, tsd=3D0x80063c088, size=3D96, usize=3D96, ind=3D6) at jemalloc_jemalloc.c:1654 #14 imalloc_body (sopts=3D0x7fffffff5300, dopts=3D0x7fffffff52d0, tsd=3D0x8= 0063c088) at jemalloc_jemalloc.c:1850 #15 imalloc (sopts=3D0x7fffffff5300, dopts=3D0x7fffffff52d0) at jemalloc_jemalloc.c:1950 #16 __calloc (num=3D1, size=3D96) at jemalloc_jemalloc.c:2064 #17 0x0000000803c5fc0e in mutex_init (mutex=3D0x801348e50, mutex_attr=3D0x803e72758 <_pthread_mutexattr_default>, calloc_cb=3D0x80= 0d8bea0 <__calloc>) at /usr/src/lib/libthr/thread/thr_mutex.c:292 #18 0x0000000803c619dc in init_static (thread=3D0x80068b000, mutex=3D0x8013= 48e50) at /usr/src/lib/libthr/thread/thr_mutex.c:307 #19 0x0000000803c602f8 in check_and_init_mutex (mutex=3D0x801348e50, m=3D0x7fffffff60d0) at /usr/src/lib/libthr/thread/thr_mutex.c:598 #20 0x0000000803c5f689 in __pthread_mutex_trylock (mutex=3D0x801348e50) at /usr/src/lib/libthr/thread/thr_mutex.c:614 #21 0x0000000800d656b9 in malloc_mutex_trylock_final (mutex=3D0x801348e10) at /usr/src/contrib/jemalloc/include/jemalloc/internal/mutex.h:144 #22 0x0000000800d59602 in malloc_mutex_lock (tsdn=3D0x80063c088, mutex=3D0x801348e10) at /usr/src/contrib/jemalloc/include/jemalloc/internal/mutex.h:202 #23 0x0000000800d5b6b8 in __je_arena_tcache_fill_small (tsdn=3D0x80063c088, arena=3D0x801344980, tcache=3D0x80063c240, tbin=3D0x80063c2e0, binind=3D6, prof_accumbytes= =3D0) at jemalloc_arena.c:1433 #24 0x0000000800cd7013 in __je_tcache_alloc_small_hard (tsdn=3D0x80063c088, arena=3D0x801344980, tcache=3D0x80063c240, tbin=3D0x80063c2e0, binind=3D6, tcache_success=3D0x7fffffff86d6) at jemalloc_tcache.c:93 #25 0x0000000800d72886 in tcache_alloc_small (tsd=3D0x80063c088, arena=3D0x801344980, tcache=3D0x80063c240, size=3D88, binind=3D6, zero=3Dfalse, slow_path=3D= false) at /usr/src/contrib/jemalloc/include/jemalloc/internal/tcache_inlines.h= :86 #26 arena_malloc (tsdn=3D0x80063c088, arena=3D0x0, size=3D88, ind=3D6, zero= =3Dfalse, tcache=3D0x80063c240, slow_path=3Dfalse) at /usr/src/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h:101 #27 iallocztm (tsdn=3D0x80063c088, size=3D88, ind=3D6, zero=3Dfalse, tcache=3D0x80063c240, is_internal=3Dfalse, arena=3D0x0, slow_path=3Dfalse) at /usr/src/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlin= es_c.h:33 #28 imalloc_no_sample (sopts=3D0x7fffffff85e0, dopts=3D0x7fffffff85b0, tsd=3D0x80063c088, size=3D88, usize=3D96, ind=3D6) at jemalloc_jemalloc.c:1654 #29 imalloc_body (sopts=3D0x7fffffff85e0, dopts=3D0x7fffffff85b0, tsd=3D0x8= 0063c088) at jemalloc_jemalloc.c:1850 #30 imalloc (sopts=3D0x7fffffff85e0, dopts=3D0x7fffffff85b0) at jemalloc_jemalloc.c:1950 #31 __malloc (size=3D88) at jemalloc_jemalloc.c:1981 #32 0x00000008033b81a8 in operator new (size=3D88) at /usr/src/contrib/libc++/src/new.cpp:70 #33 0x000000080803aa89 in llvm::User::operator new(unsigned long, unsigned = int) () from /usr/local/lib/beignet//libgbe.so #34 0x0000000806ea6b34 in clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::FunctionArgList const&, clang::SourceLocation, clang::SourceLocation) () from /usr/local/lib/beignet//libgbe.so #35 0x0000000806ea8551 in clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) () from /usr/local/lib/beignet//libgbe.so #36 0x0000000806eba8d9 in clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDe= cl, llvm::GlobalValue*) () from /usr/local/lib/beignet//libgbe.so #37 0x0000000806eb6774 in clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) () from /usr/local/lib/beignet//libgbe.so #38 0x0000000806ebc322 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) () from /usr/local/lib/beignet//libgbe.so #39 0x0000000806e3c82f in (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) () f= rom /usr/local/lib/beignet//libgbe.so #40 0x0000000806e2fb85 in clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) () from /usr/local/lib/beignet//libgbe.so #41 0x00000008077d0462 in clang::ParseAST(clang::Sema&, bool, bool) () from /usr/local/lib/beignet//libgbe.so #42 0x0000000806bdc2b9 in clang::FrontendAction::Execute() () from /usr/local/lib/beignet//libgbe.so #43 0x0000000806ba2cf1 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from /usr/local/lib/beignet//libgbe.so std::__1::basic_string, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&, unsigned lon= g, char*, unsigned long*, unsigned int) () from /usr/local/lib/beignet//libgbe= .so #45 0x00000008067848b3 in gbe::programNewFromSource(unsigned int, char cons= t*, unsigned long, char const*, char*, unsigned long*) () from /usr/local/lib/beignet//libgbe.so #46 0x00000008019617c7 in cl_program_build (p=3D0x8006cd1c0, options=3D0x80= 1992f4d "") at src/cl_program.c:626 #47 0x0000000801952782 in clBuildProgram (program=3D0x8006cd1c0, num_device= s=3D1, device_list=3D0x7fffffffe050, options=3D0x801992f4d "", pfn_notify=3D0x= 0, user_data=3D0x0) at src/cl_api.c:835 #48 0x00000008019757b4 in cl_self_test (device=3D0x801bcf2a0 , atomic_in_l3_flag=3DSELF_TEST_PASS) at src/cl_device_id.c:856 #49 0x0000000801975a3e in cl_get_device_ids (platform=3D0x801bcb3d8 , device_type=3D4294967295, num_entries=3D0, devices=3D0x0, num_devices=3D0x8007e8cf0) at src/cl_device_id.c:911 #50 0x00000008019554b3 in clGetDeviceIDs (platform=3D0x801bcb3d8 , device_type=3D4294967295, num_entries=3D0, devices=3D0x0, num_devices=3D0x8007e8cf0) at src/cl_api_device_id.c:43 #51 0x000000080083e065 in clGetDeviceIDs (platform=3D0x801bcb3d8 , device_type=3D4294967295, num_entries=3D0, devices=3D0x0, num_devices=3D0x8007e8cf0) at ocl_icd_loader_gen.c:58 #52 0x0000000000402341 in printPlatformInfo (p=3D0) at src/clinfo.c:459 #53 0x000000000040a3bd in main (argc=3D1, argv=3D0x7fffffffe2b8) at src/clinfo.c:2676 --=20 You are receiving this mail because: You are the assignee for the bug.=