"display" in 6.8.3.10 consumes all memory

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Quintus
Posts: 1
Joined: 2013-03-23T03:53:47-07:00
Authentication code: 6789

"display" in 6.8.3.10 consumes all memory

Post by Quintus »

Hi there,

I’m using 64-bit Arch Linux and yesterday updated my system, thereby also updating imagemagick from 6.8.2.3 to 6.8.3.10. I’m using i3 as a leightweight tiling window manager and have imagemagick’s display utility draw my desktop background that would otherwise just be a boring black area. The command I use to draw the background is executed by i3 on startup and looks as follows:

Code: Select all

display -window root /home/quintus/Bilder/Hintergründe/Hintergrund.jpg
Where the path obviously is the background image to be drawn. I also have a multi-monitor setup, one small monitor and one large, next to each other. As I couldn’t figure out a way to call display multiple times to draw at different areas of the root window (namely on the left monitor and on the right one) I used the GIMP to create one large background image that is exactly the size of the root window, with the invisible part (the two monitors have different resolutions) just painted in pink as I don’t see it anyway. Until yesterday this worked just fine, displaying the left part of the image on the left monitor and the right one on the right. However, since I updated imagemagick, the display command above doesn’t exit at all (but nevertheless properly draws the image onto the root window), but continues to run and run and run, consuming both CPU and RAM, until it finally eats up my entire 8GiB of RAM plus the 4GiB of Swap I have, rendering the system entirely unusable. In order to ensure no other package updates came into effect somehow, I downgraded just the imagemagick package again and restarted i3. It now worked fine again, with display exiting directly after the drawing operation is completed and not consuming enourmous amounts of RAM. I also noted that Conky was heavily flickering while the new display was running.

The last working version of display is this one:

Code: Select all

% display -version
Version: ImageMagick 6.8.2-3 2013-02-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib fontconfig freetype gslib jng jp2 jpeg lcms lqr lzma openexr pango png ps rsvg tiff wmf x xml zlib
from this package:

Code: Select all

% LANG=en_US.utf8 pacman -Qi imagemagick 
Name           : imagemagick
Version        : 6.8.2.3-1
URL            : http://www.imagemagick.org/
Licenses       : custom
Groups         : None
Provides       : None
Depends On     : perl  libltdl  lcms2  libxt  fontconfig  libxext  liblqr
Optional Deps  : ghostscript: for Ghostscript support
                 openexr: for OpenEXR support
                 libwmf: for WMF support
                 librsvg: for SVG support
                 libxml2: for XML support
                 jasper: for JPEG-2000 support
                 libpng: for PNG support
Required By    : cuneiform  inkscape
Conflicts With : None
Replaces       : None
Installed Size : 9984.00 KiB
Packager       : Eric Belanger <eric@archlinux.org>
Architecture   : x86_64
Build Date     : Sun 03 Feb 2013 06:58:10 PM CET
Install Date   : Sat 23 Mar 2013 11:50:17 AM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Description    : An image viewing/manipulation program
The first buggy version is this one:

Code: Select all

% display -version
Version: ImageMagick 6.8.3-10 2013-03-19 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib fontconfig freetype gslib jng jp2 jpeg lcms lqr lzma openexr pango png ps rsvg tiff wmf x xml zlib
from this package:

Code: Select all

% LANG=en_US.utf8 pacman -Qi imagemagick
Name           : imagemagick
Version        : 6.8.3.10-1
URL            : http://www.imagemagick.org/
Licenses       : custom
Groups         : None
Provides       : None
Depends On     : perl  libltdl  lcms2  libxt  fontconfig  libxext  liblqr
Optional Deps  : ghostscript: for Ghostscript support
                 openexr: for OpenEXR support
                 libwmf: for WMF support
                 librsvg: for SVG support
                 libxml2: for XML support
                 jasper: for JPEG-2000 support
                 libpng: for PNG support
Required By    : cuneiform  inkscape
Conflicts With : None
Replaces       : None
Installed Size : 10380.00 KiB
Packager       : Eric Belanger <eric@archlinux.org>
Architecture   : x86_64
Build Date     : Wed 20 Mar 2013 04:39:03 AM CET
Install Date   : Sat 23 Mar 2013 12:23:08 PM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Description    : An image viewing/manipulation program
Exact kernel version:

Code: Select all

% uname -a
Linux hades 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64 GNU/Linux
X server version:

Code: Select all

% X -version

X.Org X Server 1.14.0
Release Date: 2013-03-05
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.8.2-1-ARCH x86_64 
Current Operating System: Linux hades 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux cryptdevice=/dev/disk/by-uuid/100d791f-2cd3-4c0b-9111-5e6e2ecb221a:arch root=/dev/mapper/arch ro init=/bin/systemd
Build Date: 09 March 2013  11:43:05AM
 
Current version of pixman: 0.28.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
If you need more info, please let me know. For now, I’ll pin my imagemagick package to the working old version.

Valete,
Marvin
v4hn
Posts: 1
Joined: 2013-03-23T12:33:30-07:00
Authentication code: 6789

Re: "display" in 6.8.3.10 consumes all memory

Post by v4hn »

Heya,

I've got the same problem over here, although it still draws the image.

I dug into this a bit and found that revision 10959 broke it severely:
It looks like a cleanup commit, but because the image is not changed at all if the next one is NULL,
the while loop draws the image over and over again.

Would be great to see this fixed soon!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: "display" in 6.8.3.10 consumes all memory

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.4-0 Beta available by sometime tomorrow. Thanks.
Post Reply