Page MenuHomePhabricator

$wgMaxShellMemory too low for stock ImageMagick on RHEL / CentOS 6
Closed, DeclinedPublic

Description

Author: lowzl

Description:
The stock ImageMagick shipped with RHEL / CentOS 6 is compiled with OpenMP, and this seems to vastly increase its (virtual) memory usage. The default setting for $wgMaxShellMemory, 100MB, is not even enough for convert to start up. Raising it to 1024MB only allows it to work on small images—convert segfaults on a 1,485 × 2,070 pixel, 1.79 MB JPEG. Given that this only limits *virtual* memory usage, and that this is (or, at least, will be) a common stock setup, perhaps it is worth considering changing the default value of $wgMaxShellMemory to 'unlimited', or otherwise changing what it means.


Version: unspecified
Severity: normal
OS: Linux

Details

Reference
bz30550

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:53 PM
bzimport set Reference to bz30550.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

changing the default value of $wgMaxShellMemory
to 'unlimited', or otherwise changing what it means.

That would create a great DoS attack vector: upload a big image, rescale it continuously to slightly different sizes, bang! By the way, RHEL and alikes are far from being recommended distros for MW due to retardedly old packages.

If ImageMagick is _that_ broken, simply don't use it. We may want to make $wgMaxShellMemory for installer limited to some sane value to detect broken IM by making it fail.

Ping Chad to get his opinion if this is something that Installer should do.

No, I don't think the installer should handle this...but that's just my opinion.

$wgMaxShellMemory is now 300MB. Giving that it's already a configurable setting, does this bug really need to remain open?

(In reply to Jesús Martínez Novo (Ciencia Al Poder) from comment #4)
Amen. Especially since packagers for these OSes can override this setting in installer.