Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88468 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92904 invoked from network); 24 Sep 2015 08:29:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2015 08:29:43 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.160.177 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.160.177 mail-yk0-f177.google.com Received: from [209.85.160.177] ([209.85.160.177:33423] helo=mail-yk0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/86-33598-674B3065 for ; Thu, 24 Sep 2015 04:29:43 -0400 Received: by ykft14 with SMTP id t14so68879105ykf.0 for ; Thu, 24 Sep 2015 01:29:39 -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=MLlSyKI4L3lLEZOHuyhcbKEpo5tSkwGtCGuBkUsbkIk=; b=ILAslq29WaqmppOBYbuuMvMFcf59LZHemu8TB+iror3u6EoiUuBOw8Q3qSL/J5gpmy Vm/ua0uChNHB+NAW3vR0bAbSpvLXas4+SyXaf+xfmvarMcrmTl90jH7SvVLSKLs3erQh t2phoJ8fdozjnmd+pjttz16/ffg+1dJImaD2luH2H4JNkIMEFTMcJRqeBzSqzBKoFsCc fxka4zPw6rGgbbi3z9g8V1XwLecSX6sUXvL/EUcLBi3KHJ7To0brH4pTfJL+SJ28R9hI /IqFlAs1P+uGNs5maRNEA8UzJB7II8ES2C8/IcKDoOa0OiRo0yIspe+5ReYzctG/o8us ZwAg== X-Gm-Message-State: ALoCoQncHx8tsyCxSd04a5hq+VU2IM1vv+qj7ILe5+ItJ3K5sUxPiHD3Ej8xsCV7qQpPFEqt5Cg5CRlm3wZvBbamW4HNbekbB82C07S548ALr0Wew0UE4M8PX1HLUjkcBk8vxNvpBMKMUFdUNnjO9/nPRN5kVHQ/ZhJSbij+G7/ENnOJSRbp1qY= MIME-Version: 1.0 X-Received: by 10.31.171.73 with SMTP id u70mr24892520vke.61.1443083379101; Thu, 24 Sep 2015 01:29:39 -0700 (PDT) Received: by 10.103.24.5 with HTTP; Thu, 24 Sep 2015 01:29:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 Sep 2015 11:29:38 +0300 Message-ID: To: Matt Ficken , Anatol Belski Cc: PHP Internals , "dmitry@php.net" , Xinchen Hui Content-Type: multipart/alternative; boundary=001a11438ac631782a05207a08c7 Subject: Re: Windows OpCache bug fix From: dmitry@zend.com (Dmitry Stogov) --001a11438ac631782a05207a08c7 Content-Type: text/plain; charset=UTF-8 Ops, I forgot to revert the exit condition. http://git.php.net/?p=php-src.git;a=commitdiff;h=2d55e8c186ef1034c2af64478da8f23dbeb28be9 On Thu, Sep 24, 2015 at 11:00 AM, Dmitry Stogov wrote: > hi Matt, > > Thanks. > I also moved the exit condition to be before Sleep(). > This should prevent race condition on last iteration (after unlocked sleep > process should try to reattach). > Committed to PHP-7.0 and master. > > > http://git.php.net/?p=php-src.git;a=commitdiff;h=262160e0e9919dce914df2f0643c4b16ca137454 > > If this really works, we should backport this into php-5.* as well. > > Thanks. Dmitry. > > On Thu, Sep 24, 2015 at 8:34 AM, Matt Ficken > wrote: > >> Ok, I have a new PR just to unlock around Sleep(): >> https://github.com/php/php-src/pull/1536 >> >> Just by unlocking around Sleep() the OpenFileMapping loop will work. >> Holding the lock in that loop will not only block detach_segments() in >> other PHP processes but also reattaching in accel_startup(). >> >> Checking the base address used when this issue occurs during some of my >> stress testing, most of the time the base address used is the first in >> vista_mapping_base_set. Its typically the timing between the locking and >> mapped file operations between processes more often than the base address >> selection. >> >> Especially ASLR, also PECL DLLs, and other factors will still cause this >> issue occasionally, but this fixes a majority of my occurrences. >> >> Regards >> -M >> >> >> On Wed, Sep 23, 2015 at 2:04 AM, Dmitry Stogov wrote: >> >>> Hi Matt, >>> >>> It looks like with your patch, the same file may be mapped to different >>> virtual addresses of different processes and this won't work. >>> I think usage of vista_mapping_base_set[] in your patch is wrong. >>> >>> Do I understand properly, that zend_shared_alloc_unlock/lock_win32() >>> around Sleep() is the main part of the patch? >>> >>> Please, next time, try to make PR diffs as small as possible (without >>> messing real fix with formatting and rearranging changes). >>> >>> Thanks. Dmitry. >>> >>> >>> >>> On Wed, Sep 23, 2015 at 10:10 AM, Matt Ficken >>> wrote: >>> >>>> I want to increase visibility for my PR 1531, >>>> https://github.com/php/php-src/pull/1531, my patch for fixing an >>>> intermittent OpCache issue on Windows. >>>> >>>> Details, etc... are on the PR. >>>> >>>> Regards >>>> -M >>>> >>> >>> >> > --001a11438ac631782a05207a08c7--