Page MenuHomePhabricator

Error while file deletion: "Explicit transaction still active."
Closed, ResolvedPublicPRODUCTION ERROR

Description

Got this

[XNFSwgpAADsAAHeJRL0AAABJ] 2019-05-07 09:41:33: استثنای مخرب از نوع «Wikimedia\Rdbms\DBTransactionError»

On this page https://commons.wikimedia.org/w/index.php?title=File:Resti_volo_SU1492.jpg&action=delete

Something feels broken

Event Timeline

exception.file	       	/srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/database/Database.php:1445
exception.message	       	Explicit transaction still active. A caller may have caught an error. Open transactions: FileDeleteForm::doDelete
exception.trace
#0 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1368): Wikimedia\Rdbms\Database->assertNoOpenTransactions()
#1 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1799): Closure$Wikimedia\Rdbms\LoadBalancer::approveMasterChanges(Wikimedia\Rdbms\DatabaseMysqli)
#2 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1387): Wikimedia\Rdbms\LoadBalancer->forEachOpenMasterConnection(Closure$Wikimedia\Rdbms\LoadBalancer::approveMasterChanges;476)
#3 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/lbfactory/LBFactory.php(227): Wikimedia\Rdbms\LoadBalancer->approveMasterChanges(array)
#4 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/lbfactory/LBFactoryMulti.php(401): Closure$Wikimedia\Rdbms\LBFactory::forEachLBCallMethod(Wikimedia\Rdbms\LoadBalancer, string, array)
#5 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/lbfactory/LBFactory.php(230): Wikimedia\Rdbms\LBFactoryMulti->forEachLB(Closure$Wikimedia\Rdbms\LBFactory::forEachLBCallMethod;193, array)
#6 /srv/mediawiki/php-1.34.0-wmf.3/includes/libs/rdbms/lbfactory/LBFactory.php(278): Wikimedia\Rdbms\LBFactory->forEachLBCallMethod(string, array)
#7 /srv/mediawiki/php-1.34.0-wmf.3/includes/MediaWiki.php(596): Wikimedia\Rdbms\LBFactory->commitMasterChanges(string, array)
#8 /srv/mediawiki/php-1.34.0-wmf.3/includes/MediaWiki.php(566): MediaWiki::preOutputCommit(RequestContext, NULL)
#9 /srv/mediawiki/php-1.34.0-wmf.3/includes/MediaWiki.php(520): MediaWiki->doPreOutputCommit()
#10 /srv/mediawiki/php-1.34.0-wmf.3/index.php(42): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): include(string)
#12 {main}
exception_id	       	XNFSwgpAADsAAHeJRL0AAABJ
exception_url	       	/w/index.php?title=File:Resti_volo_SU1492.jpg&action=delete
Aklapper renamed this task from Error while file deletion to Error while file deletion: "Explicit transaction still active.".May 7 2019, 10:39 AM

Still seen.

  • Request ID: XOgfrwpAMFAAAEwTO40AAACF
  • Request URL: /w/index.php?title=Special:Nuke&action=delete
DBTransactionError: Explicit transaction still active. A caller may have caught an error. Open transactions: FileDeleteForm::doDelete

#0 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1368): Wikimedia\Rdbms\Database->assertNoOpenTransactions()
#1 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1799): Wikimedia\Rdbms\LoadBalancer->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\DatabaseMysqli)
#2 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1387): Wikimedia\Rdbms\LoadBalancer->forEachOpenMasterConnection(Closure)
#3 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/lbfactory/LBFactory.php(227): Wikimedia\Rdbms\LoadBalancer->approveMasterChanges(array)
#4 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/lbfactory/LBFactoryMulti.php(401): Wikimedia\Rdbms\LBFactory->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\LoadBalancer, string, array)
#5 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/lbfactory/LBFactory.php(229): Wikimedia\Rdbms\LBFactoryMulti->forEachLB(Closure, array)
#6 /srv/mediawiki/php-1.34.0-wmf.6/includes/libs/rdbms/lbfactory/LBFactory.php(278): Wikimedia\Rdbms\LBFactory->forEachLBCallMethod(string, array)
#7 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(595): Wikimedia\Rdbms\LBFactory->commitMasterChanges(string, array)
#8 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(566): MediaWiki::preOutputCommit(RequestContext, NULL)
#9 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(520): MediaWiki->doPreOutputCommit()
#10 /srv/mediawiki/php-1.34.0-wmf.6/index.php(42): MediaWiki->run()
Krinkle added a project: Growth-Team.

Tentatively triaging as high priority because transaction matching is almost always a deterministic issue, not a race condition. Which suggests that this might be making it impossible for some files and/or some user's files to be deleted.

In particular, given Nuke is affected, this would make abuse control harder as when this one file fails, presumably the entire transaction is invalidated and thus none of them are deleted.

(This is speculation based on the data I see in Logstash.)

I see the following from file page deletions as well, which appears from the post-send destructor phase.

PHP Warning: Destructor threw an object exception: exception 'Wikimedia\Rdbms\DBTransactionError' with message 'Wikimedia\Rdbms\LBFactory::shutdown: transaction round 'AutoCommitUpdate::doUpdate' still running.' in /srv/mediawiki/php-1.34.0-wmf.11/includes/libs/rdbms/lbfactory/LBFactory.php:268
Stack trace:
#0 /srv/mediawiki/php-1.34.0-wmf.11/includes/libs/rdbms/lbfactory/LBFactory.php(190): Wikimedia\Rdbms\LBFactory->commitMasterChanges()
#1 /srv/mediawiki/php-1.34.0-wmf.11/includes/libs/rdbms/lbfactory/LBFactory.php(163): Wikimedia\Rdbms\LBFactory->shutdown()
#2 /srv/mediawiki/php-1.34.0-wmf.11/includes/libs/rdbms/lbfactory/LBFactory.php(748): Wikimedia\Rdbms\LBFactory->destroy()
#3 (): Wikimedia\Rdbms\LBFactory->__destruct()
#4 {main}
kostajh added a subscriber: kostajh.

We can revisit this in Q2; if someone wants to investigate and propose a patch before then we (Growth-Team) can make some time to review.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM
aaron claimed this task.
aaron added a subscriber: aaron.

Not seeing this in the logs anymore.