Page MenuHomePhabricator

Special:CentralNotice DBQueryError DBTransactionStateError
Closed, ResolvedPublic

Description

Navigating to https://meta.wikimedia.beta.wmflabs.org/wiki/Special:CentralNotice results in the below error.

MediaWiki internal error.

Original exception: [XWSDpqwQBHcAAFvrrEAAAABU] /wiki/Special:CentralNotice Wikimedia\Rdbms\DBQueryError from line 1591 of /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT notices.not_id,not_name,not_start,not_end,not_enabled,not_preferred,not_throttle,not_geo,not_locked,not_archived,(SELECT GROUP_CONCAT(nc_country SEPARATOR ',') FROM `cn_notice_countries` WHERE nc_notice_id = notices.not_id ) AS countries,(SELECT GROUP_CONCAT(nl_language SEPARATOR ',') FROM `cn_notice_languages` WHERE nl_notice_id = notices.not_id ) AS languages,(SELECT GROUP_CONCAT(np_project SEPARATOR ',') FROM `cn_notice_projects` WHERE np_notice_id = notices.not_id ) AS projects FROM `cn_notices` `notices` ORDER BY DESC LIMIT 5001 
Function: IndexPager::buildQueryInfo (CNCampaignPager)
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DESC LIMIT 5001' at line 1 (172.16.4.147:3306)

Backtrace:
#0 /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php(1562): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#1 /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php(1150): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php(1794): Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/mediawiki/php-master/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 /srv/mediawiki/php-master/includes/libs/rdbms/database/DBConnRef.php(315): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#5 /srv/mediawiki/php-master/includes/pager/IndexPager.php(419): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
#6 /srv/mediawiki/php-master/includes/pager/IndexPager.php(265): IndexPager->reallyDoQuery(string, integer, boolean)
#7 /srv/mediawiki/php-master/extensions/CentralNotice/includes/CNCampaignPager.php(118): IndexPager->doQuery()
#8 /srv/mediawiki/php-master/includes/pager/IndexPager.php(475): CNCampaignPager->doQuery()
#9 /srv/mediawiki/php-master/includes/pager/TablePager.php(69): IndexPager->getBody()
#10 /srv/mediawiki/php-master/extensions/CentralNotice/includes/specials/CentralNotice.php(125): TablePager->getBody()
#11 /srv/mediawiki/php-master/extensions/CentralNotice/includes/specials/CentralNotice.php(91): CentralNotice->outputListOfNotices()
#12 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(573): CentralNotice->execute(NULL)
#13 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run(NULL)
#14 /srv/mediawiki/php-master/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#15 /srv/mediawiki/php-master/includes/MediaWiki.php(892): MediaWiki->performRequest()
#16 /srv/mediawiki/php-master/includes/MediaWiki.php(523): MediaWiki->main()
#17 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#18 /srv/mediawiki/w/index.php(3): include(string)
#19 {main}

Exception caught inside exception handler: [XWSDpqwQBHcAAFvrrEAAAABU] /wiki/Special:CentralNotice Wikimedia\Rdbms\DBTransactionStateError from line 1422 of /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php: Cannot execute query from PageImages::getPageImage while transaction status is ERROR
Backtrace:
#0 /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php(1143): Wikimedia\Rdbms\Database->assertQueryIsCurrentlyAllowed(string, string)
#1 /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php(1794): Wikimedia\Rdbms\Database->query(string, string)
#2 /srv/mediawiki/php-master/includes/libs/rdbms/database/Database.php(1632): Wikimedia\Rdbms\Database->select(string, string, array, string, array, array)
#3 /srv/mediawiki/php-master/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->selectField(string, string, array, string, array)
#4 /srv/mediawiki/php-master/includes/libs/rdbms/database/DBConnRef.php(302): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#5 /srv/mediawiki/php-master/extensions/PageImages/includes/PageImages.php(63): Wikimedia\Rdbms\DBConnRef->selectField(string, string, array, string, array)
#6 /srv/mediawiki/php-master/extensions/PageImages/includes/PageImages.php(203): PageImages::getPageImage(Title)
#7 /srv/mediawiki/php-master/includes/Hooks.php(174): PageImages::onBeforePageDisplay(OutputPage, SkinVector)
#8 /srv/mediawiki/php-master/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)
#9 /srv/mediawiki/php-master/includes/OutputPage.php(2588): Hooks::runWithoutAbort(string, array)
#10 /srv/mediawiki/php-master/includes/exception/MWExceptionRenderer.php(134): OutputPage->output()
#11 /srv/mediawiki/php-master/includes/exception/MWExceptionRenderer.php(53): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBQueryError)
#12 /srv/mediawiki/php-master/includes/exception/MWExceptionHandler.php(121): MWExceptionRenderer::output(Wikimedia\Rdbms\DBQueryError, integer)
#13 /srv/mediawiki/php-master/includes/exception/MWExceptionHandler.php(195): MWExceptionHandler::report(Wikimedia\Rdbms\DBQueryError)
#14 /srv/mediawiki/php-master/includes/MediaWiki.php(550): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBQueryError)
#15 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#16 /srv/mediawiki/w/index.php(3): include(string)
#17 {main}

MediaWiki: 1.34.0-alpha (1c7a8c1) 00:32, 27 August 2019
CentralNotice: 2.6.1 (7a05bb8) 07:06, 26 August 2019

Details

Related Gerrit Patches:

Event Timeline

JJMC89 created this task.Aug 27 2019, 1:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 27 2019, 1:20 AM

Thanks so much for reporting this @JJMC89!! I'm getting the same issue locally with updated versions of CentralNotice and Mediawiki core.

AndyRussG triaged this task as Unbreak Now! priority.Aug 27 2019, 2:19 AM
Restricted Application added subscribers: Pcoombe, Liuxinyu970226. · View Herald TranscriptAug 27 2019, 2:19 AM
Ejegg added a subscriber: Ejegg.EditedAug 27 2019, 3:22 AM

Git bisect points to core commit 2ec627ea02ad07db4842d3d53a1cce2b3c1384ee

Change 532507 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/core@master] TablePager: put parent construct call back at end

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

AndyRussG assigned this task to Ejegg.Aug 27 2019, 4:02 AM

Thanks @Ejegg!! I can confirm that the linked patch fixes the issue locally.

Change 532507 merged by jenkins-bot:
[mediawiki/core@master] TablePager: put parent construct call back at end

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

JJMC89 closed this task as Resolved.Aug 27 2019, 5:47 AM

Thanks again, @JJMC89 and @Ejegg!!