Page MenuHomePhabricator

Something Strange with SVG
Closed, ResolvedPublic

Description

Author: dasch

Description:
File::transform: Doing stat for /var/www/web0/html/images/thumb/3/3c/BSicon_STR.svg/20px-BSicon_STR.svg.png
SvgHandler::doTransform: rsvg --width=20 --height=20 --format=png '/var/www/web0/html/images/3/3c/BSicon_STR.svg' '/var/www/web0/html/images/thumb/3/3c/BSicon_STR.svg/20px-BSicon_STR.svg.png' 2>&1
wfShellExec: '/var/www/web0/html/bin/ulimit4.sh' 120 102400 102400 'rsvg --width=20 --height=20 --format=png '\''/var/www/web0/html/images/3/3c/BSicon_STR.svg'\'' '\''/var/www/web0/html/images/thumb/3/3c/BSicon_STR.svg/20px-BSicon_STR.svg.png'\'' 2>&1'
thumbnail failed on v5697.vanager.de: error 126 "" from "rsvg --width=20 --height=20 --format=png '/var/www/web0/html/images/3/3c/BSicon_STR.svg' '/var/www/web0/html/images/thumb/3/3c/BSicon_STR.svg/20px-BSicon_STR.svg.png' 2>&1"

This is the Text from my Debugger
don't know what to do with this.


Version: 1.14.x
Severity: trivial

Details

Reference
bz14336

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 10:10 PM
bzimport set Reference to bz14336.
bzimport added a subscriber: Unknown Object (MLST).

dasch wrote:

when using the given command in the command line everything works fine

dasch wrote:

I think there is somehow a permissionproblem with the commands from ulimit4.sh the the ulimit4.sh is on 777 an rsvg is also usable for everybody, maybe somebody should create a workaround for this Problem for the MediaWiki Page, I think there could be many people running into this problem an giving up because there is nothing you can find about this error

dasch wrote:

My "Patch", after changing this the problem is gone

Index: GlobalFunctions.php

  • GlobalFunctions.php (revision 35615)

+++ GlobalFunctions.php (working copy)
@@ -1821,7 +1821,7 @@

		$mem = intval( $wgMaxShellMemory );
		$filesize = intval( $wgMaxShellFileSize );
  • if ( $time > 0 && $mem > 0 ) {

+ if ( $time > 0 && $mem > 0 && true==false) {

			$script = "$IP/bin/ulimit4.sh";
			if ( is_executable( $script ) ) {
				$cmd = escapeshellarg( $script ) . " $time $mem $filesize " . escapeshellarg( $cmd );

dasch wrote:

Could be useful to creating an option to disable ulimit

<sarcasm> Yeah, good idea Siebrand. Let's patch that one in right away. </sarcasm>

DaSch: please check your open_basedir/safe_mode settings.

dasch wrote:

well how I already said, the problem is with ulimit, because when deactivating the use of ulimit it works

I've already comitted the patch on my Patchbug that was misschanged to Generate Sitemap (https://bugzilla.wikimedia.org/show_bug.cgi?id=14397)

that's nothing with basedir of safemode only that ulimit does not work, so well not it works for me with this patch, now it's your turn to face the problem or close it right now because it does not matter for you

If open_basedir is set to allow you to execute rsvg but not ulimit4.sh, then the symptoms would be more or less as you described. The ulimit script is important, because it stops rsvg from using large amounts of memory, sending your server into swap death, which it will happily do given half a chance.

dasch wrote:

I fixed the problem for me by disabling ulimit, now everything works fine, see the patch in the bug marked as duplicate

*** This bug has been marked as a duplicate of bug 14397 ***

dasch wrote:

Well, i reverted my mediawiki to use ulimit every time. I deactivated safemode and all open_baesdir restrictions but rsvg does not work

dasch wrote:

still the same as a year ago, the whole ulimit sh... does not work, no open_basedir no safe mode and it only works in commandline

dasch wrote:

when deactivating ulimit again most things work fine, only images with special-characters does not work

dasch wrote:

the whole thumbnailing and comandline scripting is very buggy and the documentation is very bad

Restricted Application added subscribers: Steinsplitter, Matanya. · View Herald Transcript