Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error when running refreshLinks.php or rebuildall.php #4323

Closed
squirrelslair opened this issue Oct 9, 2019 · 4 comments · Fixed by #4333
Closed

runtime error when running refreshLinks.php or rebuildall.php #4323

squirrelslair opened this issue Oct 9, 2019 · 4 comments · Fixed by #4333
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error store-sql
Milestone

Comments

@squirrelslair
Copy link
Contributor

squirrelslair commented Oct 9, 2019

We just updated SMW from 3.0.2 to 3.1, and MW from 1.33.0 to 1.33.1. When we now run refreshLinks.php it gets through the refreshing redirects part but part way through refreshing links table we get the following error:

RuntimeException from line 123 of ...xxxx.../extensions/SemanticMediaWiki/src/MediaWiki/Connection/TransactionHandler.php: Trying to begin a new section transaction while SMW\SQLStore\SQLStoreUpdater::doDataUpdate is still active!

refreshLinks is run as part of rebuildall.php, which we run as a nightly cron job. It did not cause any problems before this update. I did the updates on two wikis, and both now throw this exception.

Setup and configuration

  • SMW version: 3.1
  • MW version: 1.33.1
  • PHP version: 7.2.11
  • DB system (MySQL, Blazegraph, etc.) and version: MySQL 5.7.25-log

Stack trace

