Big bug on uploading SVG images

Riccardo Iaconelli riccardo at kde.org
Sun Jan 10 12:41:08 UTC 2016


Hi,

Sofia just discovered a very interesting bug when we upload SVG images, which 
completely breaks things. I am surprised it never appeared before, giving the 
level of breakage it introduces.

First off, we try to call inkscape, even when it's not installed on the 
server. Easy enough to fix, by changing L218 of LocalSettings to be either 
commented or explicitly "ImageMagick".

However, it seems like no program can really find the SVG file in order to 
generate the PNG.

We have been testing with this
http://pool.wikitolearn.org/File:attritostatico.svg

To make things even more interesting, while I was debugging it, after a few 
refreshes, the server decided to finally render the thumbnails (without any 
change from my side, maybe some other children of the web server process?). I 
could also see the temp file being generated:

root at websrv:/var/www/WikiToLearn/mediawiki/images# ls -lah tmp/
svg_38ba126ccb1fb5d8637e0b3e/20160111120218\!attritostatico.svg 
lrwxrwxrwx 1 www-data www-data 92 Jan 11 12:11 tmp/
svg_38ba126ccb1fb5d8637e0b3e/20160111120218!attritostatico.svg -> /var/www/
WikiToLearn/mediawiki/images/uploads/archive/9/9c/20160111120218!
attritostatico.svg

This correlates well with these warnings:

[10-Jan-2016 17:59:16] WARNING: [pool www] seems busy (you may need to 
increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, 
there are 0 idle, and 18 total children

At that point, I decided to upload a new version of the file. Everything broke 
again.

While I was performing some tests, cloudflare also reported gateway timeouts. 
Might be correlated, just as uncorrelated.

Now, I have no idea what might be going wrong here, but it's nicely broken, 
and effectively prevents people from uploading SVGs.

Luca, that seems like your department, but I write here to raise maximum 
awareness. We have to solve this.

Bye,
-Riccardo



More information about the WikiToLearn-Tech mailing list