Page MenuHomePhabricator

Commons SVG Checker has differences between Wikimedia rendering and Toolforge rendering
Closed, ResolvedPublicBUG REPORT

Description

TilmannR produced a sample, which looks completely different on Wikimedia Commons and on Commons SVG Checker.

Wikimedia servers have been updated to librsvg 2.40.20 ( T68672#5110845 )
https://commons.wikimedia.org/wiki/File:Identify_renderer.svg

300px-Identify_renderer.svg.png (30×300 px, 1 KB)

Rillke's tool (Toolforge Debian Stretch also runs 2.40.16)
https://commons.wikimedia.org/wiki/Commons:Commons_SVG_Checker?withJS=MediaWiki:CommonsSvgChecker.js&checkSVG=File%3AIdentify_renderer.svg

index.png (30×300 px, 2 KB)

The Same issue ocours with Jarry1250's tool (rsvg-convert version 2.40.16)
https://tools.wmflabs.org/svgcheck/index.php

identify_renderer.png (30×300 px, 2 KB)

Steps to Reproduce:
Open https://commons.wikimedia.org/wiki/File:Identify_renderer.svg and compare it to https://commons.wikimedia.org/wiki/Commons:Commons_SVG_Checker?withJS=MediaWiki:CommonsSvgChecker.js&checkSVG=File%3AIdentify_renderer.svg

Maybe it would be better if servers and toolforge have the same librsvg-version: T151656#5068826

Event Timeline

A more straightforward example is https://commons.wikimedia.org/wiki/File:SVG_edge_case_-_zero_scale_gradient.svg
It's a divide-by-zero type of situation, in which the SVG Checker stops rendering and WikiMedia's renderer falls back to a default.

Aklapper renamed this task from Differences between Wikimedia rendering and Toolforge rendering to Commons SVG Checker has differences between Wikimedia rendering and Toolforge rendering.Mar 21 2019, 10:31 AM

Thanks for reporting.

Wikimedia servers have been updated to librsvg 2.40.16

Per T170810 I think production is actually on 2.40.18.

According to the change log, 2.40.18 fixed CVE-2017-11464 ("A SIGFPE is raised in the function box_blur_line... because of incorrect protection against division by zero."). I don't have different versions of rsvg available to test, but I imagine that it's the difference between 2.40.16 (Toolforge) and 2.40.18 (production) that is therefore causing the issue.

I am not sure whether the easiest fix is for 2.40.18 to be installed on Kubernetes (T151656) or on Stretch (no task filed).

Thanks for reporting.

Wikimedia servers have been updated to librsvg 2.40.16

Per T170810 I think production is actually on 2.40.18.

The "librsvg2-2" binary package versions are nowadays:

2.40.16-1+b1 5 , 2.40.21-0+deb9u1 2155 , 2.44.10-2.1 580

that is 5 servers on the first version, 2155 on the second and 580 on the third

The image looks identical since a while.

The "librsvg2-2" binary package versions are nowadays:

2.40.16-1+b1 5 , 2.40.21-0+deb9u1 2155 , 2.44.10-2.1 580

that is 5 servers on the first version, 2155 on the second and 580 on the third

It reminds me on a discussion where different users saw different rendering-results. A not reproducible result is imho much worse than a reproducible bug.

@Dzahn

@JoKalliauer To check the production APT repo check out https://apt.wikimedia.org/wikimedia/

So far I know nothing about apt-browser.toolforge.org and its relation to that.

When I reported the versions above it related only to production.

Yes, I think that's what it means. Toolforge and production are separated almost entirely.

@JoKalliauer Here is info from one of the _production_ thumbor servers, thumbor2003.codfw.wmnet:

[thumbor2003:~] $ lsb_release -c
Codename:	stretch


[thumbor2003:~] $ dpkg -l | grep svg
ii  librsvg2-2:amd64                      2.40.21-0+deb9u1                       amd64        SAX-based renderer library for SVG files (runtime)
ii  librsvg2-bin                          2.40.21-0+deb9u1                       amd64        command-line and graphical viewers for SVG files
ii  librsvg2-common:amd64                 2.40.21-0+deb9u1                       amd64        SAX-based renderer library for SVG files (extra runtime)
[thumbor2003:~] $ apt-cache policy librsvg2-bin
librsvg2-bin:
  Installed: 2.40.21-0+deb9u1
  Candidate: 2.40.21-0+deb9u1
  Version table:
 *** 2.40.21-0+deb9u1 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.40.16-1+b1 500
        500 http://mirrors.wikimedia.org/debian stretch/main amd64 Packages

https://mirrors.wikimedia.org/debian/dists/stretch/main/binary-amd64/

https://mirrors.wikimedia.org/debian/pool/main/libr/librsvg/

@JoKalliauer

thumbor* and mwmaint* servers in production have: 2.40.21-0+deb9u1

regular mediawiki appservers and all other servers production have: 2.44.10-2.1

What toolforge has please check with wmcs or with your own user.

Toolforge likely has several different versions running on different hosts, but the specific container that svgcheck.toolforge.org is currently running in looks like this:

[taavi@tools-sgebastion-08 ~] $ kubectl exec -it -n tool-svgcheck svgcheck-69fc5956dd-p7h7t --as admin --as-group system:masters -- /bin/bash
tools.svgcheck@svgcheck-69fc5956dd-p7h7t:~$ apt-cache policy librsvg2-bin
librsvg2-bin:
  Installed: 2.40.21-0+deb9u1
  Candidate: 2.40.21-0+deb9u1
  Version table:
 *** 2.40.21-0+deb9u1 100
        100 /var/lib/dpkg/status
tools.svgcheck@svgcheck-69fc5956dd-p7h7t:~$ dpkg -l | grep svg
ii  librsvg2-2:amd64              2.40.21-0+deb9u1                                            amd64        SAX-based renderer library for SVG files (runtime)
ii  librsvg2-bin                  2.40.21-0+deb9u1                                            amd64        command-line and graphical viewers for SVG files
ii  librsvg2-common:amd64         2.40.21-0+deb9u1                                            amd64        SAX-based renderer library for SVG files (extra runtime)

So I think this issue can be closed as resolved?

You are the author, so I think if you are satisfied with the explanation, then yes it can be closed.

JoKalliauer claimed this task.

You are the author, so I think if you are satisfied with the explanation, then yes it can be closed.

Currently the reported issue is resolved (imho by accident), but there is no decision/intention of keeping them "in sync" or not. I would reopen the issue if they differ again.