Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Aug 2016 09:02:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-threads@FreeBSD.org
Subject:   [Bug 211947] bconsole won't die sitting on do_rw_wrlock
Message-ID:  <bug-211947-16-R1MHr1c20D@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-211947-16@https.bugs.freebsd.org/bugzilla/>
References:  <bug-211947-16@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=3D211947

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #3 from Konstantin Belousov <kib@FreeBSD.org> ---
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<optimized out>)
    at /usr/src/lib/libthr/thread/thr_umtx.c:297
#2  0x280884c0 in _thr_rwlock_wrlock (rwlock=3D<optimized out>,
    tsp=3D<optimized out>) 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 <rtld_locks>,
    lockstate=3D0xffffd598) at /usr/src/libexec/rtld-elf/rtld_lock.c:217
#5  0x2804da23 in objlist_call_fini (list=3D<optimized out>,
    root=3D<optimized out>, lockstate=3D<optimized out>)
    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<optimized out>)
    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 <rtld_locks>,
    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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211947-16-R1MHr1c20D>