Page MenuHomePhabricator

Unknown error: "tpt-unknown-page"
Closed, ResolvedPublic

Description

When I mark a page for translation on my wiki, I get the "tpt-unknown-page" error when trying to translate it. Running RunJobs.php does nothing, running, /extensions/Translate/scripts/createMessageIndex.php temporarily fixes the issue, but FuzzyBot still doesn't run.


See Also:

Event Timeline

Running php maintenance/showJobs.php --group returns
TranslationsUpdateJob: 0 queued; 11 claimed (0 active, 11 abandoned); 0 delayed, so apparently jobs are being abandoned.

Please check logs for clues why they are failing, or try running them manually with runJobs before they are abandoned.

PHP Fatal error: Allowed memory size of 314572800 bytes exhausted (tried to allocate 72 bytes) in /var/www/html/includes/libs/rdbms/database/DatabaseMysqlBase.php on line 630, referer: https://testwiki.wiki/wiki/Test_Translate

This is with MediaWiki 1.28.2 on Debian 8 (PHP 5.6.30, MariaDB 10.0.30)

In php.ini the memory limit is set to 300m.

This only started happening when I moved from a shared host (Which was using CloudLinux), to VPS. On the shared hosting it was working fine with the memory limit set lower tham 300m.

I have no idea what could cause it to go over the memory limit. I think you need to enable the debug logs and see what happens before it runs out of memory. See https://www.mediawiki.org/wiki/Manual:How_to_debug#Logging

This comment was removed by MacFan4000.

[Please discuss different topics happening in different branches in separate places - thanks!]

