Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
BBC RussianHomePhabricator
Log In
Maniphest T271184

Page on eswiki stuck on vandalized cached version
Closed, ResolvedPublic

Description

This page seems to be stuck on a cached version (since being vandalized on Dec 16):

https://es.wikipedia.org/api/rest_v1/page/mobile-html/Peste

---original report---

On December 16, the article "Peste" from the Spanish Wikipedia (https://es.wikipedia.org/wiki/Peste) was vandalized. An anti-vandal bot reversed it almost immediately, however the Wikipedia Android app continues to display the vandalized version ever since.

Screenshot_20210104_201753_org.wikipedia.jpg (1×540 px, 85 KB)

I cleared the page cache from the desktop (https://es.wikipedia.org/w/index.php?title=Peste&action=purge), but it had no effect on the app.

This problem was reported by a user on the es.Wikimedia help IRC channel in and I was able to see it on my phone.
I have app version 2.7.50337-r2020-12-04 (50337) from December 7, 2020. Mi mobile is Huawei P40 Lite, EMUI version 10.1.0; Android version 10

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Dbrant renamed this task from Problem with the Wikipedia app cache for Android to Page on eswiki stuck on vandalized cached version.Jan 5 2021, 2:49 PM
Dbrant triaged this task as High priority.
Dbrant updated the task description. (Show Details)

I cleared the RESTBase cache that mobile-html endpoint relies on as described here.

The issue should be gone by now, could you please confirm and resolve the ticket?

Assuming this task is about the Mobile-Content-Service code project, hence adding that project tag so other people who don't know or don't care about team tags can also find this task when searching via projects. (Please set appropriate project tags when possible. Thanks!)

Thanks @Aklapper these project tags are confusing, I'm changing to PCS which is more appropriate.

MSantos claimed this task.

If I'm missing something feel free to re-open it.

LuchoCR reopened this task as Open.EditedFeb 1 2023, 5:35 AM

Hi @MSantos. On January 27, Template:Infobox person at es.wikipedia were vandalized, affecting more than 270K articles.

As a result of this, the problem reported here is presented again in which the mobile app is displaying vandalized versions of the articles. We have received hundreds of reports about it, and it has also begun to appear in the media; I wanted to ask if it is possible to force a total cache refresh.

(See local discussion here)

@MadriCR a total cache refresh is possible but it will take some time and coordination to not create an incident due to increased load on DBs. I'll coordinate that change ASAP, thanks for reaching out.

By looking at the objects in cache for one affected page, page/html has the correct content but page/summary does not, even if their objects have been stored in cache *after* the last edit to the template. Specifically these objject in cache were saved 0.3 seconds apart:

cassandra@cqlsh:wikipedia_T_page__summary> select dateof(tid) from "wikipedia_T_parsoidphp".data where "_domain" = 'es.wikipedia.org' AND key = 'James_Buchanan';

 system.dateof(tid)
---------------------------------
 2023-01-28 06:13:55.394000+0000

(1 rows)
cassandra@cqlsh:wikipedia_T_page__summary> select dateof(tid) from data where "_domain" = 'es.wikipedia.org' AND key = 'James_Buchanan';

 system.dateof(tid)
---------------------------------
 2023-01-28 06:13:55.671000+0000

(1 rows)

Now, re-rendering that page in restbase takes more than 0.3 seconds, so it's possible we have a race condition here so that:

  • Revert of the vandalism happens
  • change-propagation sends a request to re-render page/html
  • change-propagation sends a request to re-render page/summary
    • restbase calls PCS, which in turns calls restbase to get page/html
    • if the new version of page/html wasn't ready, PCS gets served the old, vandalized version

This should probably verified in the code of restbase, if we do remove the old cached version or we just replace it once the new one is ready, this is likely what happened.

If I am right, a null edit to the template should be enough to fix the issue. @MadriCR would you be able to do a null edit to the template?

Done; please let me know.

By looking at the objects in cache for one affected page, page/html has the correct content but page/summary does not, even if their objects have been stored in cache *after* the last edit to the template. Specifically these objject in cache were saved 0.3 seconds apart:

cassandra@cqlsh:wikipedia_T_page__summary> select dateof(tid) from "wikipedia_T_parsoidphp".data where "_domain" = 'es.wikipedia.org' AND key = 'James_Buchanan';

 system.dateof(tid)
---------------------------------
 2023-01-28 06:13:55.394000+0000

(1 rows)
cassandra@cqlsh:wikipedia_T_page__summary> select dateof(tid) from data where "_domain" = 'es.wikipedia.org' AND key = 'James_Buchanan';

 system.dateof(tid)
---------------------------------
 2023-01-28 06:13:55.671000+0000

(1 rows)

Now, re-rendering that page in restbase takes more than 0.3 seconds, so it's possible we have a race condition here so that:

  • Revert of the vandalism happens
  • change-propagation sends a request to re-render page/html
  • change-propagation sends a request to re-render page/summary
    • restbase calls PCS, which in turns calls restbase to get page/html
    • if the new version of page/html wasn't ready, PCS gets served the old, vandalized version

This should probably verified in the code of restbase, if we do remove the old cached version or we just replace it once the new one is ready, this is likely what happened.

If I am right, a null edit to the template should be enough to fix the issue. @MadriCR would you be able to do a null edit to the template?

In T271184#8585983, @MadriCR wrote:

Done; please let me know.

I would expect this to take anywhere between a few minutes and a few hours to propagate fully, depending on how much the jobqueue is busy, but it was our best solution to try to fix the issue consistently, at least for this time.

I think this is an issue with Page-Previews / PageImages - I've filed T328880: Clear abusive image from PagePreviews/Images on eswiki accordingly per https://www.mediawiki.org/wiki/Extension:PageImages#How_can_I_purge_a_bad_image%3F since Purging will not work. For larger emergencies please file a Phabricator ticket.