Page MenuHomePhabricator

Database query error when viewing non-existent pages on mediawiki.org
Closed, ResolvedPublicPRODUCTION ERROR

Description

Viewing the page Extension:MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec on MediaWiki.org, which was recently deleted, is producing a database error.

Error message
[X-TXJApAADoAAHm5k38AAABM] 2021-01-05 21:16:21: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

Details

Request ID
X-TXJApAADoAAHm5k38AAABM
Request URL
https://www.mediawiki.org/w/index.php?title=Extension:MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec&action=edit&redlink=1
Stack Trace
2021-01-05 21:16:21 [X-TXJApAADoAAHm5k38AAABM] mw1263 mediawikiwiki 1.36.0-wmf.25 exception ERROR: [X-TXJApAADoAAHm5k38AAABM] /w/index.php?title=Extension:MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec&action=edit&redlink=1   Wikimedia\Rdbms\DBQueryError from line 1699 of /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/Database.php: Error 1176: Key 'log_times' doesn't exist in table 'logging' (10.64.16.7)
Function: IndexPager::buildQueryInfo (LogPager)
Query: SELECT  /*! STRAIGHT_JOIN */ log_id,log_type,log_action,log_timestamp,log_namespace,log_title,log_params,log_deleted,user_id,user_name,user_editcount,comment_log_comment.comment_text AS `log_comment_text`,comment_log_comment.comment_data AS `log_comment_data`,comment_log_comment.comment_id AS `log_comment_cid`,actor_log_user.actor_user AS `log_user`,actor_log_user.actor_name AS `log_user_text`,log_actor,(SELECT  GROUP_CONCAT(ctd_name SEPARATOR ',')  FROM `change_tag` JOIN `change_tag_def` ON ((ct_tag_id=ctd_id))   WHERE ct_log_id=log_id  ) AS `ts_tags`  FROM `logging` IGNORE INDEX (log_times) JOIN `comment` `comment_log_comment` ON ((comment_log_comment.comment_id = log_comment_id)) JOIN `actor` `actor_log_user` ON ((actor_log_user.actor_id = log_actor)) LEFT JOIN `user` ON ((user_id=actor_log_user.actor_user))   WHERE (log_action != 'revision') AND (log_type NOT IN ('spamblacklist','titleblacklist','urlshortener','abusefilterprivatedetails','oath','suppress')) AND log_type IN ('delete','move')  AND log_namespace = 102 AND log_title = 'MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec' AND ((log_deleted & 1) = 0)  ORDER BY log_timestamp DESC LIMIT 11  
 {"exception_id":"X-TXJApAADoAAHm5k38AAABM","exception_url":"/w/index.php?title=Extension:MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec&action=edit&redlink=1","caught_by":"entrypoint"} 
[Exception Wikimedia\Rdbms\DBQueryError] (/srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/Database.php:1699) Error 1176: Key 'log_times' doesn't exist in table 'logging' (10.64.16.7)
Function: IndexPager::buildQueryInfo (LogPager)
Query: SELECT  /*! STRAIGHT_JOIN */ log_id,log_type,log_action,log_timestamp,log_namespace,log_title,log_params,log_deleted,user_id,user_name,user_editcount,comment_log_comment.comment_text AS `log_comment_text`,comment_log_comment.comment_data AS `log_comment_data`,comment_log_comment.comment_id AS `log_comment_cid`,actor_log_user.actor_user AS `log_user`,actor_log_user.actor_name AS `log_user_text`,log_actor,(SELECT  GROUP_CONCAT(ctd_name SEPARATOR ',')  FROM `change_tag` JOIN `change_tag_def` ON ((ct_tag_id=ctd_id))   WHERE ct_log_id=log_id  ) AS `ts_tags`  FROM `logging` IGNORE INDEX (log_times) JOIN `comment` `comment_log_comment` ON ((comment_log_comment.comment_id = log_comment_id)) JOIN `actor` `actor_log_user` ON ((actor_log_user.actor_id = log_actor)) LEFT JOIN `user` ON ((user_id=actor_log_user.actor_user))   WHERE (log_action != 'revision') AND (log_type NOT IN ('spamblacklist','titleblacklist','urlshortener','abusefilterprivatedetails','oath','suppress')) AND log_type IN ('delete','move')  AND log_namespace = 102 AND log_title = 'MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec' AND ((log_deleted & 1) = 0)  ORDER BY log_timestamp DESC LIMIT 11  

  #0 /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/Database.php(1683): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  #1 /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/Database.php(1658): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  #2 /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/Database.php(1227): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  #3 /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/Database.php(1907): Wikimedia\Rdbms\Database->query(string, string, integer)
  #4 /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
  #5 /srv/mediawiki/php-1.36.0-wmf.25/includes/libs/rdbms/database/DBConnRef.php(313): Wikimedia\Rdbms\DBConnRef->__call(string, array)
  #6 /srv/mediawiki/php-1.36.0-wmf.25/includes/pager/IndexPager.php(449): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)
  #7 /srv/mediawiki/php-1.36.0-wmf.25/includes/pager/IndexPager.php(280): IndexPager->reallyDoQuery(string, integer, boolean)
  #8 /srv/mediawiki/php-1.36.0-wmf.25/includes/logging/LogPager.php(499): IndexPager->doQuery()
  #9 /srv/mediawiki/php-1.36.0-wmf.25/includes/pager/IndexPager.php(588): LogPager->doQuery()
  #10 /srv/mediawiki/php-1.36.0-wmf.25/includes/logging/LogEventsList.php(700): IndexPager->getBody()
  #11 /srv/mediawiki/php-1.36.0-wmf.25/includes/EditPage.php(2842): LogEventsList::showLogExtract(OutputPage, array, Title, string, array)
  #12 /srv/mediawiki/php-1.36.0-wmf.25/includes/EditPage.php(652): EditPage->showIntro()
  #13 /srv/mediawiki/php-1.36.0-wmf.25/includes/actions/EditAction.php(71): EditPage->edit()
  #14 /srv/mediawiki/php-1.36.0-wmf.25/includes/MediaWiki.php(532): EditAction->show()
  #15 /srv/mediawiki/php-1.36.0-wmf.25/includes/MediaWiki.php(316): MediaWiki->performAction(Article, Title)
  #16 /srv/mediawiki/php-1.36.0-wmf.25/includes/MediaWiki.php(945): MediaWiki->performRequest()
  #17 /srv/mediawiki/php-1.36.0-wmf.25/includes/MediaWiki.php(548): MediaWiki->main()
  #18 /srv/mediawiki/php-1.36.0-wmf.25/index.php(53): MediaWiki->run()
  #19 /srv/mediawiki/php-1.36.0-wmf.25/index.php(46): wfIndexMain()
  #20 /srv/mediawiki/w/index.php(3): require(string)
  #21 {main}

Event Timeline

Pppery created this task.Tue, Jan 5, 9:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Jan 5, 9:18 PM
Peachey88 triaged this task as Unbreak Now! priority.Tue, Jan 5, 9:36 PM
Peachey88 added a subscriber: Peachey88.

Affects any non existent page not just recently deleted by the looks

Skizzerz renamed this task from Database query error when viewing Extension:MobileFrontend/Hooks/MobileSiteOutputPageBeforeExec on mediawiki.org to Database query error when viewing non-existent pages on mediawiki.org.Tue, Jan 5, 9:37 PM

Affects any non existent page not just recently deleted by the looks

Modified description to reflect this information, as it matches what I was experiencing as well.

Reedy added a project: MediaWiki-General.
Ladsgroup claimed this task.Tue, Jan 5, 9:45 PM
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptTue, Jan 5, 9:45 PM
Pppery removed a subscriber: Pppery.Tue, Jan 5, 9:46 PM

Change 654507 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@master] Check for the index name while it's being renamed

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

Change 654448 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/core@wmf/1.36.0-wmf.25] Check for the index name while it's being renamed

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

Change 654507 merged by jenkins-bot:
[mediawiki/core@master] Check for the index name while it's being renamed

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

Change 654448 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.25] Check for the index name while it's being renamed

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

Maintenance_bot moved this task from Incoming to Done on the User-Ladsgroup board.Wed, Jan 6, 12:15 AM