Date: Wed, 17 Jul 2024 03:54:25 +0000 From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 280318] fork() can deadlock on rtld_phdr_lock Message-ID: <bug-280318-13406-NWPRemg7Cu@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-280318-13406@https.bugs.freebsd.org/bugzilla/> References: <bug-280318-13406@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=3D280318 Konstantin Belousov <kib@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> --- This is expected: we lock phdr lock over the whole dl_iterate_phdr, includi= ng the callback. To make dl_iterate_phdr() functional after the fork, pre-fork code also locks the phdr lock. See ef2c2a692b75d644549827b3aaa9f1736940fe85 for some references about the need of the phdr lock. Since your example blocks in the callback, it is blocked owning the phdr lo= ck, and fork cannot proceed. In principle, dl_iterate_phdr() is not required to be useful after fork(). I can add a knob to select the behavior, but I do not see how could it be made both. --=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-280318-13406-NWPRemg7Cu>