From nobody Sat Apr 13 16:25:20 2024 X-Original-To: apache@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 4VGzLW4HrTz5HkMR for ; Sat, 13 Apr 2024 16:25:23 +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 4VGzLW2t5wz4Mx4 for ; Sat, 13 Apr 2024 16:25:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713025523; a=rsa-sha256; cv=none; b=pMnTUGnjTqNXJaNuI71XRw7yr+d0rxR/k2EnMUYziB1s2Ky7yeo5KXy/9VS8hwfSfpbZpd Mh8cf2GYKYjtHUusLypArpfs06z1HteYwCGUMWv/Y95rw/44fKmUqPrugm4Ew12NvPGYW2 N03Vd1BjFSLSZCxbemj1sWf62ZFBEsxLnRAgCYQ/6RcN6wrp1FznSYmuaCeHWL7cGvhbES 2msE0YEAHM6ytHFHQLIWz89RNp6uvfyIz7hBARpdyH0D7IdpxXo1mgQ1T2ydGyTiA0Fkns zhBLXJgLut0afqBp2MhxxjeWOeuoeRUYGKJQNY7fHfQOQSLwcS+xopKvyLziag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713025523; 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: in-reply-to:in-reply-to:references:references; bh=bsrbYKDCgtvfoSe/KfsQR0r7KWFhg1bvcsGH9TzVX1U=; b=fiRBFTLr6el6NzMkJGC3vKdse4D5wBvuCWzDzRxv0/vo18bUQqSeFMA8HNWjRJazk1uxJe 4uXcXigx3M/ESIIv/JybRT5lLDp4lsbvLqDZO4wjXkau3usMyuEyc+U8E2796YU/hBF/hH U09YxmmOzt8kywYU83SuvznwqbQRjrchSbDq4EfFOE9rD5N7YOvhLNpAFdhkGLC1T+x6ld aYuj5ZFuDtnDMmz2ZOxE0YSqm0RYCiIALyfj9syhseqw8eMkAMJl8pRg63yX/pJovR8mkS AreTjVODHUEaIHwALEX4IF4RyP+OEfmjrVUi20T/+c6weHltEquAr71HM37vwg== 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 4VGzLW0wP6zgH8 for ; Sat, 13 Apr 2024 16:25:23 +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 43DGPNKo058123 for ; Sat, 13 Apr 2024 16:25:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43DGPN2q058122 for apache@FreeBSD.org; Sat, 13 Apr 2024 16:25:23 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: apache@FreeBSD.org Subject: [Bug 268318] www/apache24 with www/mod_php8{0,1,2,3?}: opcache + ASLR turned on crashes Apache Date: Sat, 13 Apr 2024 16:25:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: crash, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: 000.fbsd@quip.cz X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Not Enough Information X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: apache@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Support of apache-related ports List-Archive: https://lists.freebsd.org/archives/freebsd-apache List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268318 --- Comment #88 from Miroslav Lachman <000.fbsd@quip.cz> --- (In reply to Fabian Wenk from comment #85) This problem is more complicated with almost each release of Apache or PHP. About a month ago I tried to debug the issue on 2 of our machines (just the= 2 crashing, more than a dozen of others don't) As a workaround Opcache can be disabled by opcache.enable=3D0 in php.ini bu= t on some workload the disabled Opcache is too bad for performance. I was curious why it crashes on those 2 machines and not on the others, I compared configuration in php.ini and the list of installed PHP extensions.= I thought there are some extra extensions which can cause the problem but it = was the other way around - 2 machines had fewer PHP extensions than other machi= nes. Once I installed more extensions it stoped crashing the Apache with Opcache enabled.=20 Then I tried to isolate minimalistic example and it was more complicated ag= ain. Even only 2 extensions (one is opcache) can crash Apache on reload.=20 The minimal set of extensions installed to have Apache without crashes was this: ext-10-opcache.ini ext-18-session.ini ext-20-bcmath.ini ext-20-bz2.ini ext-20-ctype.ini ext-20-curl.ini ext-20-dom.ini ext-20-exif.ini ext-20-fileinfo.ini ext-20-filter.ini ext-20-ftp.ini ext-20-gd.ini ext-20-iconv.ini ext-20-intl.ini Once I remove any of them the Apache will crash on reload with Opcache enab= led. The ftp PHP extension was one missing on the 2 mentioned machines. But when you add bunch of PHP extensions then you play this game again beca= use it can start crashing again until you add even more extensions to stop it. This problem is back again after the latest update of Apache to 2.4.59 on different machines than before.=20 3 machines where Apache crashed on reload with this version and unmodified = list of PHP extensions and unmodified php.ini. The more interesting is that it crashes Apache with PHP 8.1 on 2 machines a= nd PHP 8.3 on third machine. The list of extensions is the same. Again, it can be worked around by opcache.enable=3D0 but it is not a soluti= on. As the configuration of PHP is the same as bunch of other machines which do= not crash I started to dig deeper - the list of Apache modules. And there are s= ome differences. The main difference is that Apache with PHP with Opcache crash= es on machines where proxy_wstunnel_module is loaded!=20 Once I commented out the LoadModule proxy_wstunnel_module in httpd.conf Apa= che survived reload with PHP Opcache enabled. But we cannot disable wstunnel because it is required by some web apps. And things are still not clear enough. Another machine with proxy_wstunnel_module loaded and with PHP Opcache enabled does not crashes Apache on reload. So ... there are too many things together which must match to make Apache (don't) crash. All tests were with this in rc.conf: apache24_enable=3D"YES" apache24_aslr_disable=3D"YES" apache24_http_accept_enable=3D"YES" And in case of PHP 8.3 both PHP and mod_php were built with NOASLR =3D On. --=20 You are receiving this mail because: You are the assignee for the bug.=