Page MenuHomePhabricator

Unable to open Special:ProblemChanges due to SQL error (categorylinks.cl_from doesn't exist in table)
Closed, ResolvedPublicPRODUCTION ERROR

Description

example: https://en.wikipedia.org/w/index.php?title=Special%3AProblemChanges&tagfilter=&category=Dogs

in 0f13fff16 the cl_from index got renamed to PRIMARY. Special:ProblemChanges in the FlaggedRevisions extension needs to change the categoarylinks index hint to use the new index name. (Relavent file extensions/FlaggedRevs/frontend/specialpages/reports/ProblemChanges_body.php )

Event Timeline

Krinkle renamed this task from Special:ProblemChanges with a category filter has SQL error due to forcing index cl_from as the index got renamed to Fatal error breaks Special:ProblemChanges due to SQL error (categorylinks.cl_from doesn't exist in table).Sep 13 2018, 4:17 AM
Krinkle changed Risk Rating from N/A to default.
channel=DBQuery
channel=exception
level=ERROR

Wikimedia\Rdbms\DBQueryError
Query: SELECT  /*! STRAIGHT_JOIN */ page_namespace,page_title,page_latest,fp_stable AS stable,fp_quality AS quality,fp_pending_since AS pending_since,fp_pending_since  FROM `flaggedpages` FORCE INDEX (fp_pending_since),`categorylinks` FORCE INDEX (cl_from),`revision`,`change_tag` FORCE INDEX (change_tag_rev_tag),`page`    WHERE (fp_pending_since IS NOT NULL) AND (rev_page = fp_page_id) AND (rev_id > fp_stable) AND (ct_rev_id = rev_id) AND (page_id = fp_page_id) AND (cl_from = fp_page_id) AND cl_to = '###' AND page_namespace IN (#,#)   GROUP BY fp_pending_since,fp_page_id ORDER BY fp_pending_since,fp_page_id LIMIT 51  
Function: IndexPager::buildQueryInfo (ProblemChangesPager)
Error: 1176 Key 'cl_from' doesn't exist in table 'categorylinks' (10.64.48.153)

#3 /srv/mediawiki/php-1.32.0-wmf.19/includes/pager/IndexPager.php(368): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#4 /srv/mediawiki/php-1.32.0-wmf.19/includes/pager/IndexPager.php(225): IndexPager->reallyDoQuery(string, integer, boolean)
#5 /srv/mediawiki/php-1.32.0-wmf.19/includes/pager/IndexPager.php(557): IndexPager->doQuery()
#6 /srv/mediawiki/php-1.32.0-wmf.19/extensions/FlaggedRevs/frontend/specialpages/reports/ProblemChanges_body.php(62): IndexPager->getNumRows()
#7 /srv/mediawiki/php-1.32.0-wmf.19/extensions/FlaggedRevs/frontend/specialpages/reports/ProblemChanges_body.php(40): ProblemChanges->showForm()
#8 /srv/mediawiki/php-1.32.0-wmf.19/includes/specialpage/SpecialPage.php(569): ProblemChanges->execute(NULL)
#9 /srv/mediawiki/php-1.32.0-wmf.19/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#10 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#11 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(868): MediaWiki->performRequest()
#12 /srv/mediawiki/php-1.32.0-wmf.19/includes/MediaWiki.php(525): MediaWiki->main()
#13 /srv/mediawiki/php-1.32.0-wmf.19/index.php(42): MediaWiki->run()
#14 /srv/mediawiki/w/index.php(3): include(string)
Krinkle renamed this task from Fatal error breaks Special:ProblemChanges due to SQL error (categorylinks.cl_from doesn't exist in table) to Unable to open Special:ProblemChanges due to SQL error (categorylinks.cl_from doesn't exist in table).Sep 13 2018, 4:20 AM

Is this the same error or should I report it separately (it has started to become frequent)?

<Similar but unrelated error, deleting to avoid confusion>

I think it is a similar, but different error, the original one was:

Key 'cl_from' doesn't exist in table 'categorylinks'

and this one is

categorylinks.cl_from doesn't exist in table Key 'change_tag_rev_tag' doesn't exist in table 'change_tag' (10.192.48.18)"

Will report separately.

Yeah, looks like it's a separate issue. When opening the url from the task description, it still triggers the same crash, so this is a different crash.

Krinkle triaged this task as High priority.EditedOct 28 2018, 10:47 PM

@MMiller_WMF Could this be picked up soon?

The minimum required action would be to simply "acknowledge and accept" the problem for the time being. Doing so would involve a small code change that disables this url, or catches the error.

Tentatively triaging as at least "High" priority because the url currently crashes in a way that is automatically recorded as a "Fatal" error, which is not cacheable, and causes HTTP 5xx-error spikes. It is exposed on a public url, which means it easily causes false alarms for SRE and may automatically abort unrelated train deployments at times when bots and users happen to open this url.

@kostajh -- could you please be sure to include this in the triage prep work you're doing today?

@kostajh -- could you please be sure to include this in the triage prep work you're doing today?

Will do!

Change 470645 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/FlaggedRevs@master] ProblemChanges: Fix reference to nonexistent cl_from index

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

Change 470645 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] ProblemChanges: Fix reference to nonexistent cl_from index

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

Change 471337 had a related patch set uploaded (by Krinkle; owner: Catrope):
[mediawiki/extensions/FlaggedRevs@wmf/1.33.0-wmf.2] ProblemChanges: Fix reference to nonexistent cl_from index

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

Change 471337 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@wmf/1.33.0-wmf.2] ProblemChanges: Fix reference to nonexistent cl_from index

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

Mentioned in SAL (#wikimedia-operations) [2018-11-04T20:38:47Z] <krinkle@deploy1001> Synchronized php-1.33.0-wmf.2/extensions/FlaggedRevs/frontend/specialpages/reports/ProblemChanges_body.php: T176232 - Ia43626584e (duration: 01m 17s)

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM