Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64721 invoked from network); 15 Jun 2016 17:51:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jun 2016 17:51:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=rican7@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rican7@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.51 as permitted sender) X-PHP-List-Original-Sender: rican7@gmail.com X-Host-Fingerprint: 209.85.214.51 mail-it0-f51.google.com Received: from [209.85.214.51] ([209.85.214.51:38707] helo=mail-it0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/C3-41914-58591675 for ; Wed, 15 Jun 2016 13:51:02 -0400 Received: by mail-it0-f51.google.com with SMTP id h190so27876204ith.1 for ; Wed, 15 Jun 2016 10:51:01 -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=maW6Z2Xu8V8sX99ChYuOcP2S9yljzs5thrWqBoWzGCQ=; b=NVAZKdCukNpbEYsbH7dHRWEFDFzgq46F69OGDlDZ5JeYs6mYthY6YGrQnK09QWoW57 gRKMmu3uLCbFz8xPeDIgmmrTr/7/MDuBF+wbGEbb5fpPdL2jp8J5VOvmhfdVDxB2frCx IvLo+GqREnS9qjxXBEnGM6QeAUVimq3w4LxWpD7tOCoUWuIGuOnj4l4xe5cl9rfqjnMv f1BUJun4YTXS6b/Qi/QI27kPUc+pFnfxmilJLUFDcVYb+4stXvqyMv2JVLAvWbED7eeS FhSN/tT2VsQjPzw6vwmzr/eq903Ie1e8pcbivOm9yS+9PghPLiM+lkdw6WboOI2IRRbP HuMw== 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=maW6Z2Xu8V8sX99ChYuOcP2S9yljzs5thrWqBoWzGCQ=; b=FUyxXYIYzcHCqo2NMXjANvl9fBHHfboVY5GpZUbDkAE6vSCIy2tuRrUDiBS1kNgTHj jNZWvQg8/e7gZ668BGF8VYS3/rREU8RlfCLRnp3s7KxHNP/KGZf3KWgQOCE1aUVwKLO3 3yR2Gdj+Lk0lzq8efy6kdtchw7scouvR3FyGMVFiwkjYVfVrK34A+oRNAP6zuVDg6QZ7 /iL30r8q2weRVotXMzFKYYA9ua/K+nubL9rew8Ryw20iaeRXeGpxcMSQQwKF3JgTZ0yK AK+RWvZ+RZk037bViz0d52l7THYcdm23iAaj3HOR8yXr38HmeyYAR+DgRPEnP/LKKaRt N5yg== X-Gm-Message-State: ALyK8tJgZXpVInFF8XAvvDiEid5DUvdht3FMqj4zGnWwlaQRsjQqMXpra9A6FjjOK9W9cjDjlZ5Pm4HoOgv/sQ== X-Received: by 10.36.36.72 with SMTP id f69mr18843805ita.43.1466013059338; Wed, 15 Jun 2016 10:50:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.31.20 with HTTP; Wed, 15 Jun 2016 10:50:58 -0700 (PDT) In-Reply-To: <0e11e396-48be-ae7d-4a7a-8b964d2cf128@gmail.com> References: <4771c925-65e1-536f-e573-250dc99f2e39@gmail.com> <0e11e396-48be-ae7d-4a7a-8b964d2cf128@gmail.com> Date: Wed, 15 Jun 2016 13:50:58 -0400 Message-ID: To: Michael Felt Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11474e78a3dc23053554c3a0 Subject: Re: [PHP-DEV] PHP allocating too much memory From: rican7@gmail.com (Trevor Suarez) --001a11474e78a3dc23053554c3a0 Content-Type: text/plain; charset=UTF-8 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 --001a11474e78a3dc23053554c3a0--