Page MenuHomeMiraheze

Template:Doing on template.miraheze.org is corrupt and giving errors when viewed
Closed, ResolvedPublic

Description

Going to https://template.miraheze.org/wiki/Template:Doing, or any page on template.miraheze.org that transcludes that template, is producing an error:

[75ada9d23c22fd3a592e4e66] 2021-12-23 03:56:39: Fatal exception of type "Error"

Event Timeline

Void subscribed.

Stack trace:

Call to undefined method HistoryBlobStub::uncompress()
from /srv/mediawiki/w/includes/historyblob/HistoryBlobStub.php(137)
#0 /srv/mediawiki/w/includes/Storage/SqlBlobStore.php(602): HistoryBlobStub->getText()
#1 /srv/mediawiki/w/includes/Storage/SqlBlobStore.php(517): MediaWiki\Storage\SqlBlobStore->decompressData(string, array)
#2 /srv/mediawiki/w/includes/Storage/SqlBlobStore.php(426): MediaWiki\Storage\SqlBlobStore->expandBlob(string, array, string)
#3 /srv/mediawiki/w/includes/Storage/SqlBlobStore.php(281): MediaWiki\Storage\SqlBlobStore->fetchBlobs(array, integer)
#4 /srv/mediawiki/w/includes/libs/objectcache/wancache/WANObjectCache.php(1700): MediaWiki\Storage\SqlBlobStore->MediaWiki\Storage\{closure}(boolean, integer, array, NULL, array)
#5 /srv/mediawiki/w/includes/libs/objectcache/wancache/WANObjectCache.php(1532): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
#6 /srv/mediawiki/w/includes/Storage/SqlBlobStore.php(286): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#7 /srv/mediawiki/w/includes/Revision/RevisionStore.php(1182): MediaWiki\Storage\SqlBlobStore->getBlob(string, integer)
#8 /srv/mediawiki/w/includes/Revision/RevisionStore.php(1456): MediaWiki\Revision\RevisionStore->loadSlotContent(MediaWiki\Revision\SlotRecord, NULL, NULL, NULL, integer)
#9 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}(MediaWiki\Revision\SlotRecord)
#10 /srv/mediawiki/w/includes/Revision/SlotRecord.php(322): call_user_func(Closure, MediaWiki\Revision\SlotRecord)
#11 /srv/mediawiki/w/includes/Revision/RevisionRecord.php(164): MediaWiki\Revision\SlotRecord->getContent()
#12 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(227): MediaWiki\Revision\RevisionRecord->getContent(string, integer, NULL)
#13 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#14 /srv/mediawiki/w/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#15 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#16 /srv/mediawiki/w/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#17 /srv/mediawiki/w/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#18 /srv/mediawiki/w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#19 /srv/mediawiki/w/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()
#20 /srv/mediawiki/w/includes/page/Article.php(691): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#21 /srv/mediawiki/w/includes/page/Article.php(506): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)
#22 /srv/mediawiki/w/includes/actions/ViewAction.php(80): Article->view()
#23 /srv/mediawiki/w/includes/MediaWiki.php(543): ViewAction->show()
#24 /srv/mediawiki/w/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#25 /srv/mediawiki/w/includes/MediaWiki.php(930): MediaWiki->performRequest()
#26 /srv/mediawiki/w/includes/MediaWiki.php(564): MediaWiki->main()
#27 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#28 /srv/mediawiki/w/index.php(46): wfIndexMain()
#29 {main}
Reception123 triaged this task as Normal priority.Dec 23 2021, 06:52
Unknown Object (User) added a comment.Dec 28 2021, 00:28

This will need to be reimported. It was somehow missed when I ran checkStorage last time for this issue on multiple wikis, since its just the one template, which has no local changes since last import from Meta, it can probably just be reimported manually to fix it.

Unknown Object (User) added a comment.Dec 28 2021, 00:30

Well that didn't work, Special:Import also errors. Could try deleting and then importing though.

Deleting also errors. Also note that at one point I deleted and then selectively undeleted the page, which may have confused checkStorage.

Interesting, given the issue involves transclusion, I wonder if this is possibly related to T8527, which I just reported?

The first revision to cause the error is 61918. This is also an integer less than the previous revision, 63248. Any chance error could be from a newer revision with an id smaller than previous?

Additionally, most recent rev is in sequence with the last working rev. Most recent being 63249.

Revs 61908 thru 61923 have same error.

Unknown Object (User) added a comment.Dec 28 2021, 03:04

We know what caused the error. I had to mass fix it on multiple wikis, T8184. Someone may need to delete it server side, and re-import it or run checkStorage.php --fix with a xml backup of templatewiki, which will restore all broken revisions back to how they were previously, before becoming corrupt.

Unknown Object (User) added a comment.EditedJan 4 2022, 06:44

I have begun uploading old wikibackups to mwtask1 again so that we may use them to fix the issue with checkStorage.php like last time. This will likely take more than 24 hours to upload.

Unknown Object (User) closed this task as Resolved.EditedJan 6 2022, 19:23
Unknown Object (User) claimed this task.

I have resolved the errors, however in order for my script to be successful I had to manually delete the most recent revision of Template:Doing from the database, therefore it will appear as does not exist, re-adding content to it manually will fix it's usage.

Note that making that edit was much harder than expected: trying to do it manually via the edit page produced a bogus edit conflict; so I tried to do it via the API, which didn't work. I then tried to delete the page, which also didn't work. I was eventually able to un-corrupt the page by using Special:MergeHistory to move all the edits to another page and then back again.

Unknown Object (User) added a comment.Jan 6 2022, 22:52

Note that making that edit was much harder than expected: trying to do it manually via the edit page produced a bogus edit conflict; so I tried to do it via the API, which didn't work. I then tried to delete the page, which also didn't work. I was eventually able to un-corrupt the page by using Special:MergeHistory to move all the edits to another page and then back again.

Appologies for that I did not expect it to be that hard, sorry for the issue, and inconvenience there.