Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107859 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78738 invoked from network); 26 Nov 2019 10:30:05 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 26 Nov 2019 10:30:05 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 78FBE2D20B9 for ; Tue, 26 Nov 2019 00:24:40 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Tue, 26 Nov 2019 00:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1574756678; bh=YaubUDWcWV6qAMb6Pbhq2Asowxq09iVtH/eIMqyJB70=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=hNw23rd3TqPAHGnHFMM/Mynkek6T3NBX9703xMh7/qPcl/y/Dhc5X4yxwQQr0oHda F1Iz5OMu9M+16ni1WElG18ygV/LR5o0JV+s28WBq6P3G4NlVtFq9tLYKSdOPzV7tb9 7e2BWsUxe+W07xYivJrcx/RsuOTDdJHMo9OtHv1g= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.93] ([84.179.238.88]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MNKlu-1iBpOu0tdC-00OmBV; Tue, 26 Nov 2019 09:24:38 +0100 To: Dik Takken , PHP internals References: <6fbd8905-a415-c723-dc87-ba7209539c0c@gmx.de> <261a9e80-8b88-2147-7a23-128621795f39@xs4all.nl> Message-ID: Date: Tue, 26 Nov 2019 09:24:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <261a9e80-8b88-2147-7a23-128621795f39@xs4all.nl> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:EUCSG5t3L+2e8CofHkl0nfqjrOrYZbRP4k1FENFiVqIiN8ICSr6 R1Ltd3zr+2c3mQZcew1Wz7Yv7n9hZIYA5HKrErxuSVH3ygQfRC8/HgacQ1iq402fmFDDlZu 5POlZtenB3gYyENaGccgJc1ZtjdH6YpXq2KB3LbTG6nlquHEfwQ4BvPLFNHPrlpNU+ZSLvv B2NHq0enJdAxrs/xMGMhA== X-UI-Out-Filterresults: notjunk:1;V03:K0:QbSJHLKGMTA=:UNDzCoG1Da2Yyukn0bYOWU byy9LAfFMGLcXMPfgyy24bbqzlyPQ5rxIjbSbREJa9hUM7AW+tWvQCbYxtsgfq5K6uM4xYy4w gQfS/1xKQNvzMHafLNdlfer/lw1w7tNdl8lyOVxmKxxujWJ7GoRmoMaCUSGHehTzWLQ6z36UK SVBdVONHhkjvlj6BD15N+HxV2A9hvyBeOMbLrJl5ifE3h+CqqbJOuBXq0uwMzU3RqZ3lBIAVp 1x9tQrCCoUves7KDmBDPbbtnQIprUyI+m2VL5pTq+gonx/vYVQ6SCOHkslnLST9Fpw7pB2lj7 uXCm0VU1nlmGoCn+iIm56ZNO3VuD94xYXqbZS/lb7XzXm3IhrLPmstoU7lrspQu38PkXOs+6s J+DwcGpN34Q7F4SH09H9nrELPlJppjbTSfzWq1VFBcOsNHXixqCgwukFERawujAtDwZdonZt3 h4uBVputS5LjjbFI9gnkFNcrP11+fjt0elmMx2tzLrZZHY+5Nf9sg6a/9O7nQ7KXzJgZbPATT wcjmXVB0Yo4yyhQiV/4ACoGuab941C2Hprj2TXw/6lgyK3ePiQ5XHAWSU0PQRAVYO9t3FwIpR 2W0laglQIgC7nxIC1M0x8TT7pBVM+4ShH4X4djvgO5Pm/11nBY4pA3bN75KZ6G/COlhXVwzV8 kzlKPXrXkJEAlR47LEDnK6NO6L4Xbq09Rrtg8Z9c7nHTmNOHIVtNzTT2G+BanmCQou4R5MLzD UheW+HsWXijmaKa8wRrZHD1g4uuTYhgvq/Fc1VGh3xoFAvjd40FqEPowTY8r51MUPhqTZ3wHO RiGsX9pd693zXBjTJef6Xr6DXLAGd0Al+cB+2sYO+HHLAtQcx8wKvk89gl/l2H/U4fFDCVrNF MkZxhOArjIgN2RFPlMgUepX+mSN1/zT6ACe3uNTvw6IoPlho5RDUD5c6vykVZs1ok8yxMh8aZ tV851POklF81k5MssB9uBVKAz+yxqWHd95/aXoKNA1uskiPcV7jp5JG0Jv9l1C9e5S5NcvHdP l7wbqNZjsewBEGXC2MBdXCPJYuH21QuMKb4QPio4LHIE5VerXpPTJHMRh2BZWdLSPE1XDL07U xeEObN29eNuCc43RvxKEldZu830KKoakEgYsWcRrNrL+Okimf52uKtLA5tfpeMC+GBvgdWSjF 1fE3ULhKFtsor/WiixvC+Ikdqc//Tk1GxXs6hIaNN7q1zM8A2aN/YV8fbyxBIxwWRco2TXhm3 w2Iix4I0lUVRRbbIT7JDsaNBpqwEbpAjdcd0CFLi+kJetvh1c6biS5sBuRts= X-Envelope-From: Subject: Re: [PHP-DEV] Re: file_cache is prone to some configuration changes From: cmbecker69@gmx.de ("Christoph M. Becker") On 24.11.2019 at 22:52, Dik Takken wrote: > On 19-11-19 10:44, Christoph M. Becker wrote: > >> On 06.11.2019 at 14:02, Christoph M. Becker wrote: >> >>> while having had a closer look at , I >>> learned that OPcache's file_cache is prone to some configuration >>> changes, which may cause PHP segfaults (and maybe other malfunctions). >>> For instance, if Xdebug is enabled while a file is compiled, but later >>> disabled when executing that file, the process is segfaulting because >>> the cached file relies on user opcode handlers which are no longer >>> available without Xdebug loaded. I'm presenting Xdebug as example >>> because that likely caused the issues reported in that ticket, but >>> basically any extension can call zend_set_user_opcode_handler() to >>> install user opcode handlers, causing the same problems. >>> >>> It should be mentioned that, to my knowledge, shared memory caches are >>> not affected by this (except for Windows), because re-attaching a >>> differently configured php instance isn't possible at all. >>> >>> Anyhow, should we fix this (assuming a general fix would be possible), >>> or would that be rather a documentation issue, based on the assumption >>> that such configuration changes don't make sense in combination with >>> OPcache at all (IOW, if such changes are done, users should reset OPca= che).. >> >> Any thoughts regarding this issue? > > My knowledge of opcache is limited, so please forgive me if the > following is incomplete or incorrect. My impression is that the amount > of information that is used to compute the hash for the file cache > directory is a bit low. I see the PHP version go in, an internal API > version and some machine architecture related things. > > I would have expected that much - if not all - of the output of > phpinfo() would be included in the hash for example. Better be safe than > sorry. Would that be a sane thing to do? Are there any reasons why this > is currently not done? Factoring in the complete PHP info can't work, since that also contains some request specific information. Furthermore, a lot of these details don't matter regarding the cache, so cache reuse might be suboptimal. A more general problem is that OPcache calculates the system hash during its startup, while other extensions may not even have been loaded. Not sure if that can be resolved. =2D- Christoph M. Becker