Page MenuHomePhabricator

PHP notices: Explicit commit of implicit transaction and Transaction already in progress
Closed, ResolvedPublic

Description

Observed on translatewiki.net. Steps to reproduce unknown.

[01-Jan-2013 09:16:51 UTC] PHP Notice: LocalFile:🔒 Transaction already in progress (from WikiPage::doDeleteArticleReal), performing implicit commit! [Called from DatabaseBase::begin in /www/translatewiki.net/w/includes/db/Database.php at line 3002] in /www/translatewiki.net/w/includes/debug/Debug.php on line 283
[01-Jan-2013 09:16:51 UTC] PHP Notice: FileDeleteForm::doDelete: Explicit commit of implicit transaction. Something may be out of sync! [Called from DatabaseBase::commit in /www/translatewiki.net/w/includes/db/Database.php at line 3051] in /www/translatewiki.net/w/includes/debug/Debug.php on line 283


Version: 1.21.x
Severity: normal

Details

Reference
bz43575

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:16 AM
bzimport added a project: Wikimedia-Rdbms.
bzimport set Reference to bz43575.
bzimport added a subscriber: Unknown Object (MLST).

Bug reports with very similar messages: Bug 43575, bug 41462, bug 40877 (which is fixed by https://gerrit.wikimedia.org/r/#/c/27274/ ).

There are many different variations of this database problem, unlikely to be related to uploads only.

It would be trivial to find the issue if translatewiki could install xdebug, so we would have stack traces...

Do we really need xdebug to get stack traces? Can't we use wfGetBacktrace() or something like that if we needed one?

Also these notices are fairly easy to reproduce. I get one every time I do action=purge without exception

I stil get this (with or without Wikibase) when running deleteBatch.php (even if my batch is just a single page):

PHP Notice: WikiPage::doDeleteArticleReal: Transaction already in progress (from DeleteBatch::execute), performing implicit commit! [Called from DatabaseBase::begin in /var/www/common/wikibase-repo/includes/db/Database.php at line 3155] in /var/www/common/wikibase-repo/includes/debug/Debug.php on line 296
PHP Stack trace:
PHP 1. {main}() /var/www/common/wikibase-repo/maintenance/deleteBatch.php:0
PHP 2. require_once() /var/www/common/wikibase-repo/maintenance/deleteBatch.php:124
PHP 3. DeleteBatch->execute() /var/www/common/wikibase-repo/maintenance/doMaintenance.php:114
PHP 4. WikiPage->doDeleteArticle() /var/www/common/wikibase-repo/maintenance/deleteBatch.php:107
PHP 5. WikiPage->doDeleteArticleReal() /var/www/common/wikibase-repo/includes/WikiPage.php:2506
PHP 6. DatabaseBase->begin() /var/www/common/wikibase-repo/includes/WikiPage.php:2575
PHP 7. wfWarn() /var/www/common/wikibase-repo/includes/db/Database.php:3155
PHP 8. MWDebug::warning() /var/www/common/wikibase-repo/includes/GlobalFunctions.php:1071
PHP 9. MWDebug::sendWarning() /var/www/common/wikibase-repo/includes/debug/Debug.php:158
PHP 10. trigger_error() /var/www/common/wikibase-repo/includes/debug/Debug.php:296

Can also reliably replicate with importing:

PHP Notice: LCStoreDB::finishWrite: Transaction already in progress (from DatabaseBase::deadlockLoop), performing implicit commit! [Called from DatabaseBase::begin in /vagrant/mediawiki/includes/db/Database.php at line 3458] in /vagrant/mediawiki/includes/debug/MWDebug.php on line 302
PHP Stack trace:
PHP 1. {main}() /var/www/w/MWScript.php:0
PHP 2. require_once() /var/www/w/MWScript.php:89
PHP 3. require_once() /vagrant/mediawiki/maintenance/importDump.php:304
PHP 4. BackupReader->execute() /vagrant/mediawiki/maintenance/doMaintenance.php:98
PHP 5. BackupReader->importFromFile() /vagrant/mediawiki/maintenance/importDump.php:102
PHP 6. BackupReader->importFromHandle() /vagrant/mediawiki/maintenance/importDump.php:257
PHP 7. WikiImporter->doImport() /vagrant/mediawiki/maintenance/importDump.php:299
PHP 8. WikiImporter->handlePage() /vagrant/mediawiki/includes/Import.php:466
PHP 9. WikiImporter->handleRevision() /vagrant/mediawiki/includes/Import.php:613
PHP 10. WikiImporter->processRevision() /vagrant/mediawiki/includes/Import.php:662
PHP 11. WikiImporter->revisionCallback() /vagrant/mediawiki/includes/Import.php:715
PHP 12. call_user_func_array() /vagrant/mediawiki/includes/Import.php:376
PHP 13. BackupReader->handleRevision() /vagrant/mediawiki/includes/Import.php:376
PHP 14. call_user_func() /vagrant/mediawiki/maintenance/importDump.php:173
PHP 15. WikiImporter->importRevision() /vagrant/mediawiki/maintenance/importDump.php:173
PHP 16. DatabaseBase->deadlockLoop() /vagrant/mediawiki/includes/Import.php:280
PHP 17. call_user_func_array() /vagrant/mediawiki/includes/db/Database.php:3204
PHP 18. WikiRevision->importOldRevision() /vagrant/mediawiki/includes/db/Database.php:3204
PHP 19. WikiPage->doEditUpdates() /vagrant/mediawiki/includes/Import.php:1491
PHP 20. WikiPage->prepareContentForEdit() /vagrant/mediawiki/includes/page/WikiPage.php:2189
PHP 21. AbstractContent->getParserOutput() /vagrant/mediawiki/includes/page/WikiPage.php:2145
PHP 22. WikitextContent->fillParserOutput() /vagrant/mediawiki/includes/content/AbstractContent.php:486
PHP 23. Parser->parse() /vagrant/mediawiki/includes/content/WikitextContent.php:327
PHP 24. Parser->internalParse() /vagrant/mediawiki/includes/parser/Parser.php:405
PHP 25. Parser->replaceInternalLinks() /vagrant/mediawiki/includes/parser/Parser.php:1262
PHP 26. Parser->replaceInternalLinks2() /vagrant/mediawiki/includes/parser/Parser.php:1866
PHP 27. Parser->makeImage() /vagrant/mediawiki/includes/parser/Parser.php:2139
PHP 28. Linker::makeImageLink() /vagrant/mediawiki/includes/parser/Parser.php:5632
PHP 29. Linker::makeThumbLink2() /vagrant/mediawiki/includes/Linker.php:648
PHP 30. TimedMediaTransformOutput->toHtml() /vagrant/mediawiki/includes/Linker.php:874
PHP 31. TimedMediaTransformOutput->getHtmlMediaTagOutput() /vagrant/mediawiki/extensions/TimedMediaHandler/TimedMediaTransformOutput.php:134
PHP 32. TextHandler->getTracks() /vagrant/mediawiki/extensions/TimedMediaHandler/TimedMediaTransformOutput.php:321
PHP 33. TextHandler->getRemoteTextSources() /vagrant/mediawiki/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php:82
PHP 34. TextHandler->getTextTracksFromData() /vagrant/mediawiki/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php:172
PHP 35. Language::factory() /vagrant/mediawiki/extensions/TimedMediaHandler/handlers/TextHandler/TextHandler.php:259
PHP 36. Language::newFromCode() /vagrant/mediawiki/languages/Language.php:161
PHP 37. Language::getFallbacksFor() /vagrant/mediawiki/languages/Language.php:202
PHP 38. LocalisationCache->getItem() /vagrant/mediawiki/languages/Language.php:4277
PHP 39. LocalisationCache->loadItem() /vagrant/mediawiki/includes/cache/LocalisationCache.php:260
PHP 40. LocalisationCache->initLanguage() /vagrant/mediawiki/includes/cache/LocalisationCache.php:326
PHP 41. LocalisationCache->recache() /vagrant/mediawiki/includes/cache/LocalisationCache.php:452
PHP 42. LCStoreDB->finishWrite() /vagrant/mediawiki/includes/cache/LocalisationCache.php:981
PHP 43. DatabaseBase->begin() /vagrant/mediawiki/includes/cache/LocalisationCache.php:1202
PHP 44. wfWarn() /vagrant/mediawiki/includes/db/Database.php:3458
PHP 45. MWDebug::warning() /vagrant/mediawiki/includes/GlobalFunctions.php:1159
PHP 46. MWDebug::sendMessage() /vagrant/mediawiki/includes/debug/MWDebug.php:157
PHP 47. trigger_error() /vagrant/mediawiki/includes/debug/MWDebug.php:302

aaron claimed this task.

AFAIK, this are fixed in master by now.