ZF-2631: Test process stops because of out of memory

Description

Test process stops with the following diagnostic:


Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 168034281 bytes) in /home/cawa/ZendFramework/release-1.0/library/Zend/Measure/Number.php on line 335

Comments

Problem appears at testNumberSetType() (Zend/Measure/NumberTest.php) when it tries to convert value type from Zend_Measure_Number::BINARY to Zend_Measure_Number::ROMAN

PS line number 156

Duplicate of ZF-2368

Feel free to respond on eighter of the both issues.

But please test it with the trunk... as soon it's fixed within the trunk I can integrate the change to the branch.

Have you tested with the branch or just with the release ??? This is part of another issue and has already been fixed in te past with the help of Darby and Sebastian.

I am not sure it duplicates ZF-2368

ZF-2368 issue is test fail for testConvertTo(Zend_Measure_NumberTest)

The problem of current issue is that tests don't pass at all, but test execution is stopped with 'out of memory' diagnostic. That happens at testNumberSetType() exactly at line 156 ("$value->setType(Zend_Measure_Number::ROMAN);")

I tested it using release maintenance branch.

Commenting lines 156 and 157 helps to pass testNumberSetType() and Zend_Measure unit tests pass correctly with only fail mentioned at ZF-2368 ZF-2368 still exist for the release maintenance branch and for the trunk

Enabling bcmath extension resolves this problem and ZF-2631 test fail

Please test with the latest release and give me response. If it still failes I will need additional informations and debug traces.

Still fails with the same result.

I'm ready to provide any additional info

Unsure if it will make until 1.0.4... therefor downgrading to critical... fix depends on an other issue which will be fixed before this one

What I don't understand is that the function you have mentioned brakes after 200 loops... so it is unable to run infinite as you said. The maximum could be that it reports an error.

So I attached a debug version of Measure/Number.php. Please run it and give us the debug feedback for reproduction and fixing.

I see.

Here is an output of Zend_Measure unit tests pass (see attachment).

Alex... how can it create output if it runs infinite as you said ???

You said it brakes with an memory error... I added only textual output on the console so this behaviour should not have changed... Can it be that you've tested with an outdated version ?

This issue was already reported about 3 weeks ago and fixed. And the error you sent with the output is a duplication of another already created issue from you.

In my opinion this one does not exist anymore...

Please change your debug version to the original one from branch/trunk and give me feedback if I am right. We will then close this issue as fixed/duplicated.

Note: This issue is related to "Testbed runs infinit and stops because of out of memory"

Alex... how can it create output if it runs infinite as you said ??? That's a question :)

You said it brakes with an memory error... Exactly!

I added only textual output on the console so this behaviour should not have changed... Can it be that you've tested with an outdated version ? I don't think so. I performed tests in several environments using just checked out release maintenance branch:


svn checkout http://framework.zend.com/svn/framework/…

This issue was already reported about 3 weeks ago and fixed. And the error you sent with the output is a duplication of another already created issue from you.

Yes. It's ZF-2272 issue. It also has commits into the release maintenance branch, but it looks like changes were not merged completely. Here is a diff between 'Number.php' you sent me and current 'branch/release-1.0/library/Zend/Measure/Number.php' file (see the attachment). There are not only debug output, but also some differences in code. To be more precise, diff also contains changes for CS-7536 and CS-7537.

Merging to release brunch comments also don't refer these changesets.

Please check it.

Alex:

I asked you in my first reply if it is fixed now within the trunk.

You said NO it runs endless. In your debug output I saw that it does not run endless.

I am quite confused now.

Could you PLEASE test it with trunk and verify if it runs endless or not ? If it is fixed within trunk I can integrate it to branch as I said in past.

Thomas, I am very upset because of this misunderstanding. Please accept my sincere apology.

I was sure it's clear, that trunk tests pass correct, since I didn't mentioned that trunk tests failed and NumberTest.php is the same in both branches (probably, you know this better than me).

Yes, tests pass correctly with trunk code.

Thanks for you and for your work!

I committed SVN7656 to branch which fixes this problem within the branch. If there is any further problem related to this issue don't be shy and reopen it.

I've just tested it. The problem is fixed. Thanks!