Page MenuHomePhabricator

Some wikitech.wikimedia.org thumbnails broken (404)
Closed, ResolvedPublic

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle subscribed.
Krinkle added a project: Regression.
Krinkle set Security to None.
Krinkle removed subscribers: Krenair, bd808, Andrew.
Krinkle added subscribers: Krenair, bd808, Andrew.
Aklapper renamed this task from wikitech.wikimedia.org thumbnails broken to Some wikitech.wikimedia.org thumbnails broken (404).Apr 1 2015, 10:54 AM

First example seems to work again now

Looks to me like wikitech can't generate new thumbnails at all, it's just coasting on things left over from an ancient cache. Possibly caused by hhvm migration and

'wgSVGConverter' => array(

'default' => 'rsvg-secure',

),

Oh, nope, they've been broken since Silver was set up I think.

It looks to be missing the rewrite rules to invoke thumb_handler.php on 404.

Change 218553 had a related patch set uploaded (by Andrew Bogott):
Turn on wgGenerateThumbnailOnParse for wikitech.

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

Change 218553 merged by jenkins-bot:
Turn on wgGenerateThumbnailOnParse for wikitech.

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

Ugh, why another wikitech-specific hack? What about @Bawolff's comment?

Krinkle reopened this task as Open.EditedJun 16 2015, 7:23 PM

Didn't fix it.

E.g. https://wikitech.wikimedia.org/wiki/Deployments contains use of https://wikitech.wikimedia.org/wiki/File:Yes_check.svg

I've tried purging the page and making null edits but the thumbnail remains 404 Not Found.

GET https://wikitech.wikimedia.org/w/images/thumb/f/fb/Yes_check.svg/36px-Yes_check.svg.png
HTTP 404 Not Found

Tried on other pages but failing there as well:
https://wikitech.wikimedia.org/w/index.php?title=Sandbox&oldid=163834

Thought it may be related to it being transcluded from template, but that's not it. It seems this specific size of thumbnail is just stuck. It won't create it.

New edit for different size (works):
https://wikitech.wikimedia.org/w/index.php?title=Template:Done&oldid=163835

New edit for previous size (fails):
https://wikitech.wikimedia.org/w/index.php?title=Template:Done&oldid=163836

Merging T102659 into this and re-opening. I saw this task closed and assumed it as resolved a while ago, but actually only earlier today.

Deployers (including you, @Krinkle) have access to silver. So I encourage you to debug and suggest a solution; I certainly have no idea.

With the given links in this task and its duplicates I cannot find any broken thumbnails anymore. No testcase.
Closing as fixed; please reopen with a testcase if this still happens.

based on Special:ListFiles a bunch of SVGs and PDFs are still broken

PDFs I would guess is missing the pdfinfo command line tool (popler-utils package i think). [This is a guess though]

SVGs is getting error: Error creating thumbnail: Unknown option --no-external-files

I believe that --no-external-files is a flag that comes from a WMF specific patch to rsvg. So probably either wikitech needs to use the generic version of the rsvg command line, or it should use the WMF-patched version of rsvg. For security reasons, probably best to use the patched version of rsvg

Other than that (which are technically separate issues from the original report), wikitech thumbs appear to be working, using the non-404 handler config.

Ugh, why another wikitech-specific hack? What about @Bawolff's comment?

There are instructions for setting up a 404 handler (For a single-machine wiki running apache) at https://www.mediawiki.org/wiki/Manual:Thumb.php#MediaWiki_.3E.3D_1.20 I can help walk people through it if anyone needs help.

Benefits of 404 handler are that thumbnails get generated in a separate process from normal requests, easier to scale up (probably not an issue here), if any thumbnails missing they get regenerated on the spot instead of next time the page using it is reparsed, and people can manaully request any size by modifying the url.

Given the usecase of wikitech, 404-thumb handling probably really doesn't matter. The main benefit would be that its more inline with what the rest of the cluster does.

PDFs I would guess is missing the pdfinfo command line tool (popler-utils package i think). [This is a guess though]

krenair@silver:~$ pdfinfo
The program 'pdfinfo' is currently not installed. To run 'pdfinfo' please ask your administrator to install the package 'poppler-utils'

I believe that --no-external-files is a flag that comes from a WMF specific patch to rsvg. So probably either wikitech needs to use the generic version of the rsvg command line, or it should use the WMF-patched version of rsvg. For security reasons, probably best to use the patched version of rsvg

Yeah. According to CommonSettings.php we don't need to use the patched version on HHVM machines, so T98813: Move wikitech (silver) to HHVM would probably fix it.

It looks like https://wikitech.wikimedia.org/w/images/thumb/6/60/Wikimedia_labs_logo.svg/600px-Wikimedia_labs_logo.svg.png should go through to https://wikitech.wikimedia.org/w/thumb.php?f=Wikimedia_labs_logo.svg&width=600 (based on what modules/mediawiki/files/apache/beta/sites/upload.conf does with thumb URLs), but that shows:

SVGs is getting error: Error creating thumbnail: Unknown option --no-external-files

Change 231158 had a related patch set uploaded (by Alex Monk):
Fix SVG conversion on wikitech

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

Change 231158 merged by jenkins-bot:
Fix SVG conversion on wikitech

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

That looks much better now. So, PDFs:

krenair@tin:/srv/mediawiki-staging (master)$ dpkg-query -S `which pdfinfo`
poppler-utils: /usr/bin/pdfinfo

However, https://wikitech.wikimedia.org/w/thumb.php?f=DiscoveryReport.pdf&width=600:

Error creating thumbnail: /bin/bash: gs: command not found
convert.im6: no decode delegate for this image format `/tmp/magick-zn0E880g' @ error/constitute.c/ReadImage/544.
convert.im6: no images defined `/tmp/transform_19fce2816f4a-1.jpg' @ error/convert.c/ConvertImageCommand/3044

Apparently that's ghostscript

I checked several other PDFs and most of them showed the same error.

Change 231293 had a related patch set uploaded (by Alex Monk):
Add multimedia packages (i.e. ghostscript for pdfinfo) to silver

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

Change 231293 merged by Andrew Bogott:
Add multimedia packages (e.g. ghostscript for pdfinfo) to silver

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

Special:ListFiles is looking much better