From owner-freebsd-threads@freebsd.org Mon Jan 11 15:37:54 2021 Return-Path: Delivered-To: freebsd-threads@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D021B4DD138 for ; Mon, 11 Jan 2021 15:37:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DDyX203vnz3tM4 for ; Mon, 11 Jan 2021 15:37:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 8D1494DCFDB; Mon, 11 Jan 2021 15:37:52 +0000 (UTC) Delivered-To: threads@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 866B94DCFDA for ; Mon, 11 Jan 2021 15:37:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDyWz0FHWz3tRg for ; Mon, 11 Jan 2021 15:37:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B98691CB63 for ; Mon, 11 Jan 2021 15:37:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 10BFbmRb093170 for ; Mon, 11 Jan 2021 15:37:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 10BFbmR3093169 for threads@FreeBSD.org; Mon, 11 Jan 2021 15:37:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 252579] fork() causes process to hang in rare circumstances. Date: Mon, 11 Jan 2021 15:37:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: shamaz.mazum@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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.34 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 15:37:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252579 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=3D221461&action= =3Dedit 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 specif= ic 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: fil= es 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 wa= y to reproduce the bug is as minimal as I can get. --=20 You are receiving this mail because: You are the assignee for the bug.=