Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94032 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4509 invoked from network); 16 Jun 2016 03:11:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2016 03:11:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.51 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:36014] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/34-10183-CE812675 for ; Wed, 15 Jun 2016 23:11:41 -0400 Received: by mail-oi0-f51.google.com with SMTP id p204so49744713oih.3 for ; Wed, 15 Jun 2016 20:11:40 -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; bh=/XuIMKfyDfqEvsL1ZZw4IgpaI/wnAPYzQgER8r84050=; b=WJ8yNRpOhypbIrxtytb4MtDFF7UuSqJouBlfz9CIm86v+m7XHnJX69S6f+i8f1JxpI H4caU0TZGY4daUFCH+oySiLhqsPtMJFMlzGrk9J0K9E99tGJLWDFVm4flQ+e5VkedPOd +ALC/14rNN4pPTiRzV2YNKsOqhbDI+oU/ZV7xttUJvnYpFcOWYd3LdMdWovTS5Ix0U99 Rfn+kuy42o5YHuW0xhBFtLk/HBRlVm9yOQup+ooSwcL/kksO4SS81uhVU8kP+bjSs7/k SZeTo66TkLxxH5rPiznKEzw3RdUmkUXpvx6D2RridUHlAHWA8z4KG2mr8uGd4aQ276Yt HbEg== 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; bh=/XuIMKfyDfqEvsL1ZZw4IgpaI/wnAPYzQgER8r84050=; b=d72bjn52Vg3YF12vNvvnBvsl/MyUdGZqlaOgeLZLQSgK8SnyUK1JyCBs66ppF86xuh AeTbsFPxV3C0EX1BcZiLBvsA7TBC0MMxBNMhFwKt8b3vVFDy64FpBUyPYExxxEv8N9Lz 2/t4v5NvcwDaqCLaI4nb6kfe/Q6zx2jVqJLbfNq+YG2fIHxXdJ5pIyeoMsiFkuJI1DO9 r4ebASDjqVuKXBxgmH6jRBrkuQ8V+mf9uf4f+L0/ejrtCFSUhjRrNHywZdvFhaKu0UA8 CPHsJcT1dfc1EMccMJ4MZKeJJw4GPld6QfrVxbPSZIciOEuov7TxCf6aMRnjB5j647jX 7QDA== X-Gm-Message-State: ALyK8tIRlpzZkT0V0PMAaFnjnNEIc6eOKd4ey6KpKBLmBObTD7nW0fSVE3pKKH0ytAcnoNswwIxF9Ycrp7ySEQ== MIME-Version: 1.0 X-Received: by 10.157.9.66 with SMTP id 60mr1229835otp.23.1466046698245; Wed, 15 Jun 2016 20:11:38 -0700 (PDT) Received: by 10.202.108.197 with HTTP; Wed, 15 Jun 2016 20:11:38 -0700 (PDT) Received: by 10.202.108.197 with HTTP; Wed, 15 Jun 2016 20:11:38 -0700 (PDT) In-Reply-To: References: <4771c925-65e1-536f-e573-250dc99f2e39@gmail.com> <0e11e396-48be-ae7d-4a7a-8b964d2cf128@gmail.com> Date: Thu, 16 Jun 2016 10:11:38 +0700 Message-ID: To: Peter LeBrun Cc: Trevor Suarez , Michael Felt , PHP internals Content-Type: multipart/alternative; boundary=94eb2c04f718ac555505355c98b5 Subject: Re: [PHP-DEV] PHP allocating too much memory From: pierre.php@gmail.com (Pierre Joye) --94eb2c04f718ac555505355c98b5 Content-Type: text/plain; charset=UTF-8 Hi On Jun 16, 2016 7:22 AM, "Peter LeBrun" wrote: > > Hey everyone, thanks for your help and input. We've narrowed it down to > cases where there is string concatenation with a constant, but currently > upgrading to 7.0.7 to see if that makes a difference. Is it possible to open a bug or post a reproduce script here please? > Enjoy your evening, > > Peter > > On Wed, Jun 15, 2016 at 1:50 PM, Trevor Suarez wrote: > > > On Wed, Jun 15, 2016 at 11:34 AM, Michael Felt wrote: > > > > > > > > > > > On 15-Jun-16 15:55, Rowan Collins wrote: > > > > > >> On 15/06/2016 14:01, Peter LeBrun wrote: > > >> > > >>> The weirdest part about this is that PHP is somehow trying to allocate > > >>> 140TB of memory. > > >>> > > >> > > >> I've seen numbers like that a few times - always around 140TB, but the > > >> exact number varies. I assume it's an overflow (or underflow?) > > somewhere, > > >> but the exact mechanism escapes me. (It's close to 2^47, but not very > > >> close; I've got examples logged as "low" as 140090229815192, and I think > > >> I've seen under 140 trillion.) > > >> > > > In hex: 00007F694C627798 - so apparently 00007F69400000000 is common to > > > all. > > > FYI: I have seen similar issues with mixed environments (32 and 64-bit) - > > > at this point I am surprised that you can even dlopen() both sizes (my OS > > > now refuses to dlopen() 32-bit modules aka shared libraries when 64-bit > > > application and v.v.) > > > > > >> Apart from sheer curiosity of where this magic number comes from, I > > >> wonder if there is some sanity check missing in the memory manager to at > > >> least display a different error message... > > >> > > >> Regards, > > >> > > > > > > > > > -- > > > PHP Internals - PHP Runtime Development Mailing List > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > I've seen this bug come up with the SOAP extension. I saw it happen when > > instantiating a SoapClient or SoapServer when the constructor tries to load > > a WSDL file under very certain circumstances. If the SOAP WSDL caching is > > on (if `soap.wsdl_cache = 1`), the WSDL file is cached (or is attempting to > > be cached) or the WSDL must be downloaded, and the file-system is full, > > then this crazy overflow can happen. I believe it's due to the WSDL's > > becoming corrupted due to the file-system halting the write of the file and > > PHP not cleaning up the improper write. > > > > In fact, this is a reported bug: https://bugs.php.net/bug.php?id=62337 > > > > Hope that helps! :) > > > > - Trevor > > --94eb2c04f718ac555505355c98b5--