delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/07/18/11:34:53

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E1823857013
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1595086450;
bh=8FGjHE5fS7l0emSyDadU3p0vFyr8/xjVesVmy5O5hgg=;
h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=qQ+8DBD9AMKnX03ST/cfDJ1lFrGVTNyxw0GihOYnQVLNvgrscdv+qar6a7RWANdQm
ahHoCTsZOCe9DLBWAjddIotwsW3g4mEpe8dSsG4pPgFrodX4TLMViI2gyRqNz7fwda
zC7XpBSMpLduRPZlRb+5he6YMy4Q54aiK+ZQOTkk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B7B4B3857C4B
Delivery-date: Sat, 18 Jul 2020 08:34:07 -0700
To: cygwin AT cygwin DOT com
Message-ID: <1027954883.77500.1595086445002@smtp4.opayq.com>
MIME-Version: 1.0
X-GetAbine-Processed: 1
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=kru0nv4zwwEOOftdyLJbg7ND07Jz+py7rBD6ewREX+50xZwZBZDTLXArj7S2mQVDggvumxKfVSAipY+Wl4cUxbIG1Hq8KftuX99Wn35j1hECWFLKSHfg7XkyTlQeq128XB+CpURodQd9oLfyl8KKOCp6a2g7oG+MlXMnae4vfm4sAWm65hmPdww6NiQnVLELng3FsKoZ/yHwoHPSCVlzoh/j282J7Ux06lKPGOG8cX7Oxm54z/Y3QhMjm7PyMYAe60+Ac+iqNKTnh8xvpMU6+v6djrCA0NAr7AnZWvxEz9IzQ8BMxsXok0ruvFP0gLywcUoof9DcIHz0Vshdp/dgNg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=tBZN6huY3XZRIr/JB2fd3pKtiFJCqzfga9ZUweN+xzo=;
b=cAd6/Tn5/1PeeNspWbcTkShITs2CYSnS43TisLW3O0Cq9zt+3snWNIFJ9AcZJ5fEp0gmEuF+guMBp8zZ2YbwqJv9OKiwoYtmYnp795JDjz639lotb+Bioye75JA9jRBp5/g94rk+PBwX9uE6IcVLewZ+NTmonB4CQ+MZptp9aP4S6vQpEPdVVTmqAImwpar2fhX/cKaHB6znDB31u9AGar+HBlWoXhycIes1pAe9Igh73uVH8Q57SqHzyfIH9zC29zyu4hMkeKRDHqE6uQYB7j7lksFUlVQdcnC5PO6Laz/WhzjuQa1rY3U/CZe+QTsXV4ymyOw7h3nu4YTqGFJaTw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
dkim=none; arc=none
Subject: RE: Cygwin PHP (all available versions) has a hard 4MB memory limit
Thread-Topic: Cygwin PHP (all available versions) has a hard 4MB memory limit
Thread-Index: AQHWXRjZggtExQk8wkadegyEZ48mLA==
Date: Sat, 18 Jul 2020 15:33:59 +0000
Accept-Language: en-GB, en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-incomingtopheadermarker: OriginalChecksum:918B8107CE1E68EEF4998A910E6249DD06006E4F54447B3D0A1B27BECE8210CA;
UpperCasedChecksum:99E1336153A632B96DD37697982F4A632DC8CCC78EAF73151EF1472CFA846D4D;
SizeAsReceived:6959; Count:44
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [m934XTw83qFAeJryovSQ4X++LVGEg+1f]
x-ms-publictraffictype: Email
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-ms-office365-filtering-correlation-id: 5b73cafc-f064-4ad6-ceea-08d82b2ffdea
x-ms-traffictypediagnostic: HE1EUR02HT136:
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: gCRrD+KzN7Bm0/E496okdneGz+UlZ5OaaUIT7hUxYoe0V8JiglZhMikcbmPjRS6GJxRpPPHtberjxDo6iz9e0NMLH1eABQ9UCGOrganwggVLFDsOCcEPQO18w9hhtxQcZjUyRVtx2t+xJjc++Xmm1Bb79NSInmLDgJdLpTdX9CaOGW1Cf1Sbhu8ItyEaVuySUqtupd2CcEFQdqpRhJ9Q3w==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:;
IPV:NLI; SFV:NSPM; H:AM7PR10MB3509.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE;
SFTY:; SFS:; DIR:OUT; SFP:1901;
x-ms-exchange-antispam-messagedata: pxYJbpHRB8e6Hpj7gvA0SnxlxQvtEkT+XcBL4vKszy8RsHrTzHso4rZxfJ9nnrkz6SCRu6q8pCtza8Sv/PHDEoO++dGULNmfJUugjbjWbnn2Yz50BuCMwO7oDraOoem6bHIAqg66x52g9XqJLdDNHg==
x-ms-exchange-transport-forked: True
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT039.eop-EUR02.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 5b73cafc-f064-4ad6-ceea-08d82b2ffdea
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2020 15:33:59.5639 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT136
X-Key-ID: ZndkLmsxenNzNnB4eXZtOUBvcGF5cS5jb20gZWx2ZW5zcGVsbG1ha2VyQGhvdG1haWwuY28udWsgMjAyMC0wNy0xOCAwODozNDowMi45NzkgMWp3b3FnLTAwMDZSSC1RTg==
X-Content-flags: applies available believe compiling composer compress
copyright dashes email email-adr followed fwd give greetings here info
information limit lowed lower manager message messages notice number-text php
please probably problem produce program provided quoted re realise registered
reporting response stranger thanks transports under unix via windows
X-Spamfilter-host: opayq-outbound.junkemailfilter.com -
http://www.junkemailfilter.com
X-Key-ID: Y3lnd2luQGN5Z3dpbi5jb20ga20yejdrY2Ewb2dlQG9wYXlxLmNvbSAyMDIwLTA3LTE4IDA4OjM0OjA2Ljk1MiAxandvcWstMDAwNHduLVBt
X-Domain-list: cygwin.com awsdns-17.co.uk amazon.com
X-Sender-Host-Address: 23.21.143.60
X-Sender-Host-Name: smtp4.opayq.com
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,
SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: km2z7kca0oge--- via Cygwin <cygwin AT cygwin DOT com>
Reply-To: km2z7kca0oge AT opayq DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

> You told us nothing about what versions of Windows, Cygwin, and PHP you are running, so WAG, either:
Wow Brian, what a rude response. I definitely followed the problem reporting guide, and didn't realise you'd need information overload that probably doesn't relate to the case at hand. When reporting bugs I always give as much info as I believe is needed in helping, there's no need to snap.

I gave lots of information, such as:
  - It applies to all bundled versions of PHP from the `setup-x86-64.exe`.
  - That I've reproduced it on multiple (two) machines, including one of those being a machine that has never had (and so a fresh install of) Cygwin with just PHP added.
  - Compiling PHP from source doesn't produce this issue so it's something to do with the bundled version only

For extra information, both machines tested are:
  - Windows 10 64-bit (10.0.18363)
  - One machine is 16GB, the other 8GB RAM.
  - All PHP versions from the `setup-x86-64.exe` (7.3.4-1 and 7.1.16-1)

> - you have defaulted to or specified a PHP configuration limit of 4MB memory for PHP tasks, or
Nope, as shown in the output of my example, the memory limit is set to 128MB:
> Output:
> $ php test.php
> 128M <--- This here shows the configured memory limit
> PHP Fatal error:  Out of memory (allocated 4194304) (tried to allocate 2097184 bytes) in /c/Users/JackBlower/tmp-safe/test.php on line 5

> including copying verbatim all error messages seen
Here, the message was included in my initial email: > PHP Fatal error:  Out of memory (allocated 4194304) (tried to allocate 2097184 bytes) in /c/Users/JackBlower/tmp-safe/test.php on line 5

> - if you're running 32 bit Cygwin, possibly under 32 bit Windows, you have probably run out of heap space from installing too many packages requiring too many DLLs.
Nope all 64-bit, I would've mentioned if not.

> and PHP build configurations and logs.
See the output below for some more info, either way this is a pre-packaged version of PHP with very little changed from default configuration.

------------------------------
> Greetings, km2z7kca0oge--- via Cygwin!
Hey Andrey,

I've tried your script and I hit the 128MB limit, as expected. So maybe it's to do with the `http` wrapper. Could you try my version of the script please and see how you get on?

I first bumped into this problem when I rolled back from composer 2.X to 1.X which uses more memory.

I generated an 800MB file using: ` fsutil file createnew 800mega 838860800` and then ran your script you provided substituting your backup for the 800 MB file I generated.

The output of the script is below:
```
$ ./test-mailing-list.php
#!/usr/bin/env php
<?= file_get_contents(__FILE__);
phpinfo(1);
echo ini_get('memory_limit'), "\n";
print number_format(strlen(file_get_contents('800mega')));
phpinfo();
phpinfo()
PHP Version => 7.3.7

System => CYGWIN_NT-10.0-18363 AML0147 3.1.6-340.x86_64 2020-07-09 08:20 UTC x86_64
Build Date => Jul 21 2019 16:57:32
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/bcmath.ini,
/etc/php.d/bz2.ini,
/etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/gmp.ini,
/etc/php.d/intl.ini,
/etc/php.d/json.ini,
/etc/php.d/ldap.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_pgsql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/posix.ini,
/etc/php.d/simplexml.ini,
/etc/php.d/sockets.ini,
/etc/php.d/sodium.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/tokenizer.ini,
/etc/php.d/vld.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/zip.ini,
/etc/php.d/zlib.ini

PHP API => 20180731
PHP Extension => 20180731
Zend Extension => 320180731
Zend Extension Build => API320180731,NTS
PHP Extension Build => API20180731,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, php, file, glob, data, http, ftp, compress.bzip2, compress.zlib, zip, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
128M
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 838869024 bytes) in /c/Users/JackBlower/tmp-safe/test-mailing-list.php on line 5
```

Notice how this time it's running out of memory at 128MB and has the "Allowed memory size" error instead of the "Out of memory" error from before.

Many Thanks,

Jack
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019