Page MenuHomePhabricator

Retrieving embeddedin pages fails with internal_api_error_DBQueryError on testwiki since yesterday
Closed, ResolvedPublicBUG REPORT

Description

Calling https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bembeddedin on test-wiki fails.

Steps to replicate the issue:

What happens?:

The result is:

{
    "error": {
        "code": "internal_api_error_DBQueryError",
        "info": "[62e7b79f-2715-4e52-8774-4ac1a64d7bc9] Exception caught: A database query error has occurred. This may indicate a bug in the software.",
        "errorclass": "Wikimedia\\Rdbms\\DBQueryError",
        "*": "Wikimedia\\Rdbms\\DBQueryError at /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/database/Database.php(1914)\nfrom /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/database/Database.php(1914)\n#0 /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/database/Database.php(1898): Wikimedia\\Rdbms\\Database->getQueryException(string, integer, string, string)\n#1 /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/database/Database.php(1872): Wikimedia\\Rdbms\\Database->getQueryExceptionAndLog(string, integer, string, string)\n#2 /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/database/Database.php(1248): Wikimedia\\Rdbms\\Database->reportQueryError(string, integer, string, string, boolean)\n#3 /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/database/Database.php(2004): Wikimedia\\Rdbms\\Database->query(string, string, integer)\n#4 /srv/mediawiki/php-1.39.0-wmf.22/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(641): Wikimedia\\Rdbms\\Database->select(array, array, array, string, array, array)\n#5 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiQueryBase.php(427): Wikimedia\\Rdbms\\SelectQueryBuilder->fetchResultSet()\n#6 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiQueryBacklinks.php(179): ApiQueryBase->select(string)\n#7 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiQueryBacklinks.php(442): ApiQueryBacklinks->runFirstQuery(ApiPageSet)\n#8 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiQueryBacklinks.php(125): ApiQueryBacklinks->run(ApiPageSet)\n#9 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiPageSet.php(290): ApiQueryBacklinks->executeGenerator(ApiPageSet)\n#10 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiPageSet.php(253): ApiPageSet->executeInternal(boolean)\n#11 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiQuery.php(643): ApiPageSet->execute()\n#12 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiMain.php(1901): ApiQuery->execute()\n#13 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiMain.php(875): ApiMain->executeAction()\n#14 /srv/mediawiki/php-1.39.0-wmf.22/includes/api/ApiMain.php(846): ApiMain->executeActionWithErrorHandling()\n#15 /srv/mediawiki/php-1.39.0-wmf.22/api.php(90): ApiMain->execute()\n#16 /srv/mediawiki/php-1.39.0-wmf.22/api.php(45): wfApiMain()\n#17 /srv/mediawiki/w/api.php(3): require(string)\n#18 {main}"
    },
    "servedby": "mw1450"
}

What should have happened instead?:
It still works for the same http request on simple-wiki:
https://simple.wikipedia.org/w/api.php?geititle=Template%3AOk&geifilterredir=nonredirects&prop=info%7Cimageinfo%7Ccategoryinfo&inprop=protection&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata&iilimit=max&generator=embeddedin&action=query&indexpageids=&continue=&geilimit=5&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=jsonfm

Other information:
The failure occurred yesterday. It worked previously.

Event Timeline

Change 818191 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] api: Support for links migration in ApiQueryBacklinks

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

Change 818191 merged by jenkins-bot:

[mediawiki/core@master] api: Support for links migration in ApiQueryBacklinks

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

Krinkle moved this task from Untriaged to Jul 2022 on the Wikimedia-production-error board.
Krinkle subscribed.

This bug affected the MediaWiki Action API. The root cause was an issue with LinksUpdate and link tables (MediaWiki-Page-derived-data) which is currently being refatored by DBA as part of T300222.

Change 818562 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@wmf/1.39.0-wmf.22] api: Support for links migration in ApiQueryBacklinks

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

Change 818562 merged by jenkins-bot:

[mediawiki/core@wmf/1.39.0-wmf.22] api: Support for links migration in ApiQueryBacklinks

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

Mentioned in SAL (#wikimedia-operations) [2022-08-01T08:53:11Z] <ladsgroup@deploy1002> Synchronized php-1.39.0-wmf.22/includes/api: Backport: [[gerrit:818562|api: Support for links migration in ApiQueryBacklinks (T312865 T314112)]] (duration: 03m 01s)