Last modified: 2013-12-12 20:49:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54537, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52537 - beta commons: API tokens module being cached in varnish, when it should not be
beta commons: API tokens module being cached in varnish, when it should not be
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.22.0
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: browser-test-bug
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-05 01:16 UTC by Chris McMahon
Modified: 2013-12-12 20:49 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Internal error bad token on file upload showing URL (38.73 KB, image/png)
2013-08-05 01:16 UTC, Chris McMahon
Details

Description Chris McMahon 2013-08-05 01:16:09 UTC
Created attachment 13061 [details]
Internal error bad token on file upload showing URL

This behavior started only recently, see screen shot.  It might be a result of https://gerrit.wikimedia.org/r/#/c/75122/
Comment 1 Bawolff (Brian Wolff) 2013-08-05 02:12:36 UTC
I doubt it was that commit.

It would be useful to test if this happens on both normal upload with the api and with chunked upload.

Suosin in certain configs can cause this issue. Has beta had its php config modified recently?
Comment 2 Bawolff (Brian Wolff) 2013-08-09 18:36:25 UTC
> 
> Suosin in certain configs can cause this issue. Has beta had its php config
> modified recently?

Does not appear to be the issue
------------------

So this is super odd.

When testing (using chunked upload. Not using upload wizard), I did not recieve any bad token errors related to uploading. However, ULS did get a bad token error when asking for user options (despite giving back the exact same token it received in a previous API request).

When I did do chunked upload (using async. Not using upload wizard), everything proceeded normally, until the end when I received:
{"servedby":"deployment-apache32","error":{"code":"stashfailed","info":"Internal error: Server failed to store temporary file."}}

Which suggests a server misconfiguration. I have no idea what the badtoken to the uls request is about.
Comment 3 Bawolff (Brian Wolff) 2013-08-09 18:43:32 UTC
Ok, further testing (using upload wizard) reveals:

The tokens api module is returning incorrect results. Things that request tokens from it are failing (including upload wizard and ULS). Things using tokens directly from the page source, are not failing.
Comment 4 Bawolff (Brian Wolff) 2013-08-09 18:58:14 UTC
Appears to be a varnish caching issue. Messing with the url gives back different tokens. Here is the headers of the bad token response (note the X-cache and Age headers):

Accept-Ranges:bytes
Age:1007218
Cache-Control:private, s-maxage=0, max-age=0
Connection:keep-alive
Content-Encoding:gzip
Content-Length:77
Content-Type:application/json; charset=utf-8
Date:Fri, 09 Aug 2013 18:56:35 GMT
Server:Apache
Vary:Accept-Encoding
Via:1.1 varnish, 1.1 varnish
X-Cache:deployment-cache-text1 hit (109), deployment-cache-text1 frontend miss (0)
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-Powered-By:PHP/5.3.10-1ubuntu3.6+wmf1
X-Varnish:967412333 965949056, 1692256446
X-Vary-Options:Accept-Encoding;list-contains=gzip
Comment 5 Brad Jorsch 2013-08-21 19:54:57 UTC
(In reply to comment #4)
> Appears to be a varnish caching issue.

So the question is whether this is a problem in the Varnish setup, or a problem in the response generated by MediaWiki that just happened to work with Squid? And if the former, what needs to change?
Comment 6 Andre Klapper 2013-12-12 13:07:29 UTC
(In reply to comment #5 by anomie)
> So the question is whether this is a problem in the Varnish setup, or a
> problem in the response generated by MediaWiki that just happened to work 
> with Squid?
> And if the former, what needs to change?

Any idea who could answer this question and should be CC'ed?
Comment 7 Bawolff (Brian Wolff) 2013-12-12 15:26:01 UTC
(In reply to comment #6)
> (In reply to comment #5 by anomie)
> > So the question is whether this is a problem in the Varnish setup, or a
> > problem in the response generated by MediaWiki that just happened to work 
> > with Squid?
> > And if the former, what needs to change?
> 
> Any idea who could answer this question and should be CC'ed?

Well we use varnish on production now, so I don't think its a mediawiki issue, or production would be broken.
Comment 8 Chris McMahon 2013-12-12 20:49:38 UTC
Not replicated since

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links