Page MenuHomePhabricator

Commons removal of last remaining caption: Caught exception of type Wikimedia\Rdbms\DBUnexpectedError
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps to replicate the issue (include links if applicable):

Affected page: https://commons.wikimedia.org/wiki/File:Pronunciation_Cristiano_Ronaldo.wav

  • IP adds caption "suuuuuuuuuuuu" in es-formal
  • I click the revert button and get the error message "Caught exception of type Wikimedia\Rdbms\DBUnexpectedError"
  • I try to use undo instead with the same error message
  • I try to remove the text manually with the same error message
  • I try to change the caption text in es-formal and is works
  • I try to remove the changed caption using revert, undo and manual removal and is fails again
  • I add a caption in en
  • I try to remove the es-formal caption again and it works
  • I try to remove the en caption and get the same error message
  • I add caption in de and remove the en caption
  • I try to remove the de caption and get the same error message

What happens?:

Removal of the last remaining caption on the page https://commons.wikimedia.org/wiki/File:Pronunciation_Cristiano_Ronaldo.wav is not possible. I could not replicate the error on other pages.

What should have happened instead?:

Removal the last remaining caption on a page should always work.

Event Timeline

Hi @GPSLeo, thanks for taking the time to report this! Please provide the full and complete error message.

Before the "Caught exception of type Wikimedia\Rdbms\DBUnexpectedError" message there is only some kind of hash number. But when I tried to get these number again I got no error message and the edit succeeded.

Again: Please do post the full and complete error message, including the hash number. It exists for a reason. :)

I got the error again and again at the file page of an audio file but this time on a Wikitext edit.
https://commons.wikimedia.org/wiki/File:Javier_Milei_-_nombre_(ES-ar).ogg
When I click the revert button on the last edit I get the following error message: [f41e10bb-593c-4ddc-a499-f8af808578fa] 2023-10-08 18:41:16: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBUnexpectedError“
Same for undo: [b3f94f11-495f-400e-aec5-7db8d7f0a33d] 2023-10-08 18:42:11: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBUnexpectedError“
And also for manual removal of the added Wikitext: [2ed02a9b-1877-4323-9041-d6e93abab37b] 2023-10-08 18:42:45: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBUnexpectedError“

Error
  • mwversion: 1.41.0-wmf.29
  • reqId: f41e10bb-593c-4ddc-a499-f8af808578fa
normalized_message
[{reqId}] {exception_url}   Wikimedia\Rdbms\DBUnexpectedError: MediaWiki\TimedMediaHandler\WebVideoTranscode\WebVideoTranscode::removeTranscodes: got COMMIT while atomic sections MediaWiki\Storage\PageUpdater::doModify are still open
exception.trace
from /srv/mediawiki/php-1.41.0-wmf.29/includes/libs/rdbms/database/TransactionManager.php(447)
#0 /srv/mediawiki/php-1.41.0-wmf.29/includes/libs/rdbms/database/Database.php(2417): Wikimedia\Rdbms\TransactionManager->onCommit(Wikimedia\Rdbms\DatabaseMySQL, string, string)
#1 /srv/mediawiki/php-1.41.0-wmf.29/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->commit(string, string)
#2 /srv/mediawiki/php-1.41.0-wmf.29/includes/libs/rdbms/database/DBConnRef.php(676): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#3 /srv/mediawiki/php-1.41.0-wmf.29/extensions/TimedMediaHandler/includes/WebVideoTranscode/WebVideoTranscode.php(1040): Wikimedia\Rdbms\DBConnRef->commit(string, string)
#4 /srv/mediawiki/php-1.41.0-wmf.29/extensions/TimedMediaHandler/includes/Hooks.php(394): MediaWiki\TimedMediaHandler\WebVideoTranscode\WebVideoTranscode::removeTranscodes(LocalFile)
#5 /srv/mediawiki/php-1.41.0-wmf.29/includes/HookContainer/HookContainer.php(161): MediaWiki\TimedMediaHandler\Hooks->onRevisionFromEditComplete(WikiFilePage, MediaWiki\Revision\RevisionStoreRecord, integer, MediaWiki\User\User, array)
#6 /srv/mediawiki/php-1.41.0-wmf.29/includes/HookContainer/HookRunner.php(3287): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /srv/mediawiki/php-1.41.0-wmf.29/includes/Storage/PageUpdater.php(1386): MediaWiki\HookContainer\HookRunner->onRevisionFromEditComplete(WikiFilePage, MediaWiki\Revision\RevisionStoreRecord, integer, MediaWiki\User\User, array)
#8 /srv/mediawiki/php-1.41.0-wmf.29/includes/Storage/PageUpdater.php(922): MediaWiki\Storage\PageUpdater->doModify(MediaWiki\CommentStore\CommentStoreComment)
#9 /srv/mediawiki/php-1.41.0-wmf.29/includes/page/RollbackPage.php(359): MediaWiki\Storage\PageUpdater->saveRevision(MediaWiki\CommentStore\CommentStoreComment, integer)
#10 /srv/mediawiki/php-1.41.0-wmf.29/includes/page/RollbackPage.php(238): MediaWiki\Page\RollbackPage->rollback()
#11 /srv/mediawiki/php-1.41.0-wmf.29/includes/actions/RollbackAction.php(184): MediaWiki\Page\RollbackPage->rollbackIfAllowed()
#12 /srv/mediawiki/php-1.41.0-wmf.29/includes/actions/RollbackAction.php(132): RollbackAction->handleRollbackRequest()
#13 /srv/mediawiki/php-1.41.0-wmf.29/includes/MediaWiki.php(584): RollbackAction->show()
#14 /srv/mediawiki/php-1.41.0-wmf.29/includes/MediaWiki.php(363): MediaWiki->performAction(ImagePage, MediaWiki\Title\Title)
#15 /srv/mediawiki/php-1.41.0-wmf.29/includes/MediaWiki.php(961): MediaWiki->performRequest()
#16 /srv/mediawiki/php-1.41.0-wmf.29/includes/MediaWiki.php(614): MediaWiki->main()
#17 /srv/mediawiki/php-1.41.0-wmf.29/index.php(50): MediaWiki->run()
#18 /srv/mediawiki/php-1.41.0-wmf.29/index.php(46): wfIndexMain()
#19 /srv/mediawiki/w/index.php(3): require(string)
#20 {main}

