heroku-buildpack-vips icon indicating copy to clipboard operation
heroku-buildpack-vips copied to clipboard

ImageMagick core dumped

Open automata opened this issue 10 years ago • 4 comments

While using sharp to resize a GIF file, it uses ImageMagick that unexpectedly breaks with a Illegal instruction (core dumped) while trying to read the GIF and extract metadata.

We debugged and the backtrace is available here.

It seems the bundled ImageMagick uses AVX instructions that aren't available at Heroku cedar-14. We will try to rebuild ImageMagick without AVX support.

automata avatar Mar 30 '15 21:03 automata

It's possible to reproduce the same error just using ImageMagick's convert:

~ $ ./vendor/vips/bin/convert foo.gif
Illegal instruction (core dumped)

automata avatar Mar 30 '15 22:03 automata

We rebuilt ImageMagick without AVX support (./configure --prefix=$OUTPUT_PATH --with-gcc-arch) and both convert and sharp works.

automata avatar Mar 30 '15 22:03 automata

Thanks a lot for this, I'm going to rebuild our image with that flag so it works fine on cedar 14 ;)

alex88 avatar Mar 31 '15 07:03 alex88

@automata can you please provide a sample app in which convert is broken? I've tried to use my latest buildpack version (the last tag) and it works fine, no core dump

alex88 avatar Mar 31 '15 08:03 alex88