Page MenuHomePhabricator

TranslatePageMoveJob segmentation fault
Open, Needs TriagePublicBUG REPORT

Description

Hello kde Userbase wiki (https://userbase.kde.org) was hit by a bug.

Steps to Reproduce:

  1. Move a translated page with the translations
  2. in the console execute a php maintainance/runJobs.php

Actual Results:

The page is moved with the translations

Expected Results:

Segfault and nothing is moved

It's probably an infinite recursion error. Here is the stack trace:

#0 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(482): Wikimedia\Rdbms\Database::getClass(string, NULL)
#1 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1013): Wikimedia\Rdbms\Database::attributesFromType(string, NULL)
#2 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/loadbalancer/LoadBalancer.php(697): Wikimedia\Rdbms\LoadBalancer->getServerAttributes(integer)
#3 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/loadbalancer/LoadBalancer.php(831): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, boolean, integer)
#4 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(783): Wikimedia\Rdbms\LoadBalancer->getConnectionRef(integer, array, string, integer)
#5 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(764): JobQueueDB->getDB(integer)
#6 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(728): JobQueueDB->getMasterDB()
#7 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(224): JobQueueDB->insertFields(JobSpecification)
#8 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(200): JobQueueDB->doBatchPushInternal(Wikimedia\Rdbms\DBConnRef, array, integer, string)
#9 [internal function]: JobQueueDB->{closure}()
#10 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3267): call_user_func(Closure)
#11 [internal function]: Wikimedia\Rdbms\Database->onTransactionPreCommitOrIdle(Closure, string)
#12 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/DBConnRef.php(49): call_user_func_array(array, array)
#13 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/DBConnRef.php(491): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#14 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(202): Wikimedia\Rdbms\DBConnRef->onTransactionPreCommitOrIdle(Closure, string)
#15 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(336): JobQueueDB->doBatchPush(array, integer)
#16 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(306): JobQueue->batchPush(array, integer)
#17 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueGroup.php(160): JobQueue->push(array)
#18 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(317): JobQueueGroup->push(array)
#19 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(299): DeferredUpdates::enqueueUpdates(array)
#20 /srv/www/mediawiki/mediawiki-new/maintenance/Maintenance.php(646): DeferredUpdates::tryOpportunisticExecute(string)
#21 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3461): Maintenance::{closure}(integer, Wikimedia\Rdbms\DatabaseMysqli)
#22 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3795): Wikimedia\Rdbms\Database->runTransactionListenerCallbacks(integer)
#23 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3582): Wikimedia\Rdbms\Database->commit(string, string)
#24 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3268): Wikimedia\Rdbms\Database->endAtomic(string)
#25 [internal function]: Wikimedia\Rdbms\Database->onTransactionPreCommitOrIdle(Closure, string)
#26 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/DBConnRef.php(49): call_user_func_array(array, array)
#27 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/DBConnRef.php(491): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#28 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(202): Wikimedia\Rdbms\DBConnRef->onTransactionPreCommitOrIdle(Closure, string)
#29 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(336): JobQueueDB->doBatchPush(array, integer)
#30 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(306): JobQueue->batchPush(array, integer)
#31 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueGroup.php(160): JobQueue->push(array)
#32 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(317): JobQueueGroup->push(array)
#33 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(299): DeferredUpdates::enqueueUpdates(array)
#34 /srv/www/mediawiki/mediawiki-new/maintenance/Maintenance.php(646): DeferredUpdates::tryOpportunisticExecute(string)
#35 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3461): Maintenance::{closure}(integer, Wikimedia\Rdbms\DatabaseMysqli)
#36 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3795): Wikimedia\Rdbms\Database->runTransactionListenerCallbacks(integer)
#37 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3582): Wikimedia\Rdbms\Database->commit(string, string)
#38 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3268): Wikimedia\Rdbms\Database->endAtomic(string)
#39 [internal function]: Wikimedia\Rdbms\Database->onTransactionPreCommitOrIdle(Closure, string)
#40 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/DBConnRef.php(49): call_user_func_array(array, array)
#41 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/DBConnRef.php(491): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#42 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueDB.php(202): Wikimedia\Rdbms\DBConnRef->onTransactionPreCommitOrIdle(Closure, string)
#43 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(336): JobQueueDB->doBatchPush(array, integer)
#44 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(306): JobQueue->batchPush(array, integer)
#45 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueGroup.php(160): JobQueue->push(array)
#46 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(317): JobQueueGroup->push(array)
#47 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(299): DeferredUpdates::enqueueUpdates(array)
#48 /srv/www/mediawiki/mediawiki-new/maintenance/Maintenance.php(646): DeferredUpdates::tryOpportunisticExecute(string)
#49 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3461): Maintenance::{closure}(integer, Wikimedia\Rdbms\DatabaseMysqli)
#50 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3795): Wikimedia\Rdbms\Database->runTransactionListenerCallbacks(integer)
#51 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3582): Wikimedia\Rdbms\Database->commit(string, string)
#52 /srv/www/mediawiki/mediawiki-new/includes/libs/rdbms/database/Database.php(3268): Wikimedia\Rdbms\Database->endAtomic(string)

The loop in question appears to start after this:

#2031 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(336): JobQueueDB->doBatchPush(array, integer)
#2032 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueue.php(306): JobQueue->batchPush(array, integer)
#2033 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobQueueGroup.php(160): JobQueue->push(array)
#2034 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(317): JobQueueGroup->push(array)
#2035 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(299): DeferredUpdates::enqueueUpdates(array)
#2036 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(97): DeferredUpdates::tryOpportunisticExecute(string)
#2037 /srv/www/mediawiki/mediawiki-new/includes/deferred/DeferredUpdates.php(114): DeferredUpdates::addUpdate(MWCallableUpdate, integer)
#2038 /srv/www/mediawiki/mediawiki-new/includes/logging/LogEntry.php(788): DeferredUpdates::addCallableUpdate(Closure, integer, Wikimedia\Rdbms\DatabaseMysqli)
#2039 /srv/www/mediawiki/mediawiki-new/includes/MovePage.php(615): ManualLogEntry->publish(integer)
#2040 /srv/www/mediawiki/mediawiki-new/includes/MovePage.php(271): MovePage->moveToInternal(User, Title, string, boolean, array)
#2041 /srv/www/mediawiki/mediawiki-new/extensions/Translate/tag/TranslatablePageMoveJob.php(97): MovePage->move(User, string, boolean)
#2042 /srv/www/mediawiki/mediawiki-new/extensions/Translate/tag/TranslatablePageMoveJob.php(54): TranslatablePageMoveJob->doMoves()
#2043 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobRunner.php(296): TranslatablePageMoveJob->run()
#2044 /srv/www/mediawiki/mediawiki-new/includes/jobqueue/JobRunner.php(193): JobRunner->executeJob(TranslatablePageMoveJob, Wikimedia\Rdbms\LBFactorySimple, BufferingStatsdDataFactory, integer)
#2045 /srv/www/mediawiki/mediawiki-new/maintenance/runJobs.php(89): JobRunner->run(array)
#2046 /srv/www/mediawiki/mediawiki-new/maintenance/doMaintenance.php(94): RunJobs->execute()
#2047 /srv/www/mediawiki/mediawiki-new/maintenance/runJobs.php(122): require_once(string)
#2048 {main}

We are tracking this bug in the following phabricator task https://phabricator.kde.org/T11917

ProductVersion
MediaWiki1.31.3 (c2d388d) 14:05, 10 January 2016
PHP7.2.24-0ubuntu0.18.04.1 (fpm-fcgi)
MySQL5.7.27-0ubuntu0.18.04.1
ICU60.2
Translate2019-04-24 (0e35cb0) 18:14, 24 October 2019

Event Timeline

Carl created this task.Nov 2 2019, 8:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 2 2019, 8:03 PM
Carl updated the task description. (Show Details)Nov 2 2019, 8:03 PM
Nikerabbit updated the task description. (Show Details)Nov 3 2019, 10:04 AM
Nikerabbit added a subscriber: Nikerabbit.

0e35cb0551daaf5ee4ee1a015d0617d16ca8da75 is unknown hash for Translate. Do you have local modifications? I don't it matters though, as I believe this is an issue with MediaWiki core.

Carl added a comment.Nov 3 2019, 9:02 PM

Yes we have a local modification closely related to T213426. But this shouldn't affect the backend.