Page MenuHomePhabricator

PHP Warning: wgWikiDiff2MovedParagraphDetectionCutoff is set WikiDiff2 does not support it
Closed, ResolvedPublic

Description

Error

Request ID: XKd9AApAADwAACIA7acAAABX

message
PHP Warning: $wgWikiDiff2MovedParagraphDetectionCutoff is set but has no effect since the used version of WikiDiff2 does not support it. [Called from TextSlotDiffRenderer::getTextDiffInternal …]
trace
#3 /srv/mediawiki/php-1.33.0-wmf.23/includes/diff/TextSlotDiffRenderer.php(221): wfLogWarning(string)
#4 /srv/mediawiki/php-1.33.0-wmf.23/includes/diff/TextSlotDiffRenderer.php(141): TextSlotDiffRenderer->getTextDiffInternal(string, string)
#5 /srv/mediawiki/php-1.33.0-wmf.23/includes/poolcounter/PoolCounterWorkViaCallback.php(69): Closure$TextSlotDiffRenderer::getTextDiff()
#6 /srv/mediawiki/php-1.33.0-wmf.23/includes/poolcounter/PoolCounterWork.php(123): PoolCounterWorkViaCallback->doWork()
#7 /srv/mediawiki/php-1.33.0-wmf.23/includes/diff/TextSlotDiffRenderer.php(174): PoolCounterWork->execute()
#8 /srv/mediawiki/php-1.33.0-wmf.23/includes/diff/TextSlotDiffRenderer.php(125): TextSlotDiffRenderer->getTextDiff(string, string)
#9 /srv/mediawiki/php-1.33.0-wmf.23/includes/diff/DifferenceEngine.php(1061): TextSlotDiffRenderer->getDiff(WikitextContent, WikitextContent)
#10 /srv/mediawiki/php-1.33.0-wmf.23/includes/diff/DifferenceEngine.php(979): DifferenceEngine->getDiffBody()
#11 /srv/mediawiki/php-1.33.0-wmf.23/includes/FeedUtils.php(152): DifferenceEngine->getDiff(string, string)
#12 /srv/mediawiki/php-1.33.0-wmf.23/includes/actions/HistoryAction.php(358): FeedUtils::formatDiffRow(Title, integer, integer, string, string)
#13 /srv/mediawiki/php-1.33.0-wmf.23/includes/actions/HistoryAction.php(322): HistoryAction->feedItem(stdClass)
#14 /srv/mediawiki/php-1.33.0-wmf.23/includes/actions/HistoryAction.php(149): HistoryAction->feed(string)
#15 /srv/mediawiki/php-1.33.0-wmf.23/includes/actions/FormlessAction.php(43): HistoryAction->onView()
#16 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(501): FormlessAction->show()
#17 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#18 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(867): MediaWiki->performRequest()
#19 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(517): MediaWiki->main()
#20 /srv/mediawiki/php-1.33.0-wmf.23/index.php(42): MediaWiki->run()
#21 /srv/mediawiki/w/index.php(3): include(string)

Impact

The feature is enabled through wmf-config, but does not actually work for end-users.

This means the feature is no longer live (it was enabled in August 2018 I believe), and instead spams the logs at a fairly high rate.

Notes

Started yesterday around 2018-04-04 12:00 UTC.

Details

Related Gerrit Patches:

Event Timeline

Krinkle created this task.Apr 5 2019, 4:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 5 2019, 4:12 PM
Krinkle added a subscriber: MoritzMuehlenhoff.

I could not find any MediaWiki code or wmf-config deploys around that time. The config variable in wmf-config and logic for it in MediaWiki core diff handling have both existed for several months.

Instead, looking at SAL I found:

13:23 <moritzm> upgrading mw1261 to HHVM 3.18.5+dfsg-1+wmf8+deb9u2 / wikidiff 1.8.1
11:43 <moritzm> upgrading HHVM on mwdebug servers in eqiad along with update to hhvm-wikidiff 1.8.1
10:56 <moritzm> uploaded hhvm-wikidiff 1.8.1 to apt.wikimedia.org/stretch-wikimedia (source package is named php-wikdiff2 for legacy reasons) (T203069)

Krinkle triaged this task as High priority.Apr 5 2019, 4:14 PM
Krinkle added a project: Operations.

We changed the signature in wikidiff2 version 1.8.0 so not using $wikiDiff2MovedParagraphDetectionCutoff is intentional at this point. The warning clearly comes from [1]

I think I was not aware that there's this warning introduced in [2] when I prepared the code for the now version with [3].

[1] https://gerrit.wikimedia.org/g/mediawiki/core/+/dd0929c9dc26c4c3f1962b6352c7346e4ac55370/includes/diff/TextSlotDiffRenderer.php#219
[2] https://gerrit.wikimedia.org/r/445200
[3] https://gerrit.wikimedia.org/r/454556

Since we intend to use it this way now I would prepare a patch removing the warning.

@Krinkle, @WMDE-Fisch : Shall we depool the five servers already upgraded until that is resolved?

Change 501624 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/core@master] Remove warning for unnused 4th argument on wikidiff2

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

@WMDE-Fisch Does this mean the feature is no longer exists, or is no longer configurable from MediaWiki?

Anyway, I assume that once the upgrade is done, the wmf-config entry can be removed, is that right? Is there a task for that?

Change 501625 had a related patch set uploaded (by Krinkle; owner: WMDE-Fisch):
[mediawiki/core@wmf/1.33.0-wmf.24] Remove warning for unnused 4th argument on wikidiff2

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

Change 501626 had a related patch set uploaded (by Krinkle; owner: WMDE-Fisch):
[mediawiki/core@wmf/1.33.0-wmf.23] Remove warning for unnused 4th argument on wikidiff2

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

@WMDE-Fisch Does this mean the feature is no longer exists, or is no longer configurable from MediaWiki?
Anyway, I assume that once the upgrade is done, the wmf-config entry can be removed, is that right? Is there a task for that?

The feature is configured via php ini setting. We have an umbrella task to track the clean up steps here T194272: Clean up wikidiff2 config variable handling

Change 501624 merged by jenkins-bot:
[mediawiki/core@master] Remove warning for unnused 4th argument on wikidiff2

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

Change 501625 merged by jenkins-bot:
[mediawiki/core@wmf/1.33.0-wmf.24] Remove warning for unnused 4th argument on wikidiff2

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

Mentioned in SAL (#wikimedia-operations) [2019-04-05T17:12:32Z] <krinkle@deploy1001> Synchronized php-1.33.0-wmf.24/includes/diff/TextSlotDiffRenderer.php: Ia326c67de28a4e / T220217 (duration: 01m 00s)

Change 501626 merged by jenkins-bot:
[mediawiki/core@wmf/1.33.0-wmf.23] Remove warning for unnused 4th argument on wikidiff2

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

Mentioned in SAL (#wikimedia-operations) [2019-04-05T17:19:35Z] <krinkle@deploy1001> Synchronized php-1.33.0-wmf.23/includes/diff/TextSlotDiffRenderer.php: Ia326c67de28a4e / T220217 (duration: 01m 02s)

Krinkle closed this task as Resolved.Apr 5 2019, 5:21 PM
Krinkle assigned this task to WMDE-Fisch.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM