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 created this task.Sep 1 2015, 5:11 PM
aude updated the task description. (Show Details)
aude raised the priority of this task from to Needs Triage.
aude added a subscriber: aude.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2015, 5:11 PM
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.
aude set Security to None.
aude triaged this task as Normal priority.Sep 10 2015, 10:42 AM
hoo added a subscriber: hoo.Aug 13 2017, 2:18 PM

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

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptAug 13 2017, 2:18 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptAug 13 2017, 5:29 PM
hoo closed this task as Resolved.Apr 12 2018, 1:44 PM
hoo claimed this task.