Page MenuHomePhabricator

Seeing desktop text cache while browsing mobile sites
Closed, InvalidPublic

Description

I have no idea how it happened, but for some reason I'm seeing desktop pages while browsing the mobile sites, something that shouldn't be possible. Examples:

https://m.wikimediafoundation.org/wiki/Our_projects = mobile version
Server: mw1092.eqiad.wmnet
X-Cache: cp1066 hit(1), cp3041 hit(2), cp3030 frontend hit(1)

https://m.wikimediafoundation.org/wiki/Home = desktop version
Server: mw1181.eqiad.wmnet
X-Cache: cp1053 hit(2), cp3042 hit(3), cp3030 frontend hit(11)

https://m.wikimediafoundation.org/wiki/FAQ/en = mobile version
Server: mw1021.eqiad.wmnet
X-Cache: cp1065 hit(1), cp3041 hit(4), cp3030 frontend miss(0)

https://m.wikimediafoundation.org/wiki/Staff_and_contractors = desktop version
Server: mw1018.eqiad.wmnet
X-Cache: cp1053 miss(0), cp3031 miss(0), cp3030 frontend hit(1)

No cookies (besides GeoIP, CP and Last-Access) were set.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
BBlack triaged this task as High priority.Apr 23 2016, 3:38 PM
BBlack added a project: MobileFrontend.
BBlack subscribed.

This doesn't seem to be a (varnish) cache effect. I get the same behavior on your test URLs when forcing cache misses. If this is happening on higher-traffic wikis, IMHO, this is a UBN.

Yeah, this doesn't seem to be a Varnish problem:

I tried the following to force the mobile version of the site on a non mobile-site (nl.wikipedia.org):
curl -v -A 'Southparkfan' -H 'X-Wikimedia-Debug: 1' -H 'Cookie: mf_useformat=true' https://nl.wikipedia.org/wiki/Hoofdpagina

X-Wikimedia-Debug forces the backend miss, the mf_useformat=true cookie should force the mobile version (even despite this is the desktop site). For nl.wikipedia.org, this cookie works and I get the mobile version.

However, when trying this cookie for https://m.wikimediafoundation.org/wiki/Home, I still get the desktop version. ?useformat=mobile didn't work either.

I was not able yet to reproduce this on high-traffic wikis.

Sorry ignore that. Seems like a different problem.

It looks like the same problem to me... I put this in our operations outbound for SoS, and raised this ticket the other day in the wikimedia-(operations|tech) channels. Haven't seen anyone really dig into wtf is going on.

Oh you're right, not the same problem. Still, if we don't understand the problem in this ticket, how do we know it's not going to hit wp.org sites?

Ping - Reading, Mobile, someone should know what's causing this, right?

This is due to MobileContext::isBlacklistedPage
and this:
https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L14118

You'll see all the pages that are rendering as desktop are intentionally being done so because they are in this category:
https://m.wikimediafoundation.org/wiki/Category:Desktop-only_pages