Date: Wed, 24 Apr 2019 23:03:51 +0200 From: Stefan Bethke <stb@lassitu.de> To: Mathieu Arnold <mat@FreeBSD.org> Cc: Kurt Jaeger <pi@freebsd.org>, Marcel Bonnet <marcelbonnet@gmail.com>, FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: PHP 7.2: SIGSEGV in OpenSSL Message-ID: <0AEC703C-5ACE-44BD-A9D3-70ABBA8785EB@lassitu.de> In-Reply-To: <20190424205044.ll3rsu3hhfwxrxof@atuin.in.mat.cc> References: <67841009-B4BC-4F0A-BB53-77487EE19CBD@lassitu.de> <CAPe0dBk7DAq9cWSzjwcKGzadjeDtjcmz3KmQq2hD=sYf-JOgKQ@mail.gmail.com> <20190423160110.GS72200@home.opsec.eu> <0D187548-4221-4DA5-9A22-8478D9FB32F3@lassitu.de> <20190424205044.ll3rsu3hhfwxrxof@atuin.in.mat.cc>
next in thread | previous in thread | raw e-mail | index | archive | help
> Am 24.04.2019 um 22:50 schrieb Mathieu Arnold <mat@FreeBSD.org>: >=20 > On Wed, Apr 24, 2019 at 06:34:06PM +0200, Stefan Bethke wrote: >>> Am 23.04.2019 um 18:01 schrieb Kurt Jaeger <pi@freebsd.org>: >>>=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 <stb@lassitu.de> Fon +49 151 14070811
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0AEC703C-5ACE-44BD-A9D3-70ABBA8785EB>