Date: Mon, 11 Jan 2021 15:37:48 +0000 From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 252579] fork() causes process to hang in rare circumstances. Message-ID: <bug-252579-13406@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252579 Bug ID: 252579 Summary: fork() causes process to hang in rare circumstances. Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: threads Assignee: threads@FreeBSD.org Reporter: shamaz.mazum@gmail.com Created attachment 221461 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=221461&action=edit NSS module and test program This bug is discovered on FreeBSD 13-CURRENT but can also be reproduced on 12.2-RELEASE. It causes a process to hung when fork(2) is called and specific NSS (Name Switch Service) module is used. How to reproduce: 1) Download archive in the attachment. 2) Compile NSS stub module (do not forget .1 at the end of compiled module): cc -shared -fPIC -pthread -o nss_stub.so.1 nss_stub.c 3) Copy nss_stub.so.1 to /usr/local/lib 4) Edit /etc/nsswitch.conf and replace 'hosts: files dns' witch 'hosts: files dns stub' 5) Compile test program: cc -o bug bug.c 6) Run it, it will hang, so even killall -9 bug won't kill it. There is a small and unpleasant discussion on freebsd-net mailing list with Konstantin Belousov who wanted me to reproduce this bug without editing /etc/nsswitch.conf I think it's either impossible, because NSS system is somehow messing with fork, or it's beyond my competence. So the provided way to reproduce the bug is as minimal as I can get. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252579-13406>
