From owner-freebsd-threads@freebsd.org Wed Aug 24 09:02:27 2016 Return-Path: Delivered-To: freebsd-threads@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 9E421BC0C02 for ; Wed, 24 Aug 2016 09:02:27 +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 8342215DD for ; Wed, 24 Aug 2016 09:02:27 +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 u7O92QZg003559 for ; Wed, 24 Aug 2016 09:02:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 211947] bconsole won't die sitting on do_rw_wrlock Date: Wed, 24 Aug 2016 09:02:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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-threads@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 09:02:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211947 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #3 from Konstantin Belousov --- I can reproduce a hang with your test program with stable/10 libs on 11 ker= nel. On the other hand, I run your program in a loop for a hour on HEAD machine= and was not able to observe the hang. When the program hangs, I see that the only live thread waits for the rtld_bind_lock, which is declared as write locked. So it looks as if the cancelled thread leaked the rtld bind lock. It might be only appearance of= the leak, though. [Switching to LWP 101215 of process 54629] _umtx_op_err () at /usr/src/lib/libthr/arch/i386/i386/_umtx_op_err.S:36 36 SYSCALL_ERR(_umtx_op) (gdb) bt #0 _umtx_op_err () at /usr/src/lib/libthr/arch/i386/i386/_umtx_op_err.S:36 #1 0x2807fe01 in __thr_rwlock_wrlock (rwlock=3D0x0, tsp=3D) at /usr/src/lib/libthr/thread/thr_umtx.c:297 #2 0x280884c0 in _thr_rwlock_wrlock (rwlock=3D, tsp=3D) at /usr/src/lib/libthr/thread/thr_umtx.h:204 #3 _thr_rtld_wlock_acquire (lock=3D0x28097d00) at /usr/src/lib/libthr/thread/thr_rtld.c:141 #4 0x280539ff in wlock_acquire (lock=3D0x28063f58 , lockstate=3D0xffffd598) at /usr/src/libexec/rtld-elf/rtld_lock.c:217 #5 0x2804da23 in objlist_call_fini (list=3D, root=3D, lockstate=3D) at /usr/src/libexec/rtld-elf/rtld.c:2421 #6 0x2804cb7a in rtld_exit () at /usr/src/libexec/rtld-elf/rtld.c:2801 #7 0x281a68ab in __cxa_finalize (dso=3D) at /usr/src/lib/libc/stdlib/atexit.c:200 #8 0x28146f7f in exit (status=3D-10552) at /usr/src/lib/libc/stdlib/exit.c= :73 #9 0x080488f6 in main () at pr-211947.c:70 (gdb) frame 4 #4 0x280539ff in wlock_acquire (lock=3D0x28063f58 , lockstate=3D0xffffd598) at /usr/src/libexec/rtld-elf/rtld_lock.c:217 217 lockinfo.wlock_acquire(lock->handle); (gdb) p/x *(struct urwlock *)(lock->handle) $3 =3D {rw_state =3D 0xa0000000, rw_flags =3D 0x2, rw_blocked_readers =3D 0= x0, rw_blocked_writers =3D 0x0, rw_spare =3D {0x0, 0x0, 0x0, 0x0}} 0xa0000000 =3D=3D URWLOCK_WRITE_OWNER | URWLOCK_READ_WAITERS --=20 You are receiving this mail because: You are the assignee for the bug.=