From owner-freebsd-ports@freebsd.org Wed Apr 24 21:04:03 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FE8E1581656 for ; Wed, 24 Apr 2019 21:04:03 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2a00:14b0:4200:32e0::1ea]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gilb.zs64.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0525981480; Wed, 24 Apr 2019 21:04:02 +0000 (UTC) (envelope-from stb@lassitu.de) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 2FBEB129DC1; Wed, 24 Apr 2019 21:03:52 +0000 (UTC) From: Stefan Bethke Message-Id: <0AEC703C-5ACE-44BD-A9D3-70ABBA8785EB@lassitu.de> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: PHP 7.2: SIGSEGV in OpenSSL Date: Wed, 24 Apr 2019 23:03:51 +0200 In-Reply-To: <20190424205044.ll3rsu3hhfwxrxof@atuin.in.mat.cc> Cc: Kurt Jaeger , Marcel Bonnet , FreeBSD Ports To: Mathieu Arnold References: <67841009-B4BC-4F0A-BB53-77487EE19CBD@lassitu.de> <20190423160110.GS72200@home.opsec.eu> <0D187548-4221-4DA5-9A22-8478D9FB32F3@lassitu.de> <20190424205044.ll3rsu3hhfwxrxof@atuin.in.mat.cc> X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 0525981480 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of stb@lassitu.de designates 2a00:14b0:4200:32e0::1ea as permitted sender) smtp.mailfrom=stb@lassitu.de X-Spamd-Result: default: False [-1.35 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.931,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[lassitu.de]; NEURAL_SPAM_SHORT(0.46)[0.458,0]; NEURAL_HAM_LONG(-0.93)[-0.931,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: gilb.zs64.net]; IP_SCORE(-0.14)[ipnet: 2a00:14b0::/32(-0.39), asn: 13135(-0.28), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:13135, ipnet:2a00:14b0::/32, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2019 21:04:04 -0000 > Am 24.04.2019 um 22:50 schrieb Mathieu Arnold : >=20 > On Wed, Apr 24, 2019 at 06:34:06PM +0200, Stefan Bethke wrote: >>> Am 23.04.2019 um 18:01 schrieb Kurt Jaeger : >>>=20 >>> Hi! >>>=20 >>>> Did you find a solution? Please let me know. >>>=20 >>> There's a well-known problem in the sequence in which php modules >>> are loaded. I don't know if this is the case here as well, >>> but that's what we do: >>>=20 >>> fetch -o fixphpextorder \ >>> https://people.freebsd.org/~ohauer/scripts/fixphpextorder.sh >>> chmod 755 fixphpextorder >>>=20 >>> cd /usr/local/etc/php >>> cat ext-*ini > extensions.ini >>> fixphpextorder >>> mv extensions.ini.new extensions.ini >>> rm ext-*ini >>>=20 >>> Please test and report if it fixes the problem. >>=20 >> Thanks Kurt, it appears to fix (or at least work around) the problem. >>=20 >> Why is the default load order broken? Why does it not affect = everyone? >>=20 >> I moved all the individual inis into a bak subdir, and now only have = an extensions.ini. >>=20 >> If I understand correctly, mod_php/PHP reads the individual inis in = order. Why aren=E2=80=99t they in the right order? Can this be fixed in = the ports for the PHP modules? >=20 > Could you give the order that works for you, so that we can try to > figure out which module is making it break ? >=20 > Because there is no "right" order, there is an order that can work for > most people, and from time to time, two libs have conflicting symbols, > but it is not possible to detect that. So I made up an order that > should be ok, but some time is not. This is the order I=E2=80=99m actively using now: $ cat extensions.ini=20 extension=3Dsession.so extension=3Dfileinfo.so extension=3Dldap.so extension=3Dsimplexml.so extension=3Dctype.so extension=3Dmbstring.so extension=3Dtokenizer.so extension=3Dfilter.so extension=3Dpgsql.so extension=3Dmcrypt.so extension=3Dgd.so extension=3Dgettext.so extension=3Diconv.so extension=3Dzlib.so extension=3Dcurl.so extension=3Dxmlrpc.so extension=3Dbz2.so extension=3Dopenssl.so extension=3Ddom.so extension=3Dhash.so extension=3Dwddx.so extension=3Dmemcache.so extension=3Dsoap.so extension=3Dpdo.so extension=3Dpdo_mysql.so extension=3Dmysqli.so extension=3Dsockets.so extension=3Dxml.so ; additional extension(s) not known by fixphpextorder.sh extension=3Dintl.so extension=3Djson.so extension=3Dsqlite3.so extension=3Dzip.so extension=3Dmemcached.so extension=3Dpdo_pgsql.so extension=3Dphar.so This is the order as installed by the ports (at least I think that=E2=80=99= s the order PHP will read the files): $ cat $(echo bak/*.ini|sort) zend_extension=3Dopcache.so extension=3Dsession.so extension=3Dbz2.so extension=3Dctype.so extension=3Dcurl.so extension=3Ddom.so extension=3Dfileinfo.so extension=3Dfilter.so extension=3Dgd.so extension=3Dgettext.so extension=3Dhash.so extension=3Diconv.so extension=3Dintl.so extension=3Djson.so extension=3Dldap.so extension=3Dmbstring.so extension=3Dmcrypt.so extension=3Dmysqli.so extension=3Dopenssl.so extension=3Dpdo.so extension=3Dpgsql.so extension=3Dsimplexml.so extension=3Dsoap.so extension=3Dsockets.so extension=3Dsqlite3.so extension=3Dtokenizer.so extension=3Dxml.so extension=3Dzip.so extension=3Dzlib.so extension=3Dmemcache.so extension=3Dmemcached.so extension=3Dpdo_mysql.so extension=3Dpdo_pgsql.so extension=3Dphar.so extension=3Dwddx.so extension=3Dxmlrpc.so This is the contents of bak (the former contents of /usr/local/etc/php): $ ls bak ext-10-opcache.ini ext-20-intl.ini ext-20-sqlite3.ini ext-18-session.ini ext-20-json.ini ext-20-tokenizer.ini ext-20-bz2.ini ext-20-ldap.ini ext-20-xml.ini ext-20-ctype.ini ext-20-mbstring.ini ext-20-zip.ini ext-20-curl.ini ext-20-mcrypt.ini ext-20-zlib.ini ext-20-dom.ini ext-20-mysqli.ini ext-30-memcache.ini ext-20-fileinfo.ini ext-20-openssl.ini ext-30-memcached.ini ext-20-filter.ini ext-20-pdo.ini ext-30-pdo_mysql.ini ext-20-gd.ini ext-20-pgsql.ini ext-30-pdo_pgsql.ini ext-20-gettext.ini ext-20-simplexml.ini ext-30-phar.ini ext-20-hash.ini ext-20-soap.ini ext-30-wddx.ini ext-20-iconv.ini ext-20-sockets.ini ext-30-xmlrpc.ini These are the PHP packages I have installed, minus the web apps: $ pkg info -r php72 php72-7.2.17_2: php72-xml-7.2.17_2 php72-hash-7.2.17_2 php72-session-7.2.17_2 php72-openssl-7.2.17_2 php72-xmlrpc-7.2.17_2 php72-mysqli-7.2.17_2 php72-mbstring-7.2.17_2 php72-phar-7.2.17_2 php72-ctype-7.2.17_2 php72-tokenizer-7.2.17_2 php72-json-7.2.17_2 php72-filter-7.2.17_2 php72-gd-7.2.17_2 php72-zlib-7.2.17_2 php72-zip-7.2.17_2 php72-bz2-7.2.17_2 php72-iconv-7.2.17_2 php72-fileinfo-7.2.17_2 php72-pgsql-7.2.17_2 php72-opcache-7.2.17_2 php72-wddx-7.2.17_2 php72-simplexml-7.2.17_2 php72-dom-7.2.17_2 php72-pecl-mcrypt-1.0.2 php72-soap-7.2.17_2 php72-ldap-7.2.17_2 php72-curl-7.2.17_2 php72-sqlite3-7.2.17_2 php72-pdo-7.2.17_2 php72-memcache-4.0.3 php72-pecl-memcached-3.1.3 php72-sockets-7.2.17_2 php72-intl-7.2.17_2 php72-gettext-7.2.17_2 php72-pdo_pgsql-7.2.17_2 php72-pdo_mysql-7.2.17_2 --=20 Stefan Bethke Fon +49 151 14070811