Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48938 invoked from network); 11 Mar 2015 22:59:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2015 22:59:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.178 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.178 mail-vc0-f178.google.com Received: from [209.85.220.178] ([209.85.220.178:51470] helo=mail-vc0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/3A-32765-1D8C0055 for ; Wed, 11 Mar 2015 17:59:29 -0500 Received: by mail-vc0-f178.google.com with SMTP id id10so4185098vcb.9 for ; Wed, 11 Mar 2015 15:59:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=e5CMg1afSjh4fNteNA5OEph1j9ws4UuOTsIOscANrEY=; b=FzT9cNm3wNBGUDqdO3Yrr2jiPQoSFv7AsTqkohCljLaFv3F/9my7wIYMb5zhWtUqGr UZayygiFW94MM0lVxlbdCmFAPUznli4NsS+q7Kv/2YOoKY73cTos1x7s6S+51jsId21e IJE9PNiA07yKE+boGlvkKVJXsx50PRsUh2/azz9Ypj7kHTf0XIGFJZuebFWznqSxcHn3 gdzZcbgHxH8pB03hO04DlZzLXrREpJ8l86wSlXA8zeeODILKWoZRcbv2TouOe7F295hS uUEvbDZtW2FDWJtX44fhqb+Thhp6NKvuYz2y1fdFdD0yuNZyZUX0WySdpFlXD0JR399I 1Htg== X-Gm-Message-State: ALoCoQnFT/BYL48hN6ZUoO+nZWMwzVu3NlqaHE0/fxVv+JBYQ7/IrZWpaC0mdIlfhW0ugzt8YY4GYRH1KryduLxuD9lA0Hns6pxQdsUgidnSnWFpDUxCm8eFVWwC5pgQV1cyX0HggLVUaWoOhGgA5CUQ8+MPYLhSjw== MIME-Version: 1.0 X-Received: by 10.52.122.166 with SMTP id lt6mr18725906vdb.38.1426114766992; Wed, 11 Mar 2015 15:59:26 -0700 (PDT) Received: by 10.52.113.231 with HTTP; Wed, 11 Mar 2015 15:59:26 -0700 (PDT) In-Reply-To: <5500C5D7.9010808@gmail.com> References: <5500C04D.9000805@gmail.com> <5500C5D7.9010808@gmail.com> Date: Thu, 12 Mar 2015 01:59:26 +0300 Message-ID: To: Stanislav Malyshev Cc: Rasmus Lerdorf , Nikita Popov , Xinchen Hui , Anatol Belski , PHP Internals Content-Type: multipart/alternative; boundary=bcaec52be9bf188ee905110b3832 Subject: Re: [PHP-DEV] Safe execution timeout handling From: dmitry@zend.com (Dmitry Stogov) --bcaec52be9bf188ee905110b3832 Content-Type: text/plain; charset=UTF-8 On Thu, Mar 12, 2015 at 1:46 AM, Stanislav Malyshev wrote: > Hi! > > > I think, after "max_execution_time" is exceeded, we may start another > > "hard_timeout", and in case the EG(vm_interrupt) wasn't handled > > "safely", kill the process. > > I remember such proposal floating on the list recently, with two-stage > timeouts. But wouldn't killing the process run the same risk that it > left something messed up in SHM? > yes :( if we try to recovery from some inconsistent state we most probably crash. I even don't talk about memory and resource leaks. > Also, in threaded environments that's probably not an option, and PHP > may not even own the thread. > I'm not sure how the existing setjmp/longjmp based timeout handling works in ZTS environment now, because except of SHM it may also easily corrupt the process memory shared with other threads. Thanks. Dmitry. > > -- > Stas Malyshev > smalyshev@gmail.com > --bcaec52be9bf188ee905110b3832--