Page MenuHomePhabricator

CI failure - TypeError: Cannot read property 'registerCompiler' of undefined
Closed, ResolvedPublic

Description

Seen on https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php81-noselenium-docker/5329/console#console-section-2 for GrowthExperiments:

17:23:37 22 02 2023 16:23:37.872:DEBUG [middleware:source-files]: Requesting /load.php?debug=2&modules=mediawiki.ui.button&version=ztntf
17:23:37 22 02 2023 16:23:37.872:DEBUG [middleware:source-files]: Fetching /load.php
17:23:37 22 02 2023 16:23:37.873:DEBUG [proxy]: proxying request - /load.php?debug=2&modules=mediawiki.ui.button&version=ztntf to 127.0.0.1:9413
17:23:37 Chrome Headless 90.0.4430.212 (Linux x86_64) LOG: 'Exception in module-execute in module mediawiki.template.vue:'
17:23:37 Chrome Headless 90.0.4430.212 (Linux x86_64) WARN: TypeError: Cannot read property 'registerCompiler' of undefined
17:23:37 TypeError: Cannot read property 'registerCompiler' of undefined
17:23:37     at http://localhost:9876/load.php?debug=2&modules=mediawiki.template.vue&version=ztntf:4:14
17:23:37     at http://localhost:9876/load.php?debug=2&modules=mediawiki.template.vue&version=ztntf:28:2
17:23:37     at runScript (http://127.0.0.1:9413//index.php?title=Special:JavaScriptTest/qunit/export:1351:7)
17:23:37     at execute (http://127.0.0.1:9413//index.php?title=Special:JavaScriptTest/qunit/export:1476:4)
17:23:37     at doPropagation (http://127.0.0.1:9413//index.php?title=Special:JavaScriptTest/qunit/export:867:6)
17:23:37 Chrome Headless 90.0.4430.212 (Linux x86_64) ERROR
17:23:37   Script error.
17:23:37   at :0:0
WARN [proxy]: failed to proxy /load.php?debug=2&modules=mediawiki.skinning.content.parsoid&only=styles&version=ztntf (socket hang up)
WARN [proxy]: failed to proxy /load.php?debug=2&modules=mediawiki.template&version=ztntf (socket hang up)
WARN [proxy]: failed to proxy /load.php?debug=2&modules=mediawiki.rcfilters.filters.ui&version=ztntf (socket hang up)

Event Timeline

Krinkle renamed this task from TypeError: Cannot read property 'registerCompiler' of undefined to CI failure - TypeError: Cannot read property 'registerCompiler' of undefined.Feb 23 2023, 12:55 AM

Change 891295 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] Revert "qunit: Enable debug=2 by default for SpecialJavaScriptTest"

https://gerrit.wikimedia.org/r/891295

Krinkle triaged this task as High priority.
Krinkle removed a project: Vue.js.

Not exactly. This task is due to mediawiki.template being undefined as result from the associated web request timing out in Apache.

The other one is happening because something somewhere is performing untracked load of Vue during whilst the tests continue to run. There is a test where we test a Set polyfill, and despite having no concurrency in test execution, Vue happens to execute right in the middle of the test that very briefly unsets window.Set. Details on at T330293.

Change 891295 merged by jenkins-bot:

[mediawiki/core@master] Revert "qunit: Enable debug=2 by default for SpecialJavaScriptTest"

https://gerrit.wikimedia.org/r/891295

For the job mentioned in the task description, the Apache error log is empty. I do see this in the MediaWiki error log though:

2023-02-22 16:23:38 c9b1289f1101 wikidb: [3d5a6335069f5a48daba26ad] /load.php?debug=2&modules=mediawiki.rcfilters.filters.ui&version=ztntf   Wikimedia\Rdbms\DBQueryDisconnectedError: A connection error occurred during a query. 
Query: COMMIT
Function: MediaWiki::restInPeace
Error: 1927 Connection was killed

#0 /workspace/src/includes/libs/rdbms/database/Database.php(1518): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /workspace/src/includes/libs/rdbms/database/Database.php(1492): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /workspace/src/includes/libs/rdbms/database/Database.php(865): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /workspace/src/includes/libs/rdbms/database/Database.php(2713): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /workspace/src/includes/libs/rdbms/database/Database.php(2685): Wikimedia\Rdbms\Database->doCommit(string)
#5 /workspace/src/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1572): Wikimedia\Rdbms\Database->commit(string, string)
#6 /workspace/src/includes/libs/rdbms/lbfactory/LBFactory.php(383): Wikimedia\Rdbms\LoadBalancer->commitPrimaryChanges(string)
#7 /workspace/src/includes/MediaWiki.php(1104): Wikimedia\Rdbms\LBFactory->commitPrimaryChanges(string)
#8 /workspace/src/includes/MediaWiki.php(848): MediaWiki->restInPeace()
#9 /workspace/src/load.php(61): MediaWiki->doPostOutputShutdown()
#10 /workspace/src/load.php(39): wfLoadMain()
#11 {main}
2023-02-22 16:23:38 c9b1289f1101 wikidb: [3d5a6335069f5a48daba26ad] /load.php?debug=2&modules=mediawiki.rcfilters.filters.ui&version=ztntf   Wikimedia\Rdbms\DBTransactionError: Commit failed on server(s) localhost:/workspace/db/quibble-mysql-5w4sbj9e/socket: A connection error occurred during a query. 
Query: COMMIT
Function: MediaWiki::restInPeace
Error: 1927 Connection was killed

#0 /workspace/src/includes/libs/rdbms/lbfactory/LBFactory.php(383): Wikimedia\Rdbms\LoadBalancer->commitPrimaryChanges(string)
#1 /workspace/src/includes/MediaWiki.php(1104): Wikimedia\Rdbms\LBFactory->commitPrimaryChanges(string)
#2 /workspace/src/includes/MediaWiki.php(848): MediaWiki->restInPeace()
#3 /workspace/src/load.php(61): MediaWiki->doPostOutputShutdown()
#4 /workspace/src/load.php(39): wfLoadMain()
#5 {main}

That is logged at 2023-02-22 16:23:38 while the request associated with the QUnit error is logged at 2023 16:23:37.873.

So perhaps it is a database connection issue, and not to do with Apache?

Ack, that could be it. Perhaps too much concurrency for the database to handle. Although these shouldn't be making pre-send database changes. I guess that's a side-effect of wgForceDeferredUpdatesPreSend being set for the benefit of Selenium tests.

We might be able to have Quibble to spin up MySQL with error logging and attach the resulting output to the Jenkins build. I don't know the MySQL connection limit, it is most certainly whatever default is provided by the MariaDB Debian package.