Page MenuHomePhabricator

Deleting file via API sometimes give "internal_api_error_InvalidArgumentException: ApiUsageException::__construct requires a fatal Status" after "internal_api_error_LocalFileLockError"
Closed, ResolvedPublic

Description

This is executed by Commons User:Embedded Data Bot:

1Executing delete on [[commons:File:By Younes el ghandouri.xcf]]
2Sleeping for 0.1 seconds, 2017-06-12 15:31:46
3WARNING: API error internal_api_error_LocalFileLockError: [WT6z4gpAMDoAAC@0lZoAAADI] Exception caught: Could not acquire lock for "mwstore://local-multiwrite/local-public/c/c8/By_Younes_el_ghandouri.xcf".
4ERROR: Detected MediaWiki API exception internal_api_error_LocalFileLockError: [WT6z4gpAMDoAAC@0lZoAAADI] Exception caught: Could not acquire lock for "mwstore://local-multiwrite/local-public/c/c8/By_Younes_el_ghandouri.xcf". [servedby:mw1223]; raising
5MediaWiki exception LocalFileLockError details:
6query=
7u"{u'maxlag': ['5'], 'title': [FilePage(File:By Younes el ghandouri.xcf)], u'format': [u'json'], 'reason': [u'This file contains [[COM:CSD#F9', u'embedded data]]: After 452.6KiB (463489 bytes, via Ending,Magic): Identified type: application/x-rar (RAR archive data, v4, os: Win32)'], u'assert': [u'user'], 'token': [u'REDACTED+\\\\'], 'action': [u'delete']}"
8response=
9{u'servedby': u'mw1223', u'error': {u'info': u'[WT6z4gpAMDoAAC@0lZoAAADI] Exception caught: Could not acquire lock for "mwstore://local-multiwrite/local-public/c/c8/By_Younes_el_ghandouri.xcf".', u'code': u'internal_api_error_LocalFileLockError'}}
10WARNING: Failed API request on attempt 0
11WARNING: API error internal_api_error_InvalidArgumentException: [WT6z7QpAAEcAAihlApgAAABA] Exception caught: ApiUsageException::__construct requires a fatal Status
12ERROR: Detected MediaWiki API exception internal_api_error_InvalidArgumentException: [WT6z7QpAAEcAAihlApgAAABA] Exception caught: ApiUsageException::__construct requires a fatal Status [servedby:mw1276]; raising
13MediaWiki exception InvalidArgumentException details:
14query=
15u"{u'maxlag': ['5'], 'title': [FilePage(File:By Younes el ghandouri.xcf)], u'format': [u'json'], 'reason': [u'This file contains [[COM:CSD#F9', u'embedded data]]: After 452.6KiB (463489 bytes, via Ending,Magic): Identified type: application/x-rar (RAR archive data, v4, os: Win32)'], u'assert': [u'user'], 'token': [u'REDACTED+\\\\'], 'action': [u'delete']}"
16response=
17{u'servedby': u'mw1276', u'error': {u'info': u'[WT6z7QpAAEcAAihlApgAAABA] Exception caught: ApiUsageException::__construct requires a fatal Status', u'code': u'internal_api_error_InvalidArgumentException'}}
18WARNING: Failed API request on attempt 1

Even if the deletion should not be executed so fast (someone in the operations team said it should be fine), there's probably some internal issue within MediaWiki that causes this error.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 358401 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] API: Restore ability for dieStatus() to be passed a non-fatal Status

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

Change 358401 merged by jenkins-bot:
[mediawiki/core@master] API: Restore ability for dieStatus() to be passed a non-fatal Status

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

This should be deployed to WMF wikis with 1.30.0-wmf.6, see https://www.mediawiki.org/wiki/MediaWiki_1.30/Roadmap for the schedule.

If you'd like it deployed sooner, feel free to submit it for a SWAT deployment.