Page MenuHomePhabricator

MediaWiki\SpecialPage\SpecialPageFactory::executePath violates writes <= 0 expectation
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
Expectation (writes <=) 0 by MediaWiki\SpecialPage\SpecialPageFactory::executePath not met (actual: {actual}):
{query}
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/TransactionProfiler.php(444)
#0 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/TransactionProfiler.php(280): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated(string, Wikimedia\Rdbms\GeneralizedSql, integer)
#1 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/Database.php(1471): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion(Wikimedia\Rdbms\GeneralizedSql, double, boolean, integer)
#2 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/Database.php(1353): Wikimedia\Rdbms\Database->executeQueryAttempt(string, string, boolean, string, integer)
#3 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/Database.php(1278): Wikimedia\Rdbms\Database->executeQuery(string, string, integer)
#4 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/Database.php(2405): Wikimedia\Rdbms\Database->query(string, string, integer)
#5 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/Database.php(2385): Wikimedia\Rdbms\Database->doInsert(string, array, string)
#6 /srv/mediawiki/php-1.37.0-wmf.7/includes/Revision/RevisionStore.php(967): Wikimedia\Rdbms\Database->insert(string, array, string)
#7 /srv/mediawiki/php-1.37.0-wmf.7/includes/Revision/RevisionStore.php(716): MediaWiki\Revision\RevisionStore->insertContentRowOn(MediaWiki\Revision\SlotRecord, Wikimedia\Rdbms\DatabaseMysqli, string)
#8 /srv/mediawiki/php-1.37.0-wmf.7/includes/Revision/RevisionStore.php(672): MediaWiki\Revision\RevisionStore->insertSlotOn(Wikimedia\Rdbms\DatabaseMysqli, integer, MediaWiki\Revision\SlotRecord, Title, array)
#9 /srv/mediawiki/php-1.37.0-wmf.7/includes/Revision/RevisionStore.php(490): MediaWiki\Revision\RevisionStore->insertRevisionInternal(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseMysqli, User, CommentStoreComment, Title, integer, integer)
#10 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/Database.php(4654): MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)
#11 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#12 /srv/mediawiki/php-1.37.0-wmf.7/includes/libs/rdbms/database/DBConnRef.php(649): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#13 /srv/mediawiki/php-1.37.0-wmf.7/includes/Revision/RevisionStore.php(492): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#14 /srv/mediawiki/php-1.37.0-wmf.7/includes/Storage/PageUpdater.php(1374): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#15 /srv/mediawiki/php-1.37.0-wmf.7/includes/Storage/PageUpdater.php(817): MediaWiki\Storage\PageUpdater->doCreate(CommentStoreComment, User, integer)
#16 /srv/mediawiki/php-1.37.0-wmf.7/extensions/GrowthExperiments/includes/Config/WikiPageConfigWriter.php(180): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#17 /srv/mediawiki/php-1.37.0-wmf.7/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(698): GrowthExperiments\Config\WikiPageConfigWriter->save(string)
#18 /srv/mediawiki/php-1.37.0-wmf.7/includes/htmlform/HTMLForm.php(717): GrowthExperiments\Specials\SpecialEditGrowthConfig->onSubmit(array, OOUIHTMLForm)
#19 /srv/mediawiki/php-1.37.0-wmf.7/includes/htmlform/HTMLForm.php(607): HTMLForm->trySubmit()
#20 /srv/mediawiki/php-1.37.0-wmf.7/includes/htmlform/HTMLForm.php(623): HTMLForm->tryAuthorizedSubmit()
#21 /srv/mediawiki/php-1.37.0-wmf.7/includes/specialpage/FormSpecialPage.php(187): HTMLForm->show()
#22 /srv/mediawiki/php-1.37.0-wmf.7/includes/specialpage/SpecialPage.php(646): FormSpecialPage->execute(NULL)
#23 /srv/mediawiki/php-1.37.0-wmf.7/includes/specialpage/SpecialPageFactory.php(1390): SpecialPage->run(NULL)
#24 /srv/mediawiki/php-1.37.0-wmf.7/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#25 /srv/mediawiki/php-1.37.0-wmf.7/includes/MediaWiki.php(917): MediaWiki->performRequest()
#26 /srv/mediawiki/php-1.37.0-wmf.7/includes/MediaWiki.php(551): MediaWiki->main()
#27 /srv/mediawiki/php-1.37.0-wmf.7/index.php(53): MediaWiki->run()
#28 /srv/mediawiki/php-1.37.0-wmf.7/index.php(46): wfIndexMain()
#29 /srv/mediawiki/w/index.php(3): require(string)
#30 {main}
Impact

Minor DB performance issue. Happens when the on-wiki configuration is edited (ie. not much).

Notes

This happens when Special:EditGrowthConfig writes the changes, which can't possibly be a GET request. So the real issue is why that expectation exists in the first place.

Details

Request URL
https://cs.wikipedia.org/wiki/Speci%C3%A1ln%C3%AD:Editovat_konfiguraci_Growth_funkc%C3%AD

Event Timeline

Tgr triaged this task as Low priority.May 28 2021, 10:55 AM
Tgr created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The constructor of SpecialPages should not include business logic like happen with calls to SpecialEditGrowthConfig::setConfigPage. Possible needs to move to a execute function.

Change 697078 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/GrowthExperiments@master] Move business logic of SpecialEditGrowthConfig into execute function

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

Change 697080 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/GrowthExperiments@master] Return true from SpecialPage::doesWrites for SpecialEditGrowthConfig

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

Change 697080 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Return true from SpecialPage::doesWrites for SpecialEditGrowthConfig

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