Page MenuHomePhabricator

Unit tests trigger "Wikimedia\Rdbms\Database::commit: no transaction to commit, something got out of sync"
Closed, ResolvedPublic

Description

There is one entry logged to dberror.log during a CI run over MediaWiki core. This is blocking re-enablement of the assertion that CI does not produce DB errors, to avoid regressing again. (See parent task.)

https://integration.wikimedia.org/ci/job/mediawiki-quibble-vendor-mysql-php72-docker/25500/artifact/log/mw-dberror.log/*view*/

Thu Jun 25 16:20:55 UTC 2020	ccd9c66a2b83	wikidb-unittest

Wikimedia\Rdbms\Database::commit: no transaction to commit, something got out of sync

Event Timeline

eprodromou triaged this task as Medium priority.

@aaron suggested this might be a good ticket to collaborate with CPT team on. @BPirkle would you mind doing this?

Change 613372 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] rdbms: improve Database::commit() "out of sync" logging

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

With the above patch, we now have a trace to help determine the cause of the issue:

Fri Jul 17 1:06:55 UTC 2020	f460f71de106	wikidb-unittest_	Wikimedia\Rdbms\Database::commit: no transaction to commit, something got out of sync

#0 /workspace/src/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->commit()
#1 /workspace/src/includes/libs/rdbms/database/DBConnRef.php(649): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#2 /workspace/src/tests/phpunit/includes/filerepo/LocalRepoTest.php(244): Wikimedia\Rdbms\DBConnRef->commit()
#3 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestCase.php(1415): LocalRepoTest->testInvalidateImageRedirect()
#4 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestCase.php(1035): PHPUnit\Framework\TestCase->runTest()
#5 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestResult.php(691): PHPUnit\Framework\TestCase->runBare()
#6 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestCase.php(763): PHPUnit\Framework\TestResult->run(LocalRepoTest)
#7 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php(446): PHPUnit\Framework\TestCase->run(PHPUnit\Framework\TestResult)
#8 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(597): MediaWikiIntegrationTestCase->run(PHPUnit\Framework\TestResult)
#9 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(597): PHPUnit\Framework\TestSuite->run(PHPUnit\Framework\TestResult)
#10 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(597): PHPUnit\Framework\TestSuite->run(PHPUnit\Framework\TestResult)
#11 /workspace/src/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(627): PHPUnit\Framework\TestSuite->run(PHPUnit\Framework\TestResult)
#12 /workspace/src/vendor/phpunit/phpunit/src/TextUI/Command.php(204): PHPUnit\TextUI\TestRunner->doRun(PHPUnit\Framework\TestSuite, array, array, boolean)
#13 /workspace/src/tests/phpunit/phpunit.php(75): PHPUnit\TextUI\Command->run(array, boolean)
#14 /workspace/src/maintenance/doMaintenance.php(107): PHPUnitMaintClass->execute()
#15 /workspace/src/tests/phpunit/phpunit.php(134): require(string)
#16 {main}

Change 613372 merged by jenkins-bot:
[mediawiki/core@master] rdbms: improve Database::commit() "out of sync" logging

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

Change 615587 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] Cleanup up excess commit() call in LocalRepoTest

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

Change 615587 merged by jenkins-bot:
[mediawiki/core@master] Cleanup up excess commit() call in LocalRepoTest

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

Change 616943 had a related patch set uploaded (by Krinkle; owner: Aaron Schulz):
[mediawiki/core@REL1_35] Cleanup up excess commit() call in LocalRepoTest

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

Change 616943 merged by jenkins-bot:
[mediawiki/core@REL1_35] Cleanup up excess commit() call in LocalRepoTest

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

Change 617226 had a related patch set uploaded (by Krinkle; owner: Aaron Schulz):
[mediawiki/core@REL1_34] Cleanup up excess commit() call in LocalRepoTest

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

Change 617226 merged by Krinkle:
[mediawiki/core@REL1_34] Cleanup up excess commit() call in LocalRepoTest

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