Last modified: 2013-07-25 07:03:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43170, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41170 - Transaction warnings during update.php
Transaction warnings during update.php
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-18 13:21 UTC by Jeroen De Dauw
Modified: 2013-07-25 07:03 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jeroen De Dauw 2012-10-18 13:21:59 UTC
Freshly installed MW. Then loaded a bunch of extensions and ran update.php, resulting in these warnings:

PHP Notice:  DatabaseBase::begin: Transaction already in progress (from DatabaseUpdater::doUpdates),  performing implicit commit! [Called from DatabaseBase::begin in /home/j/www/phase3/includes/db/Database.php at line 2944] in /home/j/www/phase3/includes/debug/Debug.php on line 282
PHP Stack trace:
PHP   1. {main}() /home/j/www/phase3/maintenance/update.php:0
PHP   2. require_once() /home/j/www/phase3/maintenance/update.php:162
PHP   3. UpdateMediaWiki->execute() /home/j/www/phase3/maintenance/doMaintenance.php:110
PHP   4. DatabaseUpdater->doUpdates() /home/j/www/phase3/maintenance/update.php:126
PHP   5. DatabaseUpdater->runUpdates() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:305
PHP   6. call_user_func_array() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:339
PHP   7. Wikibase\Utils::insertDefaultSites() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:0
PHP   8. DatabaseBase->begin() /home/j/www/phase3/extensions/Wikibase/lib/includes/Utils.php:101
PHP   9. wfWarn() /home/j/www/phase3/includes/db/Database.php:2944
PHP  10. MWDebug::warning() /home/j/www/phase3/includes/GlobalFunctions.php:1103
PHP  11. MWDebug::sendWarning() /home/j/www/phase3/includes/debug/Debug.php:143
PHP  12. trigger_error() /home/j/www/phase3/includes/debug/Debug.php:282

Notice: DatabaseBase::begin: Transaction already in progress (from DatabaseUpdater::doUpdates),  performing implicit commit! [Called from DatabaseBase::begin in /home/j/www/phase3/includes/db/Database.php at line 2944] in /home/j/www/phase3/includes/debug/Debug.php on line 282

Call Stack:
    0.0003     698216   1. {main}() /home/j/www/phase3/maintenance/update.php:0
    0.0027    1300904   2. require_once('/home/j/www/phase3/maintenance/doMaintenance.php') /home/j/www/phase3/maintenance/update.php:162
    0.0583   18302528   3. UpdateMediaWiki->execute() /home/j/www/phase3/maintenance/doMaintenance.php:110
    0.0764   23372496   4. DatabaseUpdater->doUpdates() /home/j/www/phase3/maintenance/update.php:126
    0.3254   24497952   5. DatabaseUpdater->runUpdates() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:305
    0.3259   24502400   6. call_user_func_array() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:339
    0.3295   24655472   7. Wikibase\Utils::insertDefaultSites() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:0
    1.3547   28022528   8. DatabaseBase->begin() /home/j/www/phase3/extensions/Wikibase/lib/includes/Utils.php:101
    1.3547   28022928   9. wfWarn() /home/j/www/phase3/includes/db/Database.php:2944
    1.3547   28023168  10. MWDebug::warning() /home/j/www/phase3/includes/GlobalFunctions.php:1103
    1.3547   28027648  11. MWDebug::sendWarning() /home/j/www/phase3/includes/debug/Debug.php:143
    1.3547   28028072  12. trigger_error() /home/j/www/phase3/includes/debug/Debug.php:282

PHP Notice:  DatabaseUpdater::doUpdates: No transaction to commit, something got out of sync! [Called from DatabaseBase::commit in /home/j/www/phase3/includes/db/Database.php at line 2991] in /home/j/www/phase3/includes/debug/Debug.php on line 282
PHP Stack trace:
PHP   1. {main}() /home/j/www/phase3/maintenance/update.php:0
PHP   2. require_once() /home/j/www/phase3/maintenance/update.php:162
PHP   3. UpdateMediaWiki->execute() /home/j/www/phase3/maintenance/doMaintenance.php:110
PHP   4. DatabaseUpdater->doUpdates() /home/j/www/phase3/maintenance/update.php:126
PHP   5. DatabaseBase->commit() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:321
PHP   6. wfWarn() /home/j/www/phase3/includes/db/Database.php:2991
PHP   7. MWDebug::warning() /home/j/www/phase3/includes/GlobalFunctions.php:1103
PHP   8. MWDebug::sendWarning() /home/j/www/phase3/includes/debug/Debug.php:143
PHP   9. trigger_error() /home/j/www/phase3/includes/debug/Debug.php:282
Creating ep_orgs table ...done.
...have course_title field in ep_courses table.
...have course_touched field in ep_courses table.
...site_stats is populated...done.
Purging caches...done.

Notice: DatabaseUpdater::doUpdates: No transaction to commit, something got out of sync! [Called from DatabaseBase::commit in /home/j/www/phase3/includes/db/Database.php at line 2991] in /home/j/www/phase3/includes/debug/Debug.php on line 282

Call Stack:
    0.0003     698216   1. {main}() /home/j/www/phase3/maintenance/update.php:0
    0.0027    1300904   2. require_once('/home/j/www/phase3/maintenance/doMaintenance.php') /home/j/www/phase3/maintenance/update.php:162
    0.0583   18302528   3. UpdateMediaWiki->execute() /home/j/www/phase3/maintenance/doMaintenance.php:110
    0.0764   23372496   4. DatabaseUpdater->doUpdates() /home/j/www/phase3/maintenance/update.php:126
    8.2481   30486680   5. DatabaseBase->commit() /home/j/www/phase3/includes/installer/DatabaseUpdater.php:321
    8.2481   30487032   6. wfWarn() /home/j/www/phase3/includes/db/Database.php:2991
    8.2481   30487272   7. MWDebug::warning() /home/j/www/phase3/includes/GlobalFunctions.php:1103
    8.2482   30488944   8. MWDebug::sendWarning() /home/j/www/phase3/includes/debug/Debug.php:143
    8.2482   30489328   9. trigger_error() /home/j/www/phase3/includes/debug/Debug.php:282
Comment 1 Daniel Kinzler 2012-10-18 13:38:05 UTC
DatabaseUpdater::doUpdates wraps all updates in one big transaction (this was introduces by Iebb6855e, apparently to fix some issue with PG). If some DB update registered by an extension tries to open a transaction, that will cause these warnings (if you have $wgDevelopmentWarnings enabled).

Wikibase\Utils::insertDefaultSites() does do that.

There's two possible solutions:

1) remove the global spanning transaction. That seems to be prudent in the absence of support for nested transactions. But it may break whatever problem was fixed by Iebb6855e.

2) detect open transactions in Utils::insertDefaultSites(), and only open a transaction if there isn't one already. Also, I'm not sure why Utils::insertDefaultSites() needs a transaction at all. Consistency is not critical here. Is it a performance thing?
Comment 2 Daniel Kinzler 2012-10-18 13:50:41 UTC
patch submitted as I2348c28b

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links