Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88460 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71100 invoked from network); 24 Sep 2015 05:34:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2015 05:34:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=themattficken@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=themattficken@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.44 as permitted sender) X-PHP-List-Original-Sender: themattficken@gmail.com X-Host-Fingerprint: 209.85.215.44 mail-la0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:34853] helo=mail-la0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/43-33598-55B83065 for ; Thu, 24 Sep 2015 01:34:14 -0400 Received: by lagj9 with SMTP id j9so74757096lag.2 for ; Wed, 23 Sep 2015 22:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WX6XBli7lULpdF6n5aM+dHT0mpiqPwZH3p9vsxIbZI4=; b=CdSjzL3m8uElneEac8vXvwXVE2RZTIjRH6Q9qAydRH2kIJFzleyJXtYVyPcHoZe1MP il4e43uO5rZznZShedXyhOnhFP6D+6hxJgZvNDImmqc//3iAoyrLQ3TK8H265nngjZoh HdGknU43CwXpZao5dwNDe121r1r6TQPI8XOQmJsBL8rxmargpcLEFH4SFqkG4K3E0OVQ eA59IOc/EyD9NaZDJSG2FCe/uvkHheaMccT+XV6KEdbWorBNVf1wI25QBDJYQW70lyt+ wg2BvZV/zt4ub5WqIqfy8gVhniq4iOVBNrzlA+u9KGDNc6XG1gwbg2uD1mGRBb66FeVm xzQw== MIME-Version: 1.0 X-Received: by 10.112.142.9 with SMTP id rs9mr12641294lbb.39.1443072849990; Wed, 23 Sep 2015 22:34:09 -0700 (PDT) Received: by 10.112.46.38 with HTTP; Wed, 23 Sep 2015 22:34:09 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Sep 2015 22:34:09 -0700 Message-ID: To: Dmitry Stogov Cc: PHP Internals , "dmitry@php.net" , Xinchen Hui Content-Type: multipart/alternative; boundary=001a11c36da09bde5c052077943a Subject: Re: Windows OpCache bug fix From: themattficken@gmail.com (Matt Ficken) --001a11c36da09bde5c052077943a Content-Type: text/plain; charset=UTF-8 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 >> > > --001a11c36da09bde5c052077943a--