Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94029 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95195 invoked from network); 16 Jun 2016 00:22:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2016 00:22:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=peterlebrun@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=peterlebrun@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.52 as permitted sender) X-PHP-List-Original-Sender: peterlebrun@gmail.com X-Host-Fingerprint: 209.85.192.52 mail-qg0-f52.google.com Received: from [209.85.192.52] ([209.85.192.52:34020] helo=mail-qg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/D2-10183-141F1675 for ; Wed, 15 Jun 2016 20:22:25 -0400 Received: by mail-qg0-f52.google.com with SMTP id k6so20817497qgk.1 for ; Wed, 15 Jun 2016 17:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XhHcFItwmjbHppFencQBvn4/mmwrr0X6uPkNAeCx4xI=; b=qD5Q6C4BuKTDjH+RLrBOAtq2Tmlc6B8NP7PQvYohqp9qEaIKX/roji6kmooMP8klHV CT2UEfwg6/2A8n8Mr2pZqB8eQbi7rSL6nxCh9aOLti1keYLFHaa4m45fmZnu5K87bXUT wPDrPBeueLMmgiUTzuOqtGBcpDBs9L45dKlszdHnmlopbOY9jhfYd1v8A+V/v33dkg+G iih+CbYFia8jDkFMRAmf4zBsRPINTcTvdDq6rhGh8ZHGhfyzMQLW9wKuoJHiUpgIivdZ xu5Aqbrgv7Cb0o5GlxxAup5/83cxBPaHAQpwRJyukwMe0D2cHHSZs6kZJKnEuxojCVtj GhlA== 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:from:date :message-id:subject:to:cc; bh=XhHcFItwmjbHppFencQBvn4/mmwrr0X6uPkNAeCx4xI=; b=hNPOTziou/b7mBsO/eIbdSwO999KABVPNGcWSvu+XyvbpbrQbL3gADTIssrPk/gx5b NB/vCa9m6+9BwtawVe9mSxjpwvvrDl8hOuym292ouRA9xIMOGHJz5Hhpm/EFfZz4/8tp B096Uwx01Ki5Td1zOw+Dt1LnNrSHY1IYm1SE38fdSnkOcpx7eXvuXaEN8PLjV80lp+5d 69icNhGrTLwL5uOeRlF/lkFkisOKuroRwvY4E6hqtZ/41m5Mhbf6ZjStjnkmRL4KJynk LpempfuY4133eO3hsHl4iQSnI5k0YYkfoQctayB3PshPQ7BEnbdwsS9+HdY7bJo2T8te HtOA== X-Gm-Message-State: ALyK8tK9Y3yxWUq13RPS6F0m1ggQYBPUS8ukEiWUkJ3Ke9V+6xk2iUI2kf50q8JsITe5b7VbLeFZC6m/AJUk5w== X-Received: by 10.140.23.202 with SMTP id 68mr1592891qgp.105.1466036543224; Wed, 15 Jun 2016 17:22:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.48.220 with HTTP; Wed, 15 Jun 2016 17:21:53 -0700 (PDT) In-Reply-To: References: <4771c925-65e1-536f-e573-250dc99f2e39@gmail.com> <0e11e396-48be-ae7d-4a7a-8b964d2cf128@gmail.com> Date: Wed, 15 Jun 2016 20:21:53 -0400 Message-ID: To: Trevor Suarez Cc: Michael Felt , PHP internals Content-Type: multipart/alternative; boundary=001a11c1558e6303c505355a3b59 Subject: Re: [PHP-DEV] PHP allocating too much memory From: peterlebrun@gmail.com (Peter LeBrun) --001a11c1558e6303c505355a3b59 Content-Type: text/plain; charset=UTF-8 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. 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 > --001a11c1558e6303c505355a3b59--