[ps481774]$ php refreshL*
Refreshing redirects table.
Starting from page_id 1 of 831.
100
200
300
400
500
600
700
800
Refreshing links tables.
Starting from page_id 1 of 831.
100
[56180a3aacef6f1acaf577a5] [no req]   RuntimeException from line 123 of /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Connection/TransactionHandler.php: Trying to begin a new section transaction while SMW\SQLStore\SQLStoreUpdater::doDataUpdate is still active!
Backtrace:
#0 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Connection/Database.php(677): SMW\MediaWiki\Connection\TransactionHandler->markSectionTransaction(string)
#1 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStoreUpdater.php(195): SMW\MediaWiki\Connection\Database->beginSectionTransaction(string)
#2 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(303): SMW\SQLStore\SQLStoreUpdater->doDataUpdate(SMW\SemanticData)
#3 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/Store.php(238): SMW\SQLStore\SQLStore->doDataUpdate(SMW\SemanticData)
#4 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(403): SMW\Store->updateData(SMW\SemanticData)
#5 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(289): SMW\DataUpdater->updateData()
#6 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(193): SMW\DataUpdater->runUpdate()
#7 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/ParserData.php(453): SMW\DataUpdater->doUpdate()
#8 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(296): SMW\ParserData->updateStore()
#9 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(216): SMW\MediaWiki\Jobs\UpdateJob->updateStore(SMW\ParserData)
#10 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#11 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#12 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/RedirectStore.php(201): SMW\MediaWiki\Jobs\UpdateJob->run()
#13 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/EntityStore/EntityIdManager.php(222): SMW\SQLStore\RedirectStore->updateRedirect(integer, string, integer)
#14 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/RedirectUpdater.php(293): SMW\SQLStore\EntityStore\EntityIdManager->updateRedirect(integer, string, integer)
#15 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStoreUpdater.php(299): SMW\SQLStore\RedirectUpdater->updateRedirects(SMW\DIWikiPage)
#16 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStoreUpdater.php(224): SMW\SQLStore\SQLStoreUpdater->doFlatDataUpdate(SMW\SemanticData)
#17 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(303): SMW\SQLStore\SQLStoreUpdater->doDataUpdate(SMW\SemanticData)
#18 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/Store.php(238): SMW\SQLStore\SQLStore->doDataUpdate(SMW\SemanticData)
#19 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/Store.php(275): SMW\Store->updateData(SMW\SemanticData)
#20 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/RedirectUpdater.php(498): SMW\Store->clearData(SMW\DIWikiPage)
#21 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/RedirectUpdater.php(160): SMW\SQLStore\RedirectUpdater->moveAsRedirect(SMW\DIWikiPage, SMW\DIWikiPage, integer, integer, array)
#22 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStoreUpdater.php(430): SMW\SQLStore\RedirectUpdater->doUpdate(SMW\DIWikiPage, SMW\DIWikiPage, array)
#23 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(321): SMW\SQLStore\SQLStoreUpdater->changeTitle(Title, Title, integer, integer)
#24 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(457): SMW\SQLStore\SQLStore->changeTitle(Title, Title, integer, integer)
#25 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(428): SMW\DataUpdater->doUpdateUnknownRedirectTarget(SMW\SemanticData, Title)
#26 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(397): SMW\DataUpdater->checkOnRequiredRedirectUpdate(SMW\SemanticData)
#27 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(289): SMW\DataUpdater->updateData()
#28 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/DataUpdater.php(193): SMW\DataUpdater->runUpdate()
#29 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/ParserData.php(453): SMW\DataUpdater->doUpdate()
#30 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Hooks/LinksUpdateConstructed.php(120): SMW\ParserData->updateStore(array)
#31 /home/...xxx.../ccmdbpriv.kuality.ca/extensions/SemanticMediaWiki/src/MediaWiki/Hooks.php(815): SMW\MediaWiki\Hooks\LinksUpdateConstructed->process(LinksUpdate)
#32 /home/...xxx.../ccmdbpriv.kuality.ca/includes/Hooks.php(174): SMW\MediaWiki\Hooks->onLinksUpdateConstructed(LinksUpdate)
#33 /home/...xxx.../ccmdbpriv.kuality.ca/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#34 /home/...xxx.../ccmdbpriv.kuality.ca/includes/deferred/LinksUpdate.php(168): Hooks::run(string, array)
#35 /home/...xxx.../ccmdbpriv.kuality.ca/includes/Storage/DerivedPageDataUpdater.php(1304): LinksUpdate->__construct(Title, ParserOutput, boolean)
#36 /home/...xxx.../ccmdbpriv.kuality.ca/includes/Storage/DerivedPageDataUpdater.php(1567): MediaWiki\Storage\DerivedPageDataUpdater->getSecondaryDataUpdates(boolean)
#37 /home/...xxx.../ccmdbpriv.kuality.ca/includes/page/WikiPage.php(2134): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array)
#38 /home/...xxx.../ccmdbpriv.kuality.ca/maintenance/refreshLinks.php(275): WikiPage->doSecondaryDataUpdates(array)
#39 /home/...xxx.../ccmdbpriv.kuality.ca/maintenance/refreshLinks.php(198): RefreshLinks::fixLinksFromArticle(integer, boolean)
#40 /home/...xxx.../ccmdbpriv.kuality.ca/maintenance/refreshLinks.php(83): RefreshLinks->doRefreshLinks(integer, boolean, string, boolean, boolean)
#41 /home/...xxx.../ccmdbpriv.kuality.ca/maintenance/doMaintenance.php(96): RefreshLinks->execute()
#42 /home/...xxx.../ccmdbpriv.kuality.ca/maintenance/refreshLinks.php(491): require_once(string)
#43 {main}

Steps to reproduce

run refreshLinks.php

@JeroenDeDauw JeroenDeDauw added bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error store-sql labels Oct 9, 2019
@octfx
Copy link
Contributor

octfx commented Oct 10, 2019

I am seeing the same error with:

  • SMW version: 3.1.0
  • MW version: 1.33.0
  • PHP version: 7.2.23
  • DB system: MariaDB 10.4.8

@mwjames
Copy link
Contributor

mwjames commented Oct 10, 2019 via email

@mwjames
Copy link
Contributor

mwjames commented Oct 16, 2019 via email

@kghbln kghbln added this to the SMW 3.1.1 milestone Nov 4, 2019
@kghbln
Copy link
Member

kghbln commented Nov 5, 2019

If you do not want to wait for the release of SMW 3.1.1 you can update to the latest revision of the legacy branch 3.1 [0] by specifying "3.1.x@dev" instead of "3.1.0" in your "composer.local.json" file.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/INSTALL.md#installation-of-development-versions-and-release-candidates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error store-sql
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants