Page MenuHomePhabricator

[Bug] LuaSandbox: Scribunto_LuaSandboxTests::testArgumentParsingTime failure, Unused arguments not counted in preprocess
Closed, ResolvedPublic

Description

Jenkins reported a test failure in Scribunto. I am sure it is unrelated to the Wikidata change submitted here and also the failure happens only sometimes.

https://integration.wikimedia.org/ci/job/mwext-Wikidata-testextension-zend/584/console

16:51:07 1) LuaSandbox: Scribunto_LuaSandboxTests::testArgumentParsingTime
16:51:07 Unused arguments not counted in preprocess
16:51:07 Failed asserting that 0.694929904 is less than 0.25.
16:51:07
16:51:07 /mnt/jenkins-workspace/workspace/mwext-Wikidata-testextension-zend/src/extensions/Scribunto/tests/engines/LuaSandbox/SandboxTest.php:65
16:51:07 /mnt/jenkins-workspace/workspace/mwext-Wikidata-testextension-zend/src/tests/phpunit/MediaWikiTestCase.php:131
16:51:07

Event Timeline

aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude added a subscriber: aude.
Anomie added a subscriber: Anomie.

That's the test for T47684: getExpandedArguments should not count toward the 10-second Lua execution limit. It sets up a dummy parser tag with a callback that busy-loops for 500 milliseconds. Then it evaluates wikitext {{#invoke:TestArgumentParsingTime|f2|<scribuntodelay/>}}, where the called function doesn't reference the passed argument (it does do a recursive preprocess), and tests the elapsed CPU-time-in-Lua as measured by the luasandbox extension. The parse should take only a few milliseconds in Lua (locally it takes about 2.3ms), and the threshold for failing the test is 250 milliseconds.

So if something is sometimes making that take almost 700 milliseconds, it's probably worth trying to figure out what that is. I haven't ever seen this failure in Scribunto's own test runs, so I'm far from convinced this has to do with Scribunto rather than something in Wikidata.

aude renamed this task from LuaSandbox: Scribunto_LuaSandboxTests::testArgumentParsingTime failure, Unused arguments not counted in preprocess to [Bug] LuaSandbox: Scribunto_LuaSandboxTests::testArgumentParsingTime failure, Unused arguments not counted in preprocess.Sep 10 2015, 10:29 AM
aude set Security to None.
aude triaged this task as Medium priority.Sep 10 2015, 10:42 AM

@Anomie @aude Can we close this? Haven't see such a failure in a while now.

hoo claimed this task.