From nobody Fri May 5 09:20:26 2023 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 4QCQBz5sYgz494JS for ; Fri, 5 May 2023 09:20:27 +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 4QCQBz4nCkz4TYx for ; Fri, 5 May 2023 09:20:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683278427; 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=VUzqcR2b8z1w0vpQFa0CMggQEB2Bm5bCE7Lr1HbG/dM=; b=D/wg2l4i8oxXHCG7WI9qScONrV8fRbgVevtuP4blh0kttqz7nRIupqeFA04JclG50hg5Cl BaLNBMSlQBjlsUXs8kpV4Ly91GUbDr5hyt8flFvOpMTeOCUacB8jp5VHlcXBp1stw9A4ly RCghop4RGc9OMuhtSAWYX5hejb/kgiYRIs2voeOInjdYPxvB0Nalmuy9v+++CdsaBxFcPZ jVIMz6kaMYlWnyTckzlNIRedO7tizvmUpWadyfx1h01FIj8AnXd08a9oS9LqneViD+72TJ 0V8MVNYKWlhRtFKrRjyGgYkbLM5lKo4JNMq3vc02jryrVP5P8JpaIyVYDHQvag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683278427; a=rsa-sha256; cv=none; b=ILwIiAleh+O9UF0XpNdqQ+L3v5wcoA+LRUnK48/X2+Le2fTmyXp3B55OLIkvTGllegCxAo bg+uIPTL1j8Leu7qH0kP/uBI03fFftDS52yUQmiBbhd5iCEX3ewXkD3C05Rm+jfZDNcVV2 S3e5Iq4O4WRzLxA32tfO5avaF1RRVKlT8oBzwy4t1pxOP21IiplH5i90qc+tSXr9HDbewE zJ7yEvt2ES+ByyOLPd8ci7LeoiUMW+4bdz1p52I8BnB+K4TBbd/vof7s4D7LhyqRuiKl83 nnKMZZF9IUQoAOt9GXrC/J9eyLVYPOq1jrjprrE8rDldrHNSBOv0QZ/oyb4rRQ== 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 4QCQBz3sSPzpbq for ; Fri, 5 May 2023 09:20:27 +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 3459KRT0054318 for ; Fri, 5 May 2023 09:20:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3459KRiu054317 for apache@FreeBSD.org; Fri, 5 May 2023 09:20:27 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_php82: opcache + ASLR turned on crashes Apache Date: Fri, 05 May 2023 09:20:26 +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: Open X-Bugzilla-Resolution: 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: Sender: owner-freebsd-apache@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268318 --- Comment #18 from Miroslav Lachman <000.fbsd@quip.cz> --- (In reply to Vladimir Druzenko from comment #15) As many of you I see Apache httpd crashes after OS upgrade to 13.2-RELEASE. According to gdb it crashed in opcache.so (PHP extension Opcache) #0 0x000000083e878950 in ?? () (gdb) bt #0 0x000000083e878950 in ?? () #1 0x0000000841c37c52 in ?? () from /usr/local/lib/php/20210902/opcache.so #2 0x000000083f27ec46 in ?? () from /usr/local/libexec/apache24/libphp.so #3 0x000000083f260a12 in zend_llist_apply_with_del () from /usr/local/libexec/apache24/libphp.so #4 0x000000083f1fedd8 in php_module_startup () from /usr/local/libexec/apache24/libphp.so #5 0x000000083f35c995 in ?? () from /usr/local/libexec/apache24/libphp.so #6 0x000000083f35c1e6 in ?? () from /usr/local/libexec/apache24/libphp.so #7 0x00000000002620cf in ap_run_post_config () #8 0x000000000025d889 in main () Setting opcache.enable=3D0 in /usr/local/etc/php.ini helped as a quick workaround. I tried to disable ASLR for httpd with opcache enabled and in my case "elfc= tl -e +noaslr /usr/local/sbin/httpd" works. No more crashes on SIGUSR1. To disable ASLR for httpd Apache must not be running, otherwise you get an error like this: elfctl: error opening file /usr/local/sbin/httpd: Text file busy The whole setup is something like this: # service apache24 stop # elfctl -e +noaslr /usr/local/sbin/httpd # sed -i '' -E 's/^(opcache.enable *)=3D.*/\1=3D1/' /usr/local/etc/php.ini # service apache24 start # kill -USR1 `cat /var/run/httpd.pid` # service apache24 status apache24 is running as pid 50219. # php -m [PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd hash iconv imap intl json ldap libxml mbstring mcrypt memcached mysqli mysqlnd openssl pcre PDO pdo_dblib pdo_mysql pdo_sqlite Phar posix Reflection session SimpleXML soap sockets SPL sqlite3 ssh2 standard tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache The only downside of this is invalidated package checksum on /usr/local/sbin/httpd # pkg check -sa Checking all packages: 1% apache24-2.4.56: checksum mismatch for /usr/local/sbin/httpd Checking all packages: 100% Checksum can be recalculated by pkg check -r or pkg check --recompute. And "elfctl -e +noaslr /usr/local/sbin/httpd" must be executed after each Apache upgrade / reinstall. --=20 You are receiving this mail because: You are the assignee for the bug.=