In that log file I see the following;
exception] [37572560d2c39353bb44aa29] /wiki/Special:PageTranslation DBUnexpectedError from line 2866 of /var/www/html/includes/libs/rdbms/database/Database.php: MWCallableUpdate::doUpdate: Cannot flush snapshot because writes are pending (JobQueueDB::doBatchPush).
#0 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1092): Database->flushSnapshot(string)
#1 [internal function]: LoadBalancer->{closure}(DatabaseMysqli)
#2 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1390): call_user_func_array(Closure, array)
#3 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1100): LoadBalancer->forEachOpenMasterConnection(Closure)
#4 [internal function]: LoadBalancer->beginMasterChanges(string)
#5 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(176): call_user_func_array(array, array)
#6 [internal function]: LBFactory->{closure}(LoadBalancer, string, array)
#7 /var/www/html/includes/libs/rdbms/lbfactory/LBFactorySimple.php(134): call_user_func_array(Closure, array)
#8 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(179): LBFactorySimple->forEachLB(Closure, array)
#9 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(200): LBFactory->forEachLBCallMethod(string, array)
#10 /var/www/html/includes/deferred/DeferredUpdates.php(262): LBFactory->beginMasterChanges(string)
#11 /var/www/html/includes/deferred/DeferredUpdates.php(225): DeferredUpdates::runUpdate(MWCallableUpdate, LBFactorySimple, integer)
#12 /var/www/html/includes/deferred/DeferredUpdates.php(133): DeferredUpdates::execute(array, string, integer)
#13 /var/www/html/includes/MediaWiki.php(891): DeferredUpdates::doUpdates(string)
#14 /var/www/html/includes/MediaWiki.php(720): MediaWiki->restInPeace(string)
#15 /var/www/html/includes/MediaWiki.php(739): MediaWiki->{closure}()
#16 /var/www/html/includes/MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)
#17 /var/www/html/index.php(43): MediaWiki->run()
#18 {main}
[Bug56269] Exception thrown with an uncommited database transaction: [37572560d2c39353bb44aa29] /wiki/Special:PageTranslation DBExpectedError from line 1103 of /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php: MWCallableUpdate::doUpdate: Flush failed on server(s) localhost: MWCallableUpdate::doUpdate: Cannot flush snapshot because writes are pending (JobQueueDB::doBatchPush).
#0 [internal function]: LoadBalancer->beginMasterChanges(string)
#1 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(176): call_user_func_array(array, array)
#2 [internal function]: LBFactory->{closure}(LoadBalancer, string, array)
#3 /var/www/html/includes/libs/rdbms/lbfactory/LBFactorySimple.php(134): call_user_func_array(Closure, array)
#4 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(179): LBFactorySimple->forEachLB(Closure, array)
#5 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(200): LBFactory->forEachLBCallMethod(string, array)
#6 /var/www/html/includes/deferred/DeferredUpdates.php(262): LBFactory->beginMasterChanges(string)
#7 /var/www/html/includes/deferred/DeferredUpdates.php(225): DeferredUpdates::runUpdate(MWCallableUpdate, LBFactorySimple, integer)
#8 /var/www/html/includes/deferred/DeferredUpdates.php(133): DeferredUpdates::execute(array, string, integer)
#9 /var/www/html/includes/MediaWiki.php(891): DeferredUpdates::doUpdates(string)
#10 /var/www/html/includes/MediaWiki.php(720): MediaWiki->restInPeace(string)
#11 /var/www/html/includes/MediaWiki.php(739): MediaWiki->{closure}()
#12 /var/www/html/includes/MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)
#13 /var/www/html/index.php(43): MediaWiki->run()
#14 {main}
Title::getRestrictionTypes: applicable restrictions to [[Test Translate]] are {edit,move,delete,protect}
[runJobs] TranslationsUpdateJob Test_Translate sections={"UNIQ64804686685a5388-0":{"id":"Page display title","name":"Page display title","text":"Test Translate","type":"old","oldText":null},"UNIQ54c75ac17fec265d-2":"object(...)","UNIQ7cc413341eb364dc-4":"object(...)","UNIQ1b92f1d9333c4de1-6":"object(...)","UNIQ1cee30073418efc0-8":{"id":16,"name":16,"text":"Proin feugiat ipsum tellus, sit amet viverra eros vehicula non. Aliquam eu nulla metus. Sed arcu libero, malesuada non rutrum quis, auctor eget libero. Duis condimentum sodales tempor. Nunc arcu nisl, auctor congue libero quis, commodo mollis nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla eu lectus libero.","type":"new","oldText":null}} requestId=37572560d2c39353bb44aa29 (id=1254,timestamp=20170607155828) STARTING
User: loading options for user 51 from database.
[objectcache] Rejected set() for wiki-mw_:page-restrictions:474:989 due to pending writes.
Title::getRestrictionTypes: applicable restrictions to [[Translations:Test Translate/Page display title/en]] are {edit,move,delete,protect}
[objectcache] Rejected set() for wiki-mw_:page-restrictions:474:989 due to pending writes.
Title::getRestrictionTypes: applicable restrictions to [[Translations:Test Translate/Page display title/en]] are {edit,move,delete,protect}
User::getBlockedStatus: checking...
[Bug56269] Exception thrown with an uncommited database transaction: [37572560d2c39353bb44aa29] /wiki/Special:PageTranslation DBTransactionError from line 193 of /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php: MWCallableUpdate::doUpdate: transaction round 'TranslationsUpdateJob::run' already started.
#0 /var/www/html/includes/deferred/DeferredUpdates.php(262): LBFactory->beginMasterChanges(string)
#1 /var/www/html/includes/deferred/DeferredUpdates.php(225): DeferredUpdates::runUpdate(MWCallableUpdate, LBFactorySimple, integer)
#2 /var/www/html/includes/deferred/DeferredUpdates.php(133): DeferredUpdates::execute(array, string, integer)
#3 /var/www/html/includes/deferred/DeferredUpdates.php(92): DeferredUpdates::doUpdates(string)
#4 /var/www/html/includes/deferred/DeferredUpdates.php(116): DeferredUpdates::addUpdate(MWCallableUpdate, integer)
#5 /var/www/html/includes/changes/RecentChange.php(706): DeferredUpdates::addCallableUpdate(Closure, integer, DatabaseMysqli)
#6 /var/www/html/includes/page/WikiPage.php(2007): RecentChange::notifyNew(string, Title, boolean, User, string, integer, string, integer, integer, boolean, array)
#7 /var/www/html/includes/page/WikiPage.php(1737): WikiPage->doCreate(WikitextContent, integer, User, string, array)
#8 /var/www/html/extensions/Translate/utils/MessageUpdateJob.php(48): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User)
#9 /var/www/html/extensions/Translate/tag/TranslationsUpdateJob.php(29): MessageUpdateJob->run()
#10 /var/www/html/includes/jobqueue/JobRunner.php(275): TranslationsUpdateJob->run()
#11 /var/www/html/includes/jobqueue/JobRunner.php(185): JobRunner->executeJob(TranslationsUpdateJob, LBFactorySimple, BufferingStatsdDataFactory, integer)
#12 /var/www/html/includes/MediaWiki.php(941): JobRunner->run(array)
#13 /var/www/html/includes/MediaWiki.php(900): MediaWiki->triggerJobs()
#14 /var/www/html/includes/MediaWiki.php(720): MediaWiki->restInPeace(string)
#15 /var/www/html/includes/MediaWiki.php(739): MediaWiki->{closure}()
#16 /var/www/html/includes/MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)
#17 /var/www/html/index.php(43): MediaWiki->run()
#18 {main}
[Bug56269] Exception thrown with an uncommited database transaction: [37572560d2c39353bb44aa29] /wiki/Special:PageTranslation DBUnexpectedError from line 2671 of /var/www/html/includes/libs/rdbms/database/Database.php: Invalid atomic section ended (got WikiPage::doCreate).
#0 /var/www/html/includes/page/WikiPage.php(2012): Database->endAtomic(string)
#1 /var/www/html/includes/page/WikiPage.php(1737): WikiPage->doCreate(WikitextContent, integer, User, string, array)
#2 /var/www/html/extensions/Translate/utils/MessageUpdateJob.php(48): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User)
#3 /var/www/html/extensions/Translate/tag/TranslationsUpdateJob.php(29): MessageUpdateJob->run()
#4 /var/www/html/includes/jobqueue/JobRunner.php(275): TranslationsUpdateJob->run()
#5 /var/www/html/includes/jobqueue/JobRunner.php(185): JobRunner->executeJob(TranslationsUpdateJob, LBFactorySimple, BufferingStatsdDataFactory, integer)
#6 /var/www/html/includes/MediaWiki.php(941): JobRunner->run(array)
#7 /var/www/html/includes/MediaWiki.php(900): MediaWiki->triggerJobs()
#8 /var/www/html/includes/MediaWiki.php(720): MediaWiki->restInPeace(string)
#9 /var/www/html/includes/MediaWiki.php(739): MediaWiki->{closure}()
#10 /var/www/html/includes/MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)
#11 /var/www/html/index.php(43): MediaWiki->run()
#12 {main}
[runJobs] TranslationsUpdateJob Test_Translate sections={"UNIQ64804686685a5388-0":{"id":"Page display title","name":"Page display title","text":"Test Translate","type":"old","oldText":null},"UNIQ54c75ac17fec265d-2":"object(...)","UNIQ7cc413341eb364dc-4":"object(...)","UNIQ1b92f1d9333c4de1-6":"object(...)","UNIQ1cee30073418efc0-8":{"id":16,"name":16,"text":"Proin feugiat ipsum tellus, sit amet viverra eros vehicula non. Aliquam eu nulla metus. Sed arcu libero, malesuada non rutrum quis, auctor eget libero. Duis condimentum sodales tempor. Nunc arcu nisl, auctor congue libero quis, commodo mollis nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla eu lectus libero.","type":"new","oldText":null}} requestId=37572560d2c39353bb44aa29 (id=1254,timestamp=20170607155828) t=35 error=DBUnexpectedError: Invalid atomic section ended (got WikiPage::doCreate).

Based on MWCallableUpdate::doUpdate: Cannot flush snapshot because writes are pending please try with the new code listed in https://phabricator.wikimedia.org/T154425 If you are running a stable branch from git, you can just git pull to latest version.

MacFan4000 claimed this task.

That worked. Thanks @Nikerabbit.