Page MenuHomePhabricator

Loading/opening large images the server hangs
Open, LowPublic

Description

Author: vesely

Description:
In php.ini upload_max_filesize = 64M, the image is ~1.3M,
$wgMaxShellMemory and $wgMaxShellFileSize are at their
default value of 102400. Then the call to ImageMagick
is done through wfShellExec, which runs bin/ulimit4.sh.

This is probably an ImageMagick or, possibly, libgc1c2,
according to the following bug reports
https://bugzilla.redhat.com/show_bug.cgi?id=446929
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380727

As the convert executable hangs on a futex/wait, the cpu
time required to trigger the given ulimit is never reached.

Larger values for $wgMaxShellMemory and $wgMaxShellFileSize
will work.

Version: ImageMagick 6.2.4 02/10/07 Q16 http://www.imagemagick.org
ii libgc1c2 6.8-1 conservative garbage collector for C and C++

The following is the final part of stracing convert with debug

times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
write(1, "17:06:18 0:02 0.090u 6.2.4 Trace"..., 9317:06:18 0:02 0.090u 6.2.4 Trace convert[26928]: hashmap.c/AppendValueToLinkedList/164/Trace
) = 93
write(1, " ...\n", 6 ...
) = 6
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
brk(0x75a000) = 0x738000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
brk(0x75a000) = 0x738000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
brk(0x75b000) = 0x738000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
times({tms_utime=5, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 1865220765
brk(0x759000) = 0x738000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
futex(0x503150, FUTEX_WAIT, 2, NULL <unfinished ...>


Version: 1.13.x
Severity: normal
OS: Linux
Platform: Other

Details

Reference
bz17203

Event Timeline

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

Alessandro: Do you know if this still happens in a recent, supported version of MediaWiki?