Page MenuHomePhabricator

TranslateRenderJob.php: Cannot render translation page
Open, HighPublic

Description

2018-07-26 10:36:17 [W1mkIApAAEMAAAlVSH0AAACT] mw1272 mediawikiwiki 1.32.0-wmf.14 exception ERROR: [W1mkIApAAEMAAAlVSH0AAACT] /w/index.php?title=Translations:Template:PD_Help_Page/Page_display_title/az-latn&action=delete   MWException from line 50 of /srv/mediawiki/php-1.32.0-wmf.14/extensions/Translate/tag/TranslateRenderJob.php: Cannot render translation page for Template:PD Help Page/az-latn! {"exception_id":"W1mkIApAAEMAAAlVSH0AAACT","exception_url":"/w/index.php?title=Translations:Template:PD_Help_Page/Page_display_title/az-latn&action=delete","caught_by":"other"} 
[Exception MWException] (/srv/mediawiki/php-1.32.0-wmf.14/extensions/Translate/tag/TranslateRenderJob.php:50) Cannot render translation page for Template:PD Help Page/az-latn!
  #0 /srv/mediawiki/php-1.32.0-wmf.14/extensions/Translate/tag/PageTranslationHooks.php(217): TranslateRenderJob->run()
  #1 /srv/mediawiki/php-1.32.0-wmf.14/extensions/Translate/tag/PageTranslationHooks.php(1154): PageTranslationHooks::updateTranslationPage(TranslatablePage, string, User, integer, string)
  #2 [internal function]: Closure$PageTranslationHooks::onDeleteTranslationUnit(integer, Wikimedia\Rdbms\DatabaseMysqli)
  #3 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/database/Database.php(3448): call_user_func(Closure$PageTranslationHooks::onDeleteTranslationUnit;1695, integer, Wikimedia\Rdbms\DatabaseMysqli)
  #4 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1432): Wikimedia\Rdbms\Database->runOnTransactionIdleCallbacks(integer)
  #5 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1746): Closure$Wikimedia\Rdbms\LoadBalancer::runMasterTransactionIdleCallbacks#2(Wikimedia\Rdbms\DatabaseMysqli)
  #6 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1437): Wikimedia\Rdbms\LoadBalancer->forEachOpenMasterConnection(Closure$Wikimedia\Rdbms\LoadBalancer::runMasterTransactionIdleCallbacks#2;1717)
  #7 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/lbfactory/LBFactory.php(303): Wikimedia\Rdbms\LoadBalancer->runMasterTransactionIdleCallbacks()
  #8 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/lbfactory/LBFactoryMulti.php(425): Closure$Wikimedia\Rdbms\LBFactory::executePostTransactionCallbacks(Wikimedia\Rdbms\LoadBalancer)
  #9 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/lbfactory/LBFactory.php(305): Wikimedia\Rdbms\LBFactoryMulti->forEachLB(Closure$Wikimedia\Rdbms\LBFactory::executePostTransactionCallbacks;1527)
  #10 /srv/mediawiki/php-1.32.0-wmf.14/includes/libs/rdbms/lbfactory/LBFactory.php(276): Wikimedia\Rdbms\LBFactory->executePostTransactionCallbacks()
  #11 /srv/mediawiki/php-1.32.0-wmf.14/includes/MediaWiki.php(602): Wikimedia\Rdbms\LBFactory->commitMasterChanges(string, array)
  #12 /srv/mediawiki/php-1.32.0-wmf.14/includes/MediaWiki.php(575): MediaWiki::preOutputCommit(RequestContext, Closure$MediaWiki::main;1681)
  #13 /srv/mediawiki/php-1.32.0-wmf.14/includes/MediaWiki.php(883): MediaWiki->doPreOutputCommit(Closure$MediaWiki::main;1681)
  #14 /srv/mediawiki/php-1.32.0-wmf.14/includes/MediaWiki.php(524): MediaWiki->main()
  #15 /srv/mediawiki/php-1.32.0-wmf.14/index.php(42): MediaWiki->run()
  #16 /srv/mediawiki/w/index.php(3): include(string)
  #17 {main}

Event Timeline

Reedy created this task.Jul 26 2018, 11:27 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 26 2018, 11:27 AM
Tgr added a subscriber: Tgr.

The most recent example is Cross-wiki Search Result Improvements/Design/pa-guru on mw.org.

Wargo added a subscriber: Wargo.Aug 28 2018, 8:56 AM

@Krinkle What kind of outcome did you look for when you added Language-Team?

Nikerabbit triaged this task as High priority.Sep 3 2018, 6:28 AM

@Nikerabbit The outcome I would hope for is for there not to be exceptions triggered from user actions or job queue that result in an exception logged to Logstash. These make regressions harder to find and may also cause alerts/pager duty notifications when triggered. The exception from jobs may also trigger unnecessary retries or other forms or increased load or operator confusion.

If the behaviour itself is considered acceptable to not work for the medium-long term, I would suggest catching it somewhere within Translate codebase and printing the error directly, instead of it being caught by the outer layer (as now), where it is considered an application problem.

@Krinkle Sorry that was not well phrased question from my side, but you gave enough information regardless. Our current practise is product manager triages the issues marked with Language-Team and moves them to an appropriate product tag and consults with the developers in case there are questions. Your explanation of the impact is helpful input for prioritization of this task.

We should look into this closer to understand what is the user facing impact, but we should consider just adding try-catch there. As these are jobs from jobqueue, there is no simple way to communicate back to the users. It seems the code tries to render a page that is being/has been deleted, when somebody is deleting a translation unit manually (why?), in which case doing nothing is the right thing. Is it okay to log warnings with more information in this case?

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