-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exceeded memory limit with HHVM and PHP 4.8.24 #7035
Comments
Memory is always reporting as |
In that job you are calling |
@Orvid I guess I'm not sure how to use memory_get_peak_usage() from the command line to get the peak memory useage, (my option since this is testing on Travis CI) I tried doing |
In my continued attempts to test this issue, I'm finding a consistent pattern. Using Taking a look at the timer function in phpunit that fails at the end of my tests, it is basically a call to memory_get_peak_usage() |
@Orvid The in the sequence of our unit tests I found where it doesn't fail with 'Fatal error: request has exceeded memory limit with ini_get("memory_limit") reporting string(11) "17179869184" for the available limit. Here is a link to the travis build https://travis-ci.org/photodude/joomla-cms/jobs/133418228 |
I'm really not sure what the issue here is, if it's always claiming the request has exceeded the memory limit, it should be able to run in the first place... |
@Orvid As far as I can tell it seems we get the So in the initial report we were getting the error when PHP Unit was finalizing the tests and makes a call to phpunit's php-timer Timer::resourceUsage() which is basically just a call to the function memory_get_peak_usage(). Digging deeper I was seeing every attempt to check our various unit test with memory_get_peak_usage() also failing by |
Well, we know that there was a refcounting issue in interp mode that @mxw caused when he converted a bunch of things to TypedValue, but that's not part of the 3.13.1 release, and has already been fixed in trunk, so it shouldn't be that. Are you sure the request really needs 77mb of memory to run? As you mentioned above, the base memory point is 2mb, so 75mb sounds a bit excessive for a single test. |
@Orvid as far as I can tell it seems when running under hhvm the memory use just grows with each unit test. The ~74mb is just the value in one test where I could get a report from Here is a comparison of the total memory usage from our unit tests all of which are well below the system memory limit for our HHVM tests of ~16384mb
I also tried testing with the 3.12 and the nightly build about a week ago, but those releases did not fix this issue |
I just did a massive review of our unit tests, I was able to shave off a sizable amount of memory use. but it didn't fix this issue with HHVM After recent Patch
|
Possibly related to #4723 |
@Orvid I was able to pin down that there is an issue in All of our unit tests are running with less than 300MB now and the system is reporting plenty of memory to support that. My best guess is Not sure if there is an easy way to write a script to take up memory in increasing amounts and report the value until it either fails or reaches the system limit. with a little script like that we could run |
Based on some information in my recent tests I believe just before this failure 712 mb of memory are being used; well below the 7gb assigned to HHVM |
@Orvid are there any ini settings that could be set at runtime which might shed more light on this failure? |
I've done a little testing with running phpunit with but at >20M all the tests complete but I get the original error pushing the other way, to 1G or even -1 (unlimited) there was no change. the tests complete and I still get the error. |
I was able to reproduce this locally. The test suite also revealed a few (fairly new) unrelated compiler bugs. |
@aorenste glad you were able to reproduce the issues. I look forward to these being fixed. |
The issue is due to this implementation of
I'll work on fixing it tomorrow. |
@aorenste On a semi unrelated note: I wonder if the "unrelated compiler bugs" could be related to the failure of phpunit's self test suite on HHVM? see build https://travis-ci.org/photodude/phpunit/jobs/160342275 |
@aorenste I have updated the issue with all of the HHVM versions where I have seen |
@aorenste will this fix be included in 3.15.1 and older affected releases? |
It should be in 3.15.1 but not older releases. |
@aorenste I look forward to 3.15.1 so I can resume testing. Have the other unrelated compiler bugs with the test suit you mentioned been addressed? |
The 3.15.1 branch has been cut but we're going to cherry-pick the required patches so they should be in there. |
I look forward to testing the fixes in 3.15.1 (since I still can't get nightly to install on travis ci) |
@aorenste I saw HHVM 3.15.1 has been released. did the patch for this make it into that release? I'm still seeing the issue with |
@aorenste I can confirm the fix in hhvm-nightly, but not with hhvm 3.15.1. Will the patch make it into 3.15.2? |
Summary: Save ini values so they can be restored with ini_restore() Closes #7035 Reviewed By: markw65 Differential Revision: D3878335 fbshipit-source-id: 8f052aa63264fa1d70ca095bcd650b3663872cc5
@photodude: apologies, it seems to have been overlooked 🙁 I pushed the commit to the 3.15 branch, so 3.15.2 will absolutely have this fix. |
Thanks @paulbiss |
@paulbiss would it be possible for the patch to be applied to the 3.12 and 3.9 branches? |
@photodude 3.9 is EOL so it's unlikely to receive any further updates. As for 3.12 it's old enough now that I'm really only comfortable with security patches, is there a reason it's important to backport this to 3.12? |
No, important reason. It's likely that we won't support anything older that has this issue since we will never be able to test against it. I only asked because those versions were affected and I had seen new releases. I was actually surprised to see a 3.9 release I figured the docs must be out of dates since I was under the impression that 3.9 was EOL on 15 July 2016. |
HHVM Version
3.15.1
3.15.0
3.14.1
3.13.1
3.12.8
3.9.9
3.6.6
3.5.0
Standalone code, or other way to reproduce the problem
you can see the results on travis ci testing against the staging branch of Joomla (3.5.2/3.6.0)
https://travis-ci.org/photodude/joomla-cms/jobs/127696426
Expected result
No error running out of memory
even repeated with
memory_limit = -1
(reported limit 9223372036854775807) no changeActual result
Fatal error: request has exceeded memory limit in /vendor/phpunit/php-timer/src/Timer.php on line 97
Related Issue #5520 (showing an older segfault and this same out of memory issue)
The text was updated successfully, but these errors were encountered: