Page MenuHomePhabricator

scap sync failed, database error: RevisionStore::fetchRevisionRowFromConds Error: 1146 Table 'labtestwiki.revision' doesn't exist
Closed, ResolvedPublic

Description

Error message
13:35:09 Bootstrapping l10n cache for 1.35.0-wmf.3
13:35:10 Last output:
Wikimedia\Rdbms\DBQueryError from line 1626 of /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forge
t to run your application's database schema updater after upgrading?
Query: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS `rev_comment_text`,comment_rev_comment.co
mment_data AS `rev_comment_data`,comment_rev_comment.comment_id AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_u
ser.revactor_actor AS `rev_actor`,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM `revision` JOIN `revision_comment_temp` `temp_rev_comment`
 ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN `comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN `revision_
actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN `page` ON ((
page_id = rev_page)) LEFT JOIN `user` ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = '8' AND page_title = 'Gadgets-definit
ion' AND (rev_id=page_latest)  LIMIT 1
Function: MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds
Error: 1146 Table 'labtestwiki.revision' doesn't exist (10.64.32.72)

liw@deploy1001:/srv/mediawiki-staging$ git diff
Impact

Can't continue train to group0 until fixed.

Notes

I tried to deploy 1.35.0-wmf.3 to testwiki, but failed to edit wikiversions.json correctly, so it got deployed to labtestwiki instead. Or almost. But the scap command failed. See terminal output with Python stack trace above.

Details

Stack Trace
mwscript Trace
#0 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1610): Wikimedia\Rdbms\Database->getQueryException('Table 'labtestw...', 1146, 'SELECT  rev_id,
...', 'MediaWiki\\Revis...')
#1 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1587): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Table 'labtestw...', 1146, 'SELECT  r
ev_id,...', 'MediaWiki\\Revis...')
#2 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1166): Wikimedia\Rdbms\Database->reportQueryError('Table 'labtestw...', 1146, 'SELECT  rev_id,.
..', 'MediaWiki\\Revis...', false)
#3 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1828): Wikimedia\Rdbms\Database->query('SELECT  rev_id,...', 'MediaWiki\\Revis...')
#4 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/Database.php(1920): Wikimedia\Rdbms\Database->select(Array, Array, Array, 'MediaWiki\\Revis...', Array, Arra
y)
#5 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->selectRow(Array, Array, Array, 'MediaWiki\\Revis...', Array, Ar
ray)
#6 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/rdbms/database/DBConnRef.php(336): Wikimedia\Rdbms\DBConnRef->__call('selectRow', Array)
#7 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/Revision/RevisionStore.php(2589): Wikimedia\Rdbms\DBConnRef->selectRow(Array, Array, Array, 'MediaWiki\\Revis...', Array, Array)
#8 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/Revision/RevisionStore.php(2536): MediaWiki\Revision\RevisionStore->fetchRevisionRowFromConds(Object(Wikimedia\Rdbms\DBConnRef),
 Array, 0)
#9 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/Revision/RevisionStore.php(1513): MediaWiki\Revision\RevisionStore->loadRevisionFromConds(Object(Wikimedia\Rdbms\DBConnRef), Arr
ay, 0, Object(Title))
#10 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/Revision.php(139): MediaWiki\Revision\RevisionStore->getRevisionByTitle(Object(Title), 0, 0)
#11 /srv/mediawiki-staging/php-1.35.0-wmf.3/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(139): Revision::newFromTitle(Object(Title))
#12 /srv/mediawiki-staging/php-1.35.0-wmf.3/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(108): MediaWikiGadgetsDefinitionRepo->fetchStructuredList()
#13 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/objectcache/wancache/WANObjectCache.php(1425): MediaWikiGadgetsDefinitionRepo->{closure}(false, 86400, Array, NULL)
#14 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/objectcache/wancache/WANObjectCache.php(1278): WANObjectCache->fetchOrRegenerate('labtestwiki:gad...', 86400, Object(Closu
re), Array)
#15 /srv/mediawiki-staging/php-1.35.0-wmf.3/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(115): WANObjectCache->getWithSetCallback('labtestwiki:gad...', 86400, Obj
ect(Closure), Array)
#16 /srv/mediawiki-staging/php-1.35.0-wmf.3/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(31): MediaWikiGadgetsDefinitionRepo->loadGadgets()
#17 /srv/mediawiki-staging/php-1.35.0-wmf.3/extensions/Gadgets/includes/GadgetHooks.php(134): MediaWikiGadgetsDefinitionRepo->getGadgetIds()
#18 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/Hooks.php(174): GadgetHooks::registerModules(Object(ResourceLoader))
#19 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/Hooks.php(202): Hooks::callHook('ResourceLoaderR...', Array, Array, NULL)
#20 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/ServiceWiring.php(703): Hooks::run('ResourceLoaderR...', Array)
#21 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(Object(MediaWiki\MediaWikiServices))
#22 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService('ResourceLoader')
#23 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/MediaWikiServices.php(920): Wikimedia\Services\ServiceContainer->getService('ResourceLoader')
#24 /srv/mediawiki-staging/php-1.35.0-wmf.3/maintenance/rebuildLocalisationCache.php(98): MediaWiki\MediaWikiServices->getResourceLoader()
#25 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/cache/localisation/LocalisationCache.php(1050): RebuildLocalisationCache->{closure}()
#26 /srv/mediawiki-staging/php-1.35.0-wmf.3/includes/cache/localisation/LocalisationCacheBulkLoad.php(100): LocalisationCache->recache('en')
#27 /srv/mediawiki-staging/php-1.35.0-wmf.3/maintenance/rebuildLocalisationCache.php(178): LocalisationCacheBulkLoad->recache('en')
#28 /srv/mediawiki-staging/php-1.35.0-wmf.3/maintenance/rebuildLocalisationCache.php(134): RebuildLocalisationCache->doRebuild(Array, Object(LocalisationCacheBulkLoad), false)
#29 /srv/mediawiki-staging/php-1.35.0-wmf.3/maintenance/doMaintenance.php(99): RebuildLocalisationCache->execute()
#30 /srv/mediawiki-staging/php-1.35.0-wmf.3/maintenance/rebuildLocalisationCache.php(197): require_once('/srv/mediawiki-...')
#31 /srv/mediawiki-staging/multiversion/MWScript.php(101): require_once('/srv/mediawiki-...')
#32 {main}
scap trace
13:35:10 Finished l10n-update (duration: 05m 00s)
13:35:10 Unhandled error:
  aceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/scap/cli.py", line 342, in run
    exit_status = app.main(app.extra_arguments)
  File "/usr/lib/python2.7/dist-packages/scap/main.py", line 634, in main
    return super(Scap, self).main(*extra_args)
  File "/usr/lib/python2.7/dist-packages/scap/main.py", line 86, in main
    self._after_sync_common()
  File "/usr/lib/python2.7/dist-packages/scap/main.py", line 657, in _after_sync_common
    version, wikidb, self.verbose, self.config)
  File "/usr/lib/python2.7/dist-packages/scap/utils.py", line 402, in context_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/scap/tasks.py", line 592, in update_localization_cache
    wikidb, cache_dir, use_cores, lang='en', quiet=True)
  File "/usr/lib/python2.7/dist-packages/scap/tasks.py", line 543, in _call_rebuildLocalisationCache
    'quiet': '--quiet' if quiet else ''
  File "/usr/lib/python2.7/dist-packages/scap/utils.py", line 402, in context_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/scap/utils.py", line 497, in sudo_check_call
    raise subprocess.CalledProcessError(proc.returncode, cmd)
CalledProcessError: Command '/usr/local/bin/mwscript rebuildLocalisationCache.php --wiki="labtestwiki" --outdir="/tmp/scap_l10n_2419219323" --threads=30 --lang en  --quiet' returne
d non-zero exit status 1
13:35:10 scap failed: CalledProcessError Command '/usr/local/bin/mwscript rebuildLocalisationCache.php --wiki="labtestwiki" --outdir="/tmp/scap_l10n_2419219323" --threads=30 --lang
 en  --quiet' returned non-zero exit status 1 (duration: 06m 40s)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 22 2019, 2:01 PM
LarsWirzenius renamed this task from scap sync failed to scap sync failed, database error.Oct 22 2019, 2:03 PM
LarsWirzenius triaged this task as Unbreak Now! priority.
LarsWirzenius updated the task description. (Show Details)
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptOct 22 2019, 2:03 PM
mmodell added a subscriber: mmodell.

Looks like a schema error:

Function: MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds
Error: 1146 Table 'labtestwiki.revision' doesn't exist (10.64.32.72)

I'm confused by this.

mmodell renamed this task from scap sync failed, database error to scap sync failed, database error: RevisionStore::fetchRevisionRowFromConds Error: 1146 Table 'labtestwiki.revision' doesn't exist.Oct 22 2019, 2:38 PM
mmodell updated the task description. (Show Details)Oct 22 2019, 2:42 PM
mmodell edited Stack Trace. (Show Details)

andrewbogott told me on IRC this is temporary problem for labtestwiki only and that we can ignore labtestwiki for this train.

LarsWirzenius lowered the priority of this task from Unbreak Now! to Low.Oct 22 2019, 2:45 PM

And I have created this earlier today: T236145

bd808 assigned this task to Andrew.Oct 23 2019, 3:55 PM

This ought to be fixed now -- please let me know if it is not!

Andrew closed this task as Resolved.Oct 23 2019, 6:43 PM