Page MenuHomePhabricator

[LEX] [TECH] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7
Open, LowPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.7/extensions/WikibaseLexeme/src/Domain/Model/Lexeme.php(327)
#0 /srv/mediawiki/php-1.37.0-wmf.7/extensions/WikibaseLexeme/src/Domain/Diff/LexemePatcher.php(203): Wikibase\Lexeme\Domain\Model\Lexeme->getSense(Wikibase\Lexeme\Domain\Model\SenseId)
#1 /srv/mediawiki/php-1.37.0-wmf.7/extensions/WikibaseLexeme/src/Domain/Diff/LexemePatcher.php(95): Wikibase\Lexeme\Domain\Diff\LexemePatcher->patchSenses(Wikibase\Lexeme\Domain\Model\Lexeme, Wikibase\Lexeme\Domain\Diff\LexemeDiff)
#2 /srv/mediawiki/php-1.37.0-wmf.7/vendor/wikibase/data-model-services/src/Diff/EntityPatcher.php(40): Wikibase\Lexeme\Domain\Diff\LexemePatcher->patchEntity(Wikibase\Lexeme\Domain\Model\Lexeme, Wikibase\Lexeme\Domain\Diff\LexemeDiff)
#3 /srv/mediawiki/php-1.37.0-wmf.7/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php(451): Wikibase\DataModel\Services\Diff\EntityPatcher->patchEntity(Wikibase\Lexeme\Domain\Model\Lexeme, Wikibase\Lexeme\Domain\Diff\LexemeDiff)
#4 /srv/mediawiki/php-1.37.0-wmf.7/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php(702): Wikibase\Repo\EditEntity\MediawikiEditEntity->fixEditConflict(Wikibase\Lexeme\Domain\Model\Lexeme)
#5 /srv/mediawiki/php-1.37.0-wmf.7/extensions/Wikibase/repo/includes/EditEntity/StatsdSaveTimeRecordingEditEntity.php(77): Wikibase\Repo\EditEntity\MediawikiEditEntity->attemptSave(Wikibase\Lexeme\Domain\Model\Lexeme, string, integer, boolean, boolean, array)
#6 /srv/mediawiki/php-1.37.0-wmf.7/extensions/WikibaseLexeme/src/MediaWiki/Api/RemoveSense.php(182): Wikibase\Repo\EditEntity\StatsdSaveTimeRecordingEditEntity->attemptSave(Wikibase\Lexeme\Domain\Model\Lexeme, string, integer, boolean)
#7 /srv/mediawiki/php-1.37.0-wmf.7/includes/api/ApiMain.php(1669): Wikibase\Lexeme\MediaWiki\Api\RemoveSense->execute()
#8 /srv/mediawiki/php-1.37.0-wmf.7/includes/api/ApiMain.php(639): ApiMain->executeAction()
#9 /srv/mediawiki/php-1.37.0-wmf.7/includes/api/ApiMain.php(610): ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-1.37.0-wmf.7/api.php(90): ApiMain->execute()
#11 /srv/mediawiki/php-1.37.0-wmf.7/api.php(45): wfApiMain()
#12 /srv/mediawiki/w/api.php(3): require(string)
#13 {main}
Impact
  • as far as I can see this seems to be pretty rare, only a single spike in the last 30 days (the image below shows the last 3 days) appears to be somewhat more common as the exception messages are not normalized by Lexeme/Sense, but still not huge numbers
    • As I read it from the stacktrace this occurred when an edit conflict happened while trying to delete a sense?
      • probably edit conflict + deleting a sense is just rare

image.png (115×1 px, 10 KB)

Notes
  • Does it occur with forms as well? If not, how do Forms deal with "a form being deleted + edit conflict"?
  • Maybe this can be resolved by adding a missing check for edit conflicts?

Event Timeline

Prio Notes

  • Affects end users / production
  • Does not affect monitoring
  • Does not affect development efforts
  • Does not affect onboarding efforts
  • Does not affect additional stakeholders
ItamarWMDE renamed this task from OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7 to [SW][LEX] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7.Aug 29 2023, 1:24 PM
ItamarWMDE renamed this task from [SW][LEX] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7 to [SW][TECH][LEX] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7.
ItamarWMDE moved this task from WikibaseLexeme to [DOT] Prioritized on the wmde-wikidata-tech board.
ItamarWMDE added a project: Wikidata Dev Team.

Async story writing notes:

The main thing I would add here is to also check for this issue with Forms. Do they have it as well? If not, how do Forms deal with "a form being deleted + edit conflict"?
Maybe this can be resolved by adding a missing check for edit conflicts?

ItamarWMDE renamed this task from [SW][TECH][LEX] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7 to [TECH][LEX] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7.Sep 18 2023, 3:37 PM
ItamarWMDE renamed this task from [TECH][LEX] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7 to [LEX] [TECH] OutOfRangeException: Lexeme L493003 doesn't have sense L493003-S7.Sep 20 2023, 2:52 PM

I think we can leave this task in the task breakdown column for a bit and focus the investigation on T326768, where we had already added some debug logging.

Change 993671 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Log more information on LexemePatcher errors

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

Change 993671 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Log more information on LexemePatcher errors

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

Change 993503 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@wmf/1.42.0-wmf.15] Log more information on LexemePatcher errors

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

Change 993503 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/WikibaseLexeme@wmf/1.42.0-wmf.15] Log more information on LexemePatcher errors

Reason:

not needed anymore I think, this can just roll out with the train

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