Last modified: 2013-05-29 07:15:56 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 T43113, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41113 - thumb.php fails to generate thumbnail of SVG images (gives HTML error as body)
thumb.php fails to generate thumbnail of SVG images (gives HTML error as body)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Aaron Schulz
:
: 40980 41088 (view as bug list)
Depends on:
Blocks: 41371
  Show dependency treegraph
 
Reported: 2012-10-17 16:01 UTC by Takeshi Yoshino
Modified: 2013-05-29 07:15 UTC (History)
11 users (show)

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


Attachments

Comment 1 Sumana Harihareswara 2012-10-17 18:25:50 UTC
Thanks for the bug report!

(Whoops, sorry, accidentally marked this as a deployment blocker because I missed what wiki it was on.)
Comment 2 Bartosz Dziewoński 2012-10-17 19:33:07 UTC
Confirming. I think I've hit the same issue:

* https://commons.wikimedia.org/w/thumb.php?f=Broom%20icon.svg&w=22 is a 404
* https://commons.wikimedia.org/w/thumb.php?f=Broom%20icon.svg&w=23 works
Comment 3 Aaron Schulz 2012-10-17 21:27:26 UTC
According to eval.php:
> $be = FileBackendGroup::singleton()->get( 'local-swift' );

> $root = $be->getRootStoragePath() . '/local-thumb';

> $obj = '3/34/Flag_of_El_Salvador.svg/25px-Flag_of_El_Salvador.svg.png';

> var_dump( $be->getFileStat( array( 'src' => "$root/$obj" ) ) );
bool(false)

The bad files are not in swift. So I guess that file is just in squid. The error message is apparently a swift 404 error message. So it some point swift have a 404 and either:
a) squid cached it wrongly, or
b) the response had the wrong headers, so squid didn't know it was a 404
Comment 4 Andre Klapper 2012-10-18 15:33:22 UTC
*** Bug 40980 has been marked as a duplicate of this bug. ***
Comment 5 Andre Klapper 2012-10-18 15:33:48 UTC
*** Bug 41130 has been marked as a duplicate of this bug. ***
Comment 6 Andre Klapper 2012-10-18 15:35:57 UTC
*** Bug 41088 has been marked as a duplicate of this bug. ***
Comment 7 Andre Klapper 2012-10-18 16:35:21 UTC
*** Bug 41174 has been marked as a duplicate of this bug. ***
Comment 8 Malafaya 2012-10-18 19:37:19 UTC
Today, another thumbnail got broken:

https://pt.wiktionary.org/wiki/Predefini%C3%A7%C3%A3o:-da-
Comment 9 Spinningspark 2012-10-18 19:50:14 UTC
Is 41174 really a duplicate?  It is not just the thumbnails that are broken.  The file cannot be seen at all.
Comment 10 Aaron Schulz 2012-10-18 19:51:25 UTC
(In reply to comment #9)
> Is 41174 really a duplicate?  It is not just the thumbnails that are broken. 
> The file cannot be seen at all.

Probably not, I'd reopen that one.
Comment 11 Aaron Schulz 2012-10-18 21:06:55 UTC
(In reply to comment #3)
> According to eval.php:
> > $be = FileBackendGroup::singleton()->get( 'local-swift' );
> 
> > $root = $be->getRootStoragePath() . '/local-thumb';
> 
> > $obj = '3/34/Flag_of_El_Salvador.svg/25px-Flag_of_El_Salvador.svg.png';
> 
> > var_dump( $be->getFileStat( array( 'src' => "$root/$obj" ) ) );
> bool(false)
> 

According to Asher, some of the cached stat entries are bogus. This causes thumb.php to send a 200 status, length header, and so on and then try to stream the body of a file that does not exist (which streams the literal swift error html). This gets cached by the squids (apparently they ignore the content-length mismatch).

There are few stat cache update failures showing up in the logs. I've made some code cleanups in https://gerrit.wikimedia.org/r/#/c/28559/ to improve cache key normalization, but I have some doubts as to whether that is at play here.
Comment 12 Aaron Schulz 2012-10-18 22:01:48 UTC
Also see https://gerrit.wikimedia.org/r/#/c/28614/.
Comment 13 Aaron Schulz 2012-10-23 00:57:29 UTC
That template looks fine now. Are there some other examples?
Comment 14 MZMcBride 2012-10-23 02:30:14 UTC
(In reply to comment #13)
> That template looks fine now. Are there some other examples?

I clicked through the URLs above and all seemed to work properly. Unless someone can come up with a broken test case in the next day or so, I think this bug can safely be marked resolved as fixed.
Comment 15 Sumana Harihareswara 2012-10-23 19:20:42 UTC
Dropping this to "high" after conversation with Rob Lanphier -- bug 41130 is the highest-priority thumbnail-related bug right now.
Comment 16 Sumana Harihareswara 2012-10-25 06:42:25 UTC
Tried to reproduce problem and could not; marking as fixed because I presume the changesets fixed the problem.

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


Navigation
Links