From nobody Fri Oct 07 00:26:51 2022 X-Original-To: ports-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 4Mk8JD23Mgz4dsDd for ; Fri, 7 Oct 2022 00:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mk8JD0Cj8z43cS for ; Fri, 7 Oct 2022 00:26:52 +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 4Mk8JC6CzCzQS3 for ; Fri, 7 Oct 2022 00:26:51 +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 2970QpVp097225 for ; Fri, 7 Oct 2022 00:26:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2970QpYb097223 for ports-bugs@FreeBSD.org; Fri, 7 Oct 2022 00:26:51 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: ports-bugs@FreeBSD.org Subject: [Bug 266873] www/apache24: creating forked processes at 100% CPU spinning in sched_yield() Date: Fri, 07 Oct 2022 00:26:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: edenist-fbz@edenist.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: apache@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name 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 List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665102412; 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=xr2pCr356e5jjk94ssbuKf3Vzf+YfEB6LMF4hDsQOK8=; b=pmJuUcpB6BhpI4DYT/2BjrZm1KWYIm4A/iFqTpBP2kMXiPOj5sxRfI4j8ofvGoHX+zl4ov orFEaF/AhMfMaFA2gq1g8D/RB67PzOE7p8k3jngKCfxYQNstML5eaNW5Gju/fPXsnpGzpG c+mW+XZ5Cl80UB1+pZvhVa0MJ4/P5ULEXekN770Wc8PJ5aAWfHWoKOF5NCGryR7ECLBSNl RM/5XfGkbBjJ/kCNuQqczscBl23Eb+AaeIZTQRvsQDkUucY9tX0KGKiByMfXWjfCdJNHCT +LR2/C2vHWBNQqFCaw1jxwOg48+6sZbotznpyzliIHk/oybshYOct+CfAi8BBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665102412; a=rsa-sha256; cv=none; b=aZGgWCRRnH2+wiqoNc3XMvYXfOy9Xt6Q5sW/CDWgX9ohDX+gy/Ot7Q83C5DfAhvUUnvBD3 Vs2CY4vqcuCueVrRF7hmBDzrFWnT/xMQ4cKrhmCTVerDT/sh4C4mlm8hQN84qoyRcfj+2v 78U8ds84VmnQs3U1YzituwieO+GeeauZ7X/93+f9W64N1iPEubY3bR1GcQ0ps+4q1oeTW/ ZkZV6lMZK3sEah3ziNXyq9nI6kECZOwCbZTbF12bJVD6IcIu0+cGQ35ViORrpSUxdoK22w 69iESl8W3t/SFMVm64zSA+LslkXjNzXte9J5qq8eg78Z75HBDWMWFBOqS+7GHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266873 Bug ID: 266873 Summary: www/apache24: creating forked processes at 100% CPU spinning in sched_yield() Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: apache@FreeBSD.org Reporter: edenist-fbz@edenist.net Flags: maintainer-feedback?(apache@FreeBSD.org) Assignee: apache@FreeBSD.org Apache version: apache24-2.4.54 - build with poudriere FreeBSD: 12.3-STABLE FreeBSD 12.3-STABLE stable/12-3a9e60169ee GENERIC amd64 Since updating OS and apache a couple of weeks ago, I have noticed that my system is getting filled up with httpd processes consuming 100% CPU.=20 Here is an example with one rogue process, but after a day of running the system will be eventually full of httpd processes spinning at 100%.=20 root 9947 100.0 0.0 207000 41380 - RJ 10:59 18:42.98 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10243 1.4 0.1 310180 138488 - SJ 11:17 0:01.44 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10059 0.4 0.1 242068 71156 - SJ 11:06 0:03.63 /usr/local/sbin/httpd -DNOHTTPACCEPT root 9738 0.0 0.0 207000 41388 - SsJ 10:37 0:00.35 /usr/local/sbin/httpd -DNOHTTPACCEPT www 9853 0.0 0.1 244096 70872 - SJ 10:47 0:06.49 /usr/local/sbin/httpd -DNOHTTPACCEPT www 9887 0.0 0.1 242500 69808 - IJ 10:51 0:08.48 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10058 0.0 0.1 307876 136996 - IJ 11:06 0:04.76 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10136 0.0 0.1 242592 71452 - IJ 11:12 0:02.50 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10144 0.0 0.1 244644 71328 - IJ 11:14 0:01.31 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10166 0.0 0.1 244648 73028 - SJ 11:15 0:00.99 /usr/local/sbin/httpd -DNOHTTPACCEPT www 10239 0.0 0.1 209800 61568 - IJ 11:16 0:00.20 /usr/local/sbin/httpd -DNOHTTPACCEPT Usual behavior with prefork will be an initial process running as root, whi= ch then forks additional processes and sets them to run as www user. What appe= ars to be happening here is that when the fork occurs, something gets stuck bef= ore it is able to switch to www.=20 In the case of the rogue process above, output of truss -p 9947 is simply a continuous loop of: sched_yield() =3D 0 (0x0) For some extra context, I am running this inside a jail, hosting nextcloud = with mod_php80, mysql, redis. None of my other web apps are having this issue bu= t it could be something which only appears under load and nextcloud is certainly= the heaviest application here.=20 Also, I tried switching over to php-fpm with mpm_event and the same issue w= as encountered there, so it certainly feels like something core to apache's forking code at play here. --=20 You are receiving this mail because: You are the assignee for the bug.=