From nobody Wed Jan 22 23:04:46 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YdfmJ22J4z5lCx5 for ; Wed, 22 Jan 2025 23:04:48 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YdfmJ1ZHDz3d31 for ; Wed, 22 Jan 2025 23:04:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737587088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q+IGlMcE2XY6IzTPYnlHGpvJCtxmRmf2cpl47lshiLA=; b=ATr21uaEo4slMUFIi8RLZUJCgNYG9oGzG2CUjJBernLYQGK/3vrsqIm5xtFkpPqIprt60c uUy52qi4WPJzvvlq50eYreZLDqs1Tr25MWmAapLLJQQcEYaCoOSP4ikpfuqnt/ufq+MMJ/ GuULBx5EOouz4mwZ47c3igUwJvJryyNG3A9v7dnWv5Io6IxtL2Qk4uQEXIiPkpR2ydLKCA mTHyxc2U8m4PXFZNryavOFr0VID8bB8OIbgnT6jkC3ki22ou+Qhsi1h9RTaH9vltE1YJ0d /9j1n95q7G86gWfBReAjpESYv10KllummFBtb80OjOgiFo0nmUPiIbqc+1vZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737587088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q+IGlMcE2XY6IzTPYnlHGpvJCtxmRmf2cpl47lshiLA=; b=AQvCJ+DfahUQIBy6xiQU/S1lDoKNXoYEPR/spCn5ahoffGvIdWa3oA9kMlMbyZxdApGSc7 3P7QfuMDWh2qS5a0+GpBQStM0bdG6l43OumBfd2PSpSQzPB9Ai/X5uLzEuWKN+IC4icdvx OpwdPh8BPVqFsFFVgK492iOIy1qrzz8sIv9vdAowtpQna3NP1w7bD5d/HRJDcM7aYXKnSO lgbIaBh+LTMBcZ6lwya6ptwu0qfskaj0rjhgjt1N1addOw3/LnqpwXwjNg4MAJ9HWch+wd zIrbZZFFLN78aNMd0lx65GO4+fIBp7pM6jxO6XIGfWqxlIxv8Y4yZeGYTqsFvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737587088; a=rsa-sha256; cv=none; b=F9MGY7epSzxch8g1Z/+PW6UmBGbTmyAlOAVUE4lccV90azt5bqzTwve4sovkmZqmuLCNRt uXD0l1xpV1NuArI1WDsD1yEJIL5gr9fFd/biKS/8L8sWYzg7dFi9WMpmZgw2KJ0yegRQGL wRM28J61OHBIwJxyoQofCTMxLypCHR4rCd0TBlYbuL+vDNIOdmPM4+LOHXVxLKHeFpqFbb eu5H/N14uwYiti9tj4ISg0RDpPWfj4n+T7Spp1nQUGaZuu2tqAaALJiqb77RtP63Z5l/Xd gF7yXpUs3ECktUEzfnCji8K1JuY628dPJshTdnfNyfM8fz4zveTOZ4Ae/5F2iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YdfmJ15qYz1C5M for ; Wed, 22 Jan 2025 23:04: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 50MN4meO045098 for ; Wed, 22 Jan 2025 23:04:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50MN4ljH045097 for bugs@FreeBSD.org; Wed, 22 Jan 2025 23:04:47 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: bugs@FreeBSD.org Subject: [Bug 284282] ctld rewrites its pidfile too often Date: Wed, 22 Jan 2025 23:04:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: asomers@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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 Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284282 Bug ID: 284282 Summary: ctld rewrites its pidfile too often Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org ctld rewrites its pidfile in the main_loop function. And it will exit and reenter that function every time that select gets interrupted by EINTR due = to SIGCHLD. That will happen whenever a child process exits, and that will ha= ppen every time it gets a new connection attempt. On a production server, I saw that ctld was rewriting its pidfile about 20 times per second, due to a misconfigured iSCSI client that kept trying to connect to a nonexistent target over and over. Yet when the pidfile didn't exist, a concurrent "service ctld reload" would fail. Such a failure would cause higher level code to restart ctld, which can cause various other problems. To prevent the need to restart ctld unnecessarily, the pidfile open/close l= ogic should be moved out of main_loop and into main. --=20 You are receiving this mail because: You are the assignee for the bug.=