Seems the same error as for T348417: Commons updating video: Fatal exception of type "Wikimedia\Rdbms\DBUnexpectedError" filed today, but in that task the exception was produced when reuploading a video. Also, for f41e10bb-593c-4ddc-a499-f8af808578fa I also see a RuntimeException warning.

See all three reqIds combined logs for more background (restricted access).

Could it be T312152#9229020?

MarcoAurelio changed the subtype of this task from "Bug Report" to "Production Error".Oct 8 2023, 11:18 PM
MarcoAurelio set Release Version to 1.41.0-wmf.29.

This looks to be a wider issue than only captions.

I just experienced the same error message while trying to revert an edit to the description page of an Ogg recording I uploaded to Commons.

https://commons.wikimedia.org/w/index.php?title=File:Pl-Piotr_Zieli%C5%84ski.ogg&action=history

After clicking on the 'revert 1 edit' button next to the latest IP edit, I get the below error message:

[0d8e36bc-dd6d-440b-b799-bc86371f05ee] 2023-10-09 09:56:04: Krytyczny wyjątek typu „Wikimedia\Rdbms\DBUnexpectedError”

Change 964452 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/TimedMediaHandler@master] Remove call to Database::commit

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

Change 964452 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Remove call to Database::commit

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

I just noticed that all last edits on audio files are affected by this. I tested this on https://commons.wikimedia.org/wiki/File:2019-08-17_Test_file_for_TimedMediaHandler_audio_captions.ogg with the following error codes:

[f42d464b-a5c3-4076-b5cf-a72eca82cf7c] 2023-10-09 13:39:20: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBUnexpectedError“
[2591076b-ea6c-4688-9797-32a4b7ded168] 2023-10-09 13:43:30: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBUnexpectedError“

Change 965520 had a related patch set uploaded (by Brion VIBBER; author: Brion VIBBER):

[mediawiki/extensions/TimedMediaHandler@master] Don't try to lock to serialize m3u8 file writes

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

Change 965520 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Don't try to lock to serialize m3u8 file writes

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

Change 965220 had a related patch set uploaded (by Jforrester; author: Brion VIBBER):

[mediawiki/extensions/TimedMediaHandler@wmf/1.41.0-wmf.30] Don't try to lock to serialize m3u8 file writes

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

Change 965221 had a related patch set uploaded (by Jforrester; author: Brion VIBBER):

[mediawiki/extensions/TimedMediaHandler@REL1_41] Don't try to lock to serialize m3u8 file writes

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

Change 965221 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@REL1_41] Don't try to lock to serialize m3u8 file writes

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

Change 965220 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@wmf/1.41.0-wmf.30] Don't try to lock to serialize m3u8 file writes

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

Mentioned in SAL (#wikimedia-operations) [2023-10-16T07:43:20Z] <hashar@deploy2002> Started scap: Backport for [[gerrit:965220|Don't try to lock to serialize m3u8 file writes (T348689 T348667 T348375 T348753)]]

Mentioned in SAL (#wikimedia-operations) [2023-10-16T07:57:35Z] <hashar@deploy2002> jforrester and hashar: Backport for [[gerrit:965220|Don't try to lock to serialize m3u8 file writes (T348689 T348667 T348375 T348753)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-10-16T08:10:25Z] <hashar@deploy2002> Finished scap: Backport for [[gerrit:965220|Don't try to lock to serialize m3u8 file writes (T348689 T348667 T348375 T348753)]] (duration: 27m 04s)

This should be fixed since the deployment circa 12 hours ago. Please confirm and resolve when you have a chance, thanks!

I'm closing this one as I've now managed to successfully revert the last two edits from above.