Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2006 23:19:52 +0200
From:      Michael Ablassmeier <abi@grinser.de>
To:        freebsd-apache@freebsd.org
Subject:   apache2.2: convert: Memory allocation failed
Message-ID:  <20061023211952.GA4405@mail.schiach.de>

next in thread | raw e-mail | index | archive | help
hi,

im running apache-2.2.0_7 on 6.1-RELEASE within a jailed environment. PHP4 has
been compiled without Suhosin patch and its pretty much all in default
configuration, so no restrictions.

Now, the Problem: running gallery, which calls various ImageMagick binaries in
order to resize Images, fails with the following Error message in
httpd-error.log:

      [..]
	convert in free(): warning: junk pointer, too high to make sense
	convert in free(): warning: junk pointer, too high to make sense
	convert in free(): warning: junk pointer, too high to make sense
	convert: Memory allocation failed `Permission denied'.
      [..]

a hackish PHP script in order to reproduce this failure (note, the image size
has to be bigger than 150x150):

 <?
  system("convert -size 150x150 -quality 50 -thumbnail 150x150 1.jpg 2.jpg");
 ?>

now, this script does *not* fail if im calling it from php's cli interface
(with the same php.ini used). I can also easily convert the image calling
convert from some random shell. The interesting part is, i dont have to convert
something in order to reproduce this error, i can simply replace the above
convert call with

 <?
  system("convert -list resource"); [0]
 ?> 

in order to make it bail out. Any Ideas? I've been using apache2.0.x before and
never had any problems running Gallery at all (before upgrading to 6.1-RELEASE
and apache2.2). 


[0] abi@foo:~/public_html/conv> convert -list resource
    File       Area     Memory        Map       Disk
    ------------------------------------------------
    3.96875kb      488mb      366mb  1.90625gb        4eb

bye,
    - michael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061023211952.GA4405>