Page MenuHomePhabricator

Error 429, Too Many Requests for specific SVG file due to librsvg throwing "rendering error: NoMemory"
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
On the left side, there are 3 medals with yellowish background, the second one is not visible, instead you see a "broken" image.

When I do some right-click … open image I see:
Error
Too Many Requests

If you report this error to the Wikimedia System Administrators, please include the details below.

Request from 2a02:908:1610:9340:230:48ff:fed6:9cfa via cp3078 cp3078, Varnish XID 385960027
Upstream caches: cp3078 int
Error: 429, Too Many Requests at Tue, 19 Nov 2024 09:50:44 GMT


Yesterday, late evening (UTC) the first and the second image showed that error, for the first image it is gone now.

When I open the image on commons, I see no preview image (second image, currently bad)
https://commons.wikimedia.org/wiki/File:Asiatischer_Monat_2020_Silbermedaille.svg

When I open the first image on commons, I also see no image:
https://commons.wikimedia.org/wiki/File:Asiatischer_Monat_2019_Goldmedaille.svg

What causes this problem and how to prevent it?

Event Timeline

What causes this problem

HTTP 429 is a result of repeated failures to render the image.

and how to prevent it?

Investigating and fixing the underlying issue. :)

This appears to be a problem with the image: rsvg-convert returns rendering error: NoMemory (which is a bit misleading). My understanding of SVG internals is relatively limited but it seems like the line patternTransform="matrix(0.142 -0.0168 -0.0205 -0.1008 -91816.0078 -14072.0449) is a recurrence of T292439

The problem also occurs locally with librsvg 2.52.3, but does not occur with 2.40.21 on https://svgcheck.toolforge.org/index.php. I assume a regression in librsvg.

The problem does not occur locally on small resolutions (e.g. 23x27 px).

I can reproduce the problem locally with latest librsvg 2.59.1 on Fedora 41 so might be worth to upstream to https://gitlab.gnome.org/GNOME/librsvg/-/issues/ if not already existing there:

ak@ac:~/$ wget https://upload.wikimedia.org/wikipedia/commons/d/d0/Asiatischer_Monat_2019_Goldmedaille.svg
ak@ac:~/$ RUST_BACKTRACE=full rsvg-convert -w 200 -f png -u -o Asiatischer_Monat_2019_Goldmedaille.png Asiatischer_Monat_2019_Goldmedaille.svg 
Error rendering SVG Asiatischer_Monat_2019_Goldmedaille.svg: rendering error: NoMemory
ak@ac:~/$ rpm -q librsvg2
librsvg2-2.59.1-1.fc41.x86_64

Only potentially related one in upstream I found is https://gitlab.gnome.org/GNOME/librsvg/-/issues/658

Aklapper renamed this task from Error 429, Too Many Requests for some image to Error 429, Too Many Requests for specific SVG file due to librsvg throwing "rendering error: NoMemory".Wed, Nov 20, 4:13 PM