When running tests with entitycache added to the default install profile, this tests fails.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | actions-recursion.patch | 1.5 KB | mr.baileys |
| #18 | actions-recursion.patch | 1.5 KB | mr.baileys |
| #16 | actions-recursion.patch | 1.53 KB | mr.baileys |
| #13 | actions-recursion.patch | 1.69 KB | mr.baileys |
Comments
Comment #1
webchickThis happens in plain old ordinary Drupal too.
Though seemingly not on all platforms. I see it, sun does not.
Comment #2
TacoV commentedI have the same problem on a fresh Drupal 7 installation (on WAMP). The Stack Overflow is never reached: 15 messages get placed into the watchdog table ('Triggering action loop' and 'Test log' 1 through 14). Also, the 'actions_max_stack' doesn't seem to get set, so it's always tested against the default of 35.
Maybe the $stack counter in action_do() does not start at 0 when testing?
Also, the PHP nesting limit is reached after the second series of test logs: 'Maximum function nesting level of '100' reached, aborting!'. Not sure if that's related.
(I'm totally new at testing with Drupal)
Comment #3
catchBumping status, we shouldn't ship with broken tests.
Comment #4
Anonymous (not verified) commentedsubscribe
Comment #5
mr.baileysUnable to reproduce this error on Vista + IIS + MySQL + PHP 5.2.6, both Actions-tests run as expected and succeed. Ran the tests +5 different times to see if this was a random thing but that doesn't seem to be the case. Lowered the memory limit to see if the failing test was caused by overflowing PHPs function stack but that also does not seem to be the case.
Comment #6
TacoV commentedI tried it again, brand new install 7.x-dev (2010-Jan-04). Running Windows XP + MySQL 5.1.39 + PHP 5.3.0. Standard install profile, fresh empty database. Apache crashes. Retry, now it works. Enable 'Testing', disable 'Overlay' (does not function correctly and prevents test-checkboxes from appearing), tick 'Actions' and 'Run Tests'. Takes about one and a halve minute.
Result is once again:
fail twice on "All expected messages found. - Other - actions.test - 125 - ActionLoopTestCase->triggerActions()"
After the second fail PHP throws a fatal error
"Maximum function nesting level of '100' reached, aborting! - PHP Fatal error - database.inc - 419 - Unknown"
I guess it could be an issue of timeouts, maybe my local notebook (ibm lenovo t60p) is too slow. PHP's memory limit is 256M. Can you raise a function nesting maximum?
Comment #7
dave reidI can confirm the failures with latest HEAD on my machine.
Comment #8
mr.baileysIt seems that the error message you're getting is not generated by PHP itself. Do you have xdebug enabled by any chance? If you have, check out http://xdebug.org/docs/basic and see if upping the xdebug.max_nesting_level value to something higher changes anything. (Note that if you'd increase the max_nesting_level and decrease the memory_limit to something like 16M, the error message will probably be replaced by a "memory exhausted" error)
If this is indeed the case, it's likely that the tests will fail in environments with xdebug enabled and max_nesting_level set to the default value, which in turn explains why only some people are seeing it. If changing the value doesn't fix it, forget I said anything :)
Comment #9
dave reidmr.baileys is right. I had xdebug enabled and had to increase the nesting limit to 320 to get the tests to pass. Should we consider this fixed then?
Comment #10
TacoV commentedmr.baileys is right. Disabling xdebug makes all tests succeed.
Does this mean we set this ticket to wontfix or should it be documented / detected somewhere? It will surely puzzle more people, although xdebug is probably disabled on any production site. Then again, so is Testing ^^
Comment #11
dave reidWell, either way, this is no longer critical.
Comment #12
catchNot sure how available that setting is, but could go in simpletest_requirements() if it is?
Comment #13
mr.baileysWhat about just lowering the recursion level in the test itself? The goal of the test is to verify that the action mechanism correctly aborts after actions_max_stack iterations, but despite the fact that 35 recursion levels is the default value, I'm not sure we should actually go that deep.
I don't have xdebug installed, but based on Dave Reid's comment (#9) lowering the recursion level to < 15 should prevent xdebug's infinite recursion mechanism from kicking in.
This should make the test succeed in 99% of the xdebug environments, since I doubt the xdebug.max_nesting_level value is often changed from its default value.
Comment #15
TacoV commentedThe test consists of two parts
Since actions_max_stack isn't set then, the first one still runs with actions_max_stack at its default value in action_do (35) which differs from the default in triggerActions (10).
Either this value should be set explicitly or we drop the entire first part. I opt for the latter.
Comment #16
mr.baileysI feel silly now, you're absolutely right... Here's an updated patch which I actually tested before submitting. It drops the first run as per your suggestion and should stay well within the default xdebug nesting limits.
Comment #17
dave reidShould just be // @see http://drupal.org/node/587634
This review is powered by Dreditor.
Comment #18
mr.baileysFixed the comment as per #17
Comment #19
mr.baileysRemoved some spaces from the comments...
Comment #20
TacoV commentedI tested the patch on my system and it passes.
Comment #21
catchLooks great, removes nasty confusing edge case, RTBC.
Comment #22
webchickOMG!! This has been driving me nuts for MONTHS! Thank you so much for tracking this down!! :D
Committed to HEAD!