Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116725 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69358 invoked from network); 23 Dec 2021 03:14:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Dec 2021 03:14:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 601751804D4 for ; Wed, 22 Dec 2021 20:18:21 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 22 Dec 2021 20:18:20 -0800 (PST) Received: by mail-ot1-f51.google.com with SMTP id w19-20020a056830061300b0058f1dd48932so4831978oti.11 for ; Wed, 22 Dec 2021 20:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=84YJEkfT8dS5vwlnP9uDxXLZ26xi0U7kmTpQ/2xFYC0=; b=FiIYSetX9z0/bUHUnKUAFrRjOgVdElmYRmShyVvM5rIlRgyWd+CcCEVl+A91D8brJG FiewOEU1xwTKnsuKvMWRgZtdNsHVC+ZgK0WjNnLwk+OoDRrGvqle0+fZ6wMMBrsXzvgI mkJz3MbYp4j+Bildz0s3q3k5B8UOXezOHgKp591vc7KZYaNqn0KVWmSEOUoAVAGoikXZ o8emGHhTUC9DSgMBDF9m5175+eDJNRM/zJGzhKg2g49BGzgdbhOtAHNfPMXzM4LrJGK/ 7EKSosT7FjGDVo06sKmdtBqgHxDgOHTXLCBm/MD35DYZTDXdO4hCPSYHCotVBGeaVkc5 avyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=84YJEkfT8dS5vwlnP9uDxXLZ26xi0U7kmTpQ/2xFYC0=; b=GVfsPg2PgljrMTiFrfsbyr8eTQBWnicC8l4+9LJX972YBcpSXXvQlQ9X8odei/DCoW SXy36J5CY09mgkKNLuzRiAqEBQkvjUCgH55mIVdVIuyNFNvoPr5cuQo7aRRp4yrhoM49 XKTmGpAdSI0HS/ONYqCT9nWLnUbSaQD/VeILO12zcAPScMuDoP0Rx1rrueUh0rfDLjxE w9FbA8c3gTStJyhOzO7awZFZDbuSeQI9tPNd+X6FOnyAGdV3gQgD6SdvJb46W7gQc9xs KPcbO2dQTkPBya7KmjivqcswcMvOMB4xmDaAJF6/ZNhgcM17nXrrZ2pZbQPYHQxW/n3O 1Jyw== X-Gm-Message-State: AOAM531+oERd/QFKpPwlPkNqnnnYtUOZYCZbsXW5z2f+vP0541ucqZpQ ZavO3RmDC3r5G48kDamJfoxUTsQXDRvF0Bg8IvePrkdQpds= X-Google-Smtp-Source: ABdhPJz72yqkdDORXV4WP1wpJWOCNK/wvnRC0fSEjrwgzNWF0+hXvPUEO2h8cSaPGtc4sJigE/ZcG/PU1KmtF5t+Pf0= X-Received: by 2002:a05:6830:348f:: with SMTP id c15mr391581otu.254.1640233099964; Wed, 22 Dec 2021 20:18:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 23 Dec 2021 11:18:10 +0700 Message-ID: To: "Christoph M. Becker" Cc: Jakub Zelenka , Derick Rethans , PHP Developers Mailing List Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: PHP-FPM process management woes From: pierre.php@gmail.com (Pierre Joye) On Thu, Dec 23, 2021 at 5:32 AM Christoph M. Becker wrote: > > On 22.12.2021 at 22:44, Jakub Zelenka wrote: > > > After thinking about this a bit more I think we would still need some way > > to provide the current functionality of the MINIT if that's moved on child > > level. The problem with not having such step is that opcache shm would be > > then segmented between children - each child process would have its own shm > > so it means that it would likely break things like opcache_reset that would > > work only for a single child but wouldn't have any impact on other > > children. > > I think the children could still re-attach to OPcache (like on Windows), > and that might not even be that bad as on Windows (where ASLR can break > that). However, forking late might break preloading (not sure), and > generally re-attaching isn't the nicest solution. I remember some similar issues a while back. I wonder if it could make sense to separate these two flows. The MINIT is critical to many extensions, not doing fancy things like OpCache or similar. Would it be possible to split them? One actual MINIT (as per doc, once per process) and one for more fancy stuff like what is done in OpCache (or apcu afair)? I can't think of another way to make the MINIT/SHUTDOWN API behave as it should while being designed before fpm came to life. Or we let the ext developers handle it themselves by providing some helpers function about the current stage the ext is in (root process or childs) but that will be painful to do and port. Best, -- Pierre @pierrejoye | http://www.libgd.org