Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107855 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35363 invoked from network); 24 Nov 2019 23:58:35 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 24 Nov 2019 23:58:35 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id CC43D2CF95D for ; Sun, 24 Nov 2019 13:52:49 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3265 194.109.0.0/16 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) Received: from lb3-smtp-cloud9.xs4all.net (lb3-smtp-cloud9.xs4all.net [194.109.24.30]) (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 ; Sun, 24 Nov 2019 13:52:48 -0800 (PST) Received: from [IPv6:2001:983:6fc5:1:d5f6:864c:b18b:3346] ([IPv6:2001:983:6fc5:1:d5f6:864c:b18b:3346]) by smtp-cloud9.xs4all.net with ESMTPA id YzoDiI9lqLwWdYzoFiTnvF; Sun, 24 Nov 2019 22:52:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s1; t=1574632367; bh=wQ79A9wolt9v7UxqQlekHLb/h88W4yH9+rBZRcBmWMQ=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=DRh3kfj2G3PfRc2YB5YEZWf48L5TNh8S9i+IJv+UqaRkQWL1vbbW6OhJEg7/zlqHv pPIGBrH8F6i/18jVqnzUlZAp9uiixmKmOFrYFBromm8OtKk1x992AyO2SZOB2NTEEr b0JtlsKah+2fkGj6tWkDWcWaXjWW5w5EdMoaf2/g/7LOMTyl1lXFUcWtRvr/rUiVrP mla+1c4ousKlW2McQeSLMATfJshkLX3C/BFjkOPy+M/hYQxyp1QLyx0rygQb4qRURp OyO86CUdCIxRQW1sQ6V9xe7Fx5bhE9l7ij0ebDsqPEcB+6kXWLT/y8/oWV2lpsvVFU fw4ckfBRirRdA== To: "Christoph M. Becker" , PHP internals References: <6fbd8905-a415-c723-dc87-ba7209539c0c@gmx.de> Message-ID: <261a9e80-8b88-2147-7a23-128621795f39@xs4all.nl> Date: Sun, 24 Nov 2019 22:52:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6fbd8905-a415-c723-dc87-ba7209539c0c@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfEpxj7tTQfYcCaiQxLJ0GLQxNVI3O1Vkp1wNq1J1XNpFGPP6WJ1Cas+QLCdU/I4Py8c3L/5p8gvOPwpSA6yPZjPA18Nm1H0r0l8IwAjsvnGNhvp/Ak48 vUrrpqBoCGoO31j8WBrxi+lWJk0ZYFuz3mAyPI3TpQPUyGY9LHuqCoMWnjPjvz7avd27JGk0SuDebTROgRzCsCn3Bd7tlBo2Y4jZNm1kZEZoSs+yMJTntaOs n4Idj4W5S5nxumdatWVR+75QhXdXjeMmAv6OOwbJjMLY/wmZc/jozphZ7nEWOZUX X-Envelope-From: Subject: Re: [PHP-DEV] Re: file_cache is prone to some configuration changes From: d.takken@xs4all.nl (Dik Takken) 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 OPcache).. > > Any thoughts regarding this issue? > Hi, 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? Thanks, Dik Takken