[Bug 271490] Deadlock between _rtld_atfork_pre and _thr_attr_init
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 271490] Deadlock between _rtld_atfork_pre and _thr_attr_init"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 May 2023 13:47:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271490 --- Comment #16 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6f49eafb056cfa0703dfc97a731cabe4ed2596b8 commit 6f49eafb056cfa0703dfc97a731cabe4ed2596b8 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-05-20 08:11:54 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-05-22 13:46:42 +0000 libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child Since there is only the current thread in the child, no pending readers exist. Clear the bit, since it confuses future attempts to acquire write ownership of the rtld locks, due to URWLOCK_PREFER_READERS flag. To be future-proof, clear all state about pending writers and readers. PR: 271490 Reported and tested by: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au> Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40178 lib/libthr/thread/thr_fork.c | 4 ++++ lib/libthr/thread/thr_private.h | 2 ++ lib/libthr/thread/thr_rtld.c | 11 +++++++++++ 3 files changed, 17 insertions(+) -- You are receiving this mail because: You are the assignee for the bug.