Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64377 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76291 invoked from network); 20 Dec 2012 11:36:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2012 11:36:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain zend.com does not designate 209.85.219.47 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.219.47 mail-oa0-f47.google.com Received: from [209.85.219.47] ([209.85.219.47:42239] helo=mail-oa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/1D-04341-D48F2D05 for ; Thu, 20 Dec 2012 06:36:47 -0500 Received: by mail-oa0-f47.google.com with SMTP id h1so3183436oag.20 for ; Thu, 20 Dec 2012 03:36:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=c/XrQ+XFozlGeAS3MqbiWBrXqCDljn5TKOMmZM4V7eg=; b=j4aLBh7N5UZDyySWGvg1rPhV5AA1ozDH7Y3uDbGZ+IQ6IokAQ6ftwvY2dw5cIygI2C lEGqgd93Z0wFweTzw7QxzzPoIBcbVKTutJzwG+gu1xtwyU+jDC3TYtfDYZn4epM6Tdxw O7SCCpwvJJjULrC6hW+y54Yl/CR23AQg7x+Nwgdm6IrDs6RUMZG6Kwhzg8fmrdk2l8YJ 6HRWWOOQ2FkUKMbc3cjUioJVVGmckyl8YNd/Q/1rdMFQDviIFn7SR+ubfpNXGlcaFczX 9YLXr6kvGQXDkKsbAIL+eamAbknnisq94/5TO0W8GzkQKaU96blhCbH+ym7lgKbjKVan Q67Q== MIME-Version: 1.0 Received: by 10.60.32.199 with SMTP id l7mr7413308oei.76.1356003403369; Thu, 20 Dec 2012 03:36:43 -0800 (PST) Received: by 10.182.214.106 with HTTP; Thu, 20 Dec 2012 03:36:43 -0800 (PST) In-Reply-To: References: <50D210F9.8050707@lerdorf.com> Date: Thu, 20 Dec 2012 14:36:43 +0300 Message-ID: To: Pierre Joye Cc: Rasmus Lerdorf , PHP Internals Content-Type: multipart/alternative; boundary=e89a8fb1f5002c0da104d14725e9 X-Gm-Message-State: ALoCoQk2HNst6yMax9KGsYPo6WrpS6iECQRz2I8J3/Iwz+SyutmyMC52Wud84+S0cXMEdPn/Wp4zgo5y93zOUoQxib0BA7jvDsDthFt3v/WAT2O56UAEG9K7Lm+eMSu6wgQcUZu/m1y6 Subject: Re: [PHP-DEV] Complete traits redesign for 5.5 From: dmitry@zend.com (Dmitry Stogov) --e89a8fb1f5002c0da104d14725e9 Content-Type: text/plain; charset=UTF-8 Hi Pierre, The following test may crash on the second request with opcode cache. hello(); ?> Valgrind shows the problem even if PHP doesn't crash. ==2623== Invalid free() / delete / delete[] / realloc() ==2623== at 0x4007F0F: free (vg_replace_malloc.c:446) ==2623== by 0x837CC7C: zend_clear_trait_method_name (zend_opcode.c:273) ==2623== by 0x8393B1B: zend_hash_apply (zend_hash.c:716) ==2623== by 0x837D4C7: destroy_zend_class (zend_opcode.c:312) ==2623== by 0x8392464: zend_hash_apply_deleter (zend_hash.c:650) ==2623== by 0x8393D38: zend_hash_reverse_apply (zend_hash.c:804) ==2623== by 0x8378C3B: shutdown_executor (zend_execute_API.c:305) ==2623== by 0x8386C09: zend_deactivate (zend.c:938) ==2623== by 0x8329815: php_request_shutdown (main.c:1790) With opcode cache op_code->function_name is actually allocated in shared memory . Thanks. Dmitry. On Thu, Dec 20, 2012 at 12:07 PM, Pierre Joye wrote: > btw, same to test your changes/branch, as we have seen some crashes > happening more easily on windows (same bug(s) on linux but with harder > to get them crash). > > On Thu, Dec 20, 2012 at 9:02 AM, Pierre Joye wrote: > > hi Dmitry! > > > > On Thu, Dec 20, 2012 at 7:54 AM, Dmitry Stogov wrote: > > > > Thanks a lot to work on that :) > > > >> I'm not sure about APC, I saw the problem in ZendOptimizerPlus with > >> php-5.4.10. > >> O+ crashes (or corrupts memory and crashes on following requests) on > each > >> trait usage. > >> The problem that PHP tries to deallocate names of methods defined in > >> traits, but O+ keeps them in SHM. > >> I believe APC must have the same problem. > > > > Do you have some phpt to share? I can run them in our tests labs and > > report issues to the bugs tracker, and see if Anatolyi can help to fix > > them as well. > > > > > > Cheers, > > -- > > Pierre > > > > @pierrejoye > > > > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > --e89a8fb1f5002c0da104d14725e9--