Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101689 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40500 invoked from network); 26 Jan 2018 11:43:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2018 11:43:20 -0000 Authentication-Results: pb1.pair.com header.from=Hajo.Locke@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=Hajo.Locke@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: Hajo.Locke@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:56599] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/90-35287-7541B6A5 for ; Fri, 26 Jan 2018 06:43:19 -0500 Received: from [192.168.6.96] ([85.13.159.249]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MCfcc-1eVj1S16bS-009TK4 for ; Fri, 26 Jan 2018 12:43:16 +0100 To: internals@lists.php.net Message-ID: <881dc9e4-2593-565f-4d88-a74078219bc3@gmx.de> Date: Fri, 26 Jan 2018 12:43:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: de-DE X-Provags-ID: V03:K0:pAAhoGr1sZE7mOA5kJAWsnJzp/mGpZg3dXEjto458cPgwRapnh1 Q176AVWv/93epwf8kYVqLJm7t5cb4vXSUIXaDgNJQtvaMSbPAXH2DaE1QsQd7EaMDKSHO41 JMZInrcTQ9WPPu2vbgjsyBOlsBZmdJNRtA/Rfd/7/BU7kICQMCpIc7XaO2bx/f8VIOgfqhm ydsMnjCxlMqvRD5H+JkZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:D7sYahzV5N0=:ped+BB2iEXn/lymwJwJsnL /1hhPzEchdReb0+A7r6OsOwpWi6L7uNMOrYHnc/oMv0K6ZIYmrE985PgQUr7t/AW8ngOJnbd1 TDHlXm+9VuIzHJC01UlZNXuhTBUM3C+fGP7O4+3fHf4s8rjahXCOjTBzzhnFjmkX/z4OXuf43 VqYJjTvwjnlA/Ohr8GkJofM8USnKNi6TGn49COGjxIkEaf5UOIN/fjfGXMFw6zS/KwSfrfq55 dn1CTHmcb01C92R4xY7BnnJGoK0jgqEaKhOtRtIu1aEXmbxUCtoWUhsImypau+lnBb5MOf8LJ +7aP2sgqX8KLPw57Z8LuGLRC8LOABFDCE+HGKa1pN4e2suM311jWcrJKMa6RNkaPJtpWCqI29 LLRfJPkb1haHS8t096Jr9OAtfe8JmHt/YDAkfMON6OyMdzk7/aQ7PsmqQBjviNb7yKmFq0JTo Aiaoc8fjJlRtF53rvPb0pAuLNRJynSEU6ymV18+ckxrj5ttYHVM+l/LVyIrvKhnlbSfQk0XoE JD56JnIK7inUDJqMDT708MF7MJUUxcVQCpaRyz2PACjtiKU4H769fxBYPz7HVuB7xAyy8d+nV NVWeT1ReFQpAQr4jdGikQKEz89oI0oP4TM/hPJbKL9hQD9ifxsQusmga+8TatiJxven0U6ug9 ts1D4EnCbaOcFxK8nRRZFtl4fFExpIdKIzlf/yZDOI8nRdNBDyb/jncHtvbHISVm3kgCNdVoX /YMCVhpdoYTU1xVeymxAhd/tZ6+NPP7G1d/9qEPgPAEerrsDfDNizJuOtz43OEbVB6TlHG5n/ axAys/azOXDL1m2MAiGut5xhg8izPeOLzYNXRDnRhs6Y/ksipw= Subject: threadsafe php crashes too easily From: Hajo.Locke@gmx.de (Hajo Locke) Hello List, i hope this is the right place to get helped. I have a promising setup for testing purposes, but unfortunately i ran quick into problems.  I compiled a minimal libphp7.so (7.2.1)  using this line: ./configure --disable-all  --enable-static --prefix=/usr --with-apxs2=/usr/bin/apxs2 --enable-maintainer-zts I enabled threadsafety to use this libphp7.so in apache 2.4 with a threaded mpm like worker or event. the plan is to just load it with LoadModule in apache but not to use it. the real php-processing is done by a fastcgi-setup in apache using php-fpm (not needed to reproduce error). the idea is to support php_value/php_flag etc. in .htaccess files for my users even if they use a fastcgi-setup. all i need is htscanner extension for php-cgi and just a loaded libphpx.so to register these directives in apache. may be this is a dump idea, but i have thousands of users who use libphpx.so and a huge number of .htaccess with php_value/php_flag directives. currently i see no possibility to tell users to switch to .user.ini First steps are really successful and all worked well. Even benchmarking the system with massrequests did not show any error. php_value/php_flag in .htaccess showed expected behaviour when requesting a php-file using fastcgi. Unfortunately there is only a small change to see lots of segfaults in errorlog: Just enable a php_value directive in VHost-Config for this particular VHost along with a php_value directive in .htaccess in docroot of this VHost. It is not needed to request a php-file, just requesting a small static file is enough. The smaller the requested file and higher requests per second the higher is count of segfaults. I knew that threadsafe-compiled php is a problematic thing and recommend mpm is prefork when not using a fastcgi-configuration, but iam surprised that i see the crashes so easily. I used a minimal php and it seems problem occurs just by reading and applying the values set by php_value for particular request. Do i have a chance to get this setup safe? Thanks a lot, Hajo