Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Array Causing Access Violation

 
Volker Halle
Honored Contributor

Re: PHP Array Causing Access Violation

Hein,

on Alpha, if you reach the 'memory limit' as imposed by the PHP.INI file, you get a nice error message. The default 'memory limit' seems to be around 8 MB (without a PHP.INI file).

If you specify an 'unreasonable' memory limit and actually try to reach that limit (by increasing the max. index value), the program 'silently' dies WITHOUT an error message, when remaining pagefile quota reaches 0.

Maybe it does not die so silently on OpenVMS I64 ?! Although you would need to be using a real small PGFLQUOTA to hit that limit with index = 160000.

Volker.
Robert Atkinson
Respected Contributor

Re: PHP Array Causing Access Violation

Capturing quota info is a little difficult as the PHP script fails almost immediately.

For reference, here's the UAF quotas :-

Maxjobs: 0 Fillm: 150 Bytlm: 1000000
Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0
Maxdetach: 0 BIOlm: 150 JTquota: 4096
Prclm: 4 DIOlm: 4096 WSdef: 4096
Prio: 4 ASTlm: 4096 WSquo: 8192
Queprio: 0 TQElm: 10 WSextent: 16384
CPU: (none) Enqlm: 4000 Pgflquo: 5000000


I need to do some more investigation work on this, but I'm bogged down with some more pressing problems at the moment.

I guess I was looking for one of the quick wins that we sometimes get from the forums, and that one of you had come across this already.

As I'm still running PHP 1.3 (PHP 4.x), I really need to upgrade and test this again.

For the time being, I'll run the script under WAMP instead.

Rob.

Volker Halle
Honored Contributor

Re: PHP Array Causing Access Violation

Rob,,

I've now installed CSWS_PHP V2.1 on OpenVMS I64 V8.2 and I cannot reproduce this problem. Without a PHP.INI file and by setting the index loop counter to 16000000, I get the same error message as with V1.3 ECO 2 on OpenVMS Alpha.

Your PGFLQUOTA looks a little bit ridiculous (2.56 GB).

Volker.
Hein van den Heuvel
Honored Contributor

Re: PHP Array Causing Access Violation


Volker>> on Alpha, if you reach the 'memory limit' as imposed by the PHP.INI file, you get a nice error message.

That's my point.

>> If you specify an 'unreasonable' memory limit and actually try to reach that limit (by increasing the max. index value), the program 'silently' dies WITHOUT an error message

Well, I imagine where are flavors of mallocs going on. When simply allocating user data it may react different to failure then when allocating for some internal data structure.

Volker>> Although you would need to be using a real small PGFLQUOTA to hit that limit with index = 160000.

Yeah, for a simple fortran like array @ 4 bytes/integer with would be nothing. But this is probably implemented very dynamic/flexible with possibly a re-allocated element array and a malloc per element. So give is 32 bytes/object and it is still not much in total.


>> Capturing quota info is a little difficult as the PHP script fails almost immediately.

That's why you should focus on the SUCCESS cases, not the failures.
Of 20,000 is already too much, then try 8,000 and 16,000.
If 80K is too much then try 20k, 30K, 40K.

Rob>> For reference, here's the UAF quotas :-

Those looks like monkeys having thrown darts.
And they are likely to be overruled with SYSGEN PQL_M values.
FILLM is relatively low/scary.
TQ, WS settings low,
ASTLM/DIOLM high,
PGLFIL silly high.

Rob>> I guess I was looking for one of the quick wins that we sometimes get from the forums, and that one of you had come across this already.

Certainly. And Volker may have come through checking an other version.

Volker>> I've now installed CSWS_PHP V2.1 on OpenVMS I64 V8.2 and I cannot reproduce this problem.

Case closed! :-)

Volker>> Your PGFLQUOTA looks a little bit ridiculous (2.56 GB).

Ayup. Either clueless, or very smart (P2).

Grins,
Hein
Robert Atkinson
Respected Contributor

Re: PHP Array Causing Access Violation

> Ayup. Either clueless, or very smart (P2).

Probably clueless :) but they're there because I tend to edit and convert large files > 2GB which tends to require larger PGFL sizes.

Rob.
Volker Halle
Honored Contributor

Re: PHP Array Causing Access Violation

Rob,

playing with varying values of PGFLQUOTA and memory_limit, on OpenVMS I64 with CSWS_PHP V2.1, I now get a different error message:

I64VMS $ php rob.tmp
X-Powered-By: PHP/5.2.6
Content-type: text/html

Fatal error: Out of memory (allocated 872939520) (tried to allocate 1342
17728 bytes) in /dsa1/halle/itrc/rob.tmp on line 8

zend_mm_heap corrupted

memory_limit=1000M, PGFLQUOTA=2000000. One could assume, that your version of PHP V1.3 could have stumbled more severely in that situation...

Hein,

you seem to be right about the allocation per array element: ...(tried to allocate 35 bytes)...

Volker.