Page MenuHomePhabricator

Page move/rename on mediawiki.org takes >48h
Closed, ResolvedPublic

Description

I would not expect a page move (rename) to take > 48 hours. If I'm wrong, please correct me.
See T206388: Move/rename [[mw:Annoying_little_bugs]] to [[mw:Good_first_bugs]]

Trying to "Move" myself, it says

You do not have permission to move this page, for the following reason:
This page is locked because the translatable page is currently being moved.

Outcome

Translatable pages consisting of too many pages can no longer be moved through the web interface, because it is unreliably. Going forward, such pages can be only moved using a command line maintenance script, which for WMF wikis can be requested through Phabricator task for Wikimedia-Site-requests.

Event Timeline

Pcoombe subscribed.

Moving a non-translatable page seems to work fine, so I guess this is related to the translate extension.

Yeah there are a few reports about this feature that indicate it being somewhat unreliable. Assuming it is just not about jobqueue being slow, it will need some manual steps to clean up the move.

it will need some manual steps to clean up the move.

Thanks for the feedback! @Nikerabbit: Who has the knowledge and permissions to perform these steps for this specific case?

Could not reproduce when I tried again this time in T206388 - wasn't entirely smooth but worked. :) Not sure if this task should be declined?

I would summarize this as that the move (and delete) jobs are not very robust against unexpected events. However, at this point we do not know what unexpected thing happened here :/

OK, I have tracked down this problematic interaction between the Translate extension and the MW sources. I have an external jobrunner script which helped.

When moving a translated page, I had php pause and then segfault when jobs were being run. I tracked down the parts causing this to be triggered in mw-sources/includes/MovePage.php. By commenting out the following lines, I was able to get the jobs to complete without php segfaulting:

in private function moveToInternal(), the "problem lines" (causing segfaults for some page moves) are:

$newpage->doEditUpdates( $nullRevision, $user,  [ 'changed' => false, 'moved' => true, 'oldcountable' => $oldcountable ] );

and

## Log the move
$logid = $logEntry->insert();

$logEntry->setTags( $changeTags );
$logEntry->publish( $logid );

Commenting out these lines allowed the translated page move to complete successfully. I am running MW 1.31.0 and am using Translate extension branch REL1_31 (though I suspect the same fixes will resolve issues in git master, as I was also having this problem with git master.)

Hopefully you guys can now track down the issue! :)

@drobbins I am fighting currently with this problem too. I commented out the mentioned lines. How do I get the system to complete the rename job?
The job table is empty and /maintenance/runJobs.php won't do anything.

Checking for the latest case I see a lot of:

Deferred update 'AutoCommitUpdate_Title::invalidateCache' failed to run.
[YBk9BApAMNYAAvA04dwAAABS] /rpc/RunSingleJob.php   Wikimedia\Rdbms\DBQueryError: Error 1205: Lock wait timeout exceeded; try restarting transaction (10.64.16.104)
Function: ActivityUpdateJob::updateWatchlistNotification
Query: UPDATE  `watchlist` SET wl_notificationtimestamp = NULL WHERE wl_user = [...] AND wl_namespace = 0 AND wl_title = 'Universal_Code_of_Conduct/Draft_review/fi' AND (wl_notificationtimestamp < '20210202[...]')
Error 1205 from Title::invalidateCache, Lock wait timeout exceeded; try restarting transaction (10.64.16.104) UPDATE  `page` SET page_touched = '20210202[...]' WHERE page_id = 11113470 AND (page_touched < '20210202[...]') 10.64.16.104
Exception executing job: TranslatablePageMoveJob Universal_Code_of_Conduct/Policy_text source=Universal Code of Conduct/Draft review target=Universal Code of Conduct/Policy text moves=array(1740) summary=Part of translatable page "Universal Code of Conduct/Draft review" performer=Samuel (WMF) namespace=0 title=Universal_Code_of_Conduct/Policy_text requestId=YBk7CApAADoAAFKpCdMAAABO : Wikimedia\Rdbms\DBQueryError: Error 1205: Lock wait timeout exceeded; try restarting transaction (10.64.16.104)
Function: MovePage::moveToInternal
Query: UPDATE  `page` SET page_namespace = 0,page_title = 'Universal_Code_of_Conduct/Policy_text' WHERE page_id = 11113470
Exception executing job: TranslatablePageMoveJob Universal_Code_of_Conduct/Policy_text source=Universal Code of Conduct/Draft review target=Universal Code of Conduct/Policy text moves=array(1740) summary=Part of translatable page "Universal Code of Conduct/Draft review" performer=Samuel (WMF) namespace=0 title=Universal_Code_of_Conduct/Policy_text requestId=YBk6eApAEJkAAGQuWlsAAACW : WMFTimeoutException: the execution time limit of 1200 seconds was exceeded

Status update:

  • Pages are no longer locker indefinitely, it's limited to 2 hours.
  • Will explore adding a notice to the translatable page moving page to warn about this bug.
  • Will explore preventing a move with lots of pages.
  • Will add a maintenance script to move huge pages manually.
  • Try to explore possibilities of making the TranslatablePageMoveJob not time out.

Change 668655 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Limit the max number of pages that can be moved

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

Change 668655 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Limit the max number of pages that can be moved

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

Tagging the sprint to indicate that this is being worked on, even though work is mostly happening in the sub tasks.

abi_ subscribed.

We've done two things to address this larger issue:

  1. We've limited the maximum number of pages that can be moved from the UI to 500 by default, but can be configured to be higher by changing the configuration: $wgTranslatePageMoveLimit.
  2. Added moveTranslatablePage script to tackle moving a large number of translations or translation pages.

Related documentation has been updated: https://www.mediawiki.org/wiki/Help:Extension:Translate/Move_translatable_page

Leaving open for few days for any comments.

Nikerabbit claimed this task.

A few days has passed.