PNG crashes my PHP w/ imagick. Can you give it a try?

AlexT

Well-known member
On my test server I use PHP with imagick (v6.6.0, not the latest I know). While doing some tests with xF, I stumbled over this PNG file that made my PHP-FPM processes crash (SIGABRT). I never had this happen with GD, but since imagick is supposed to generate superior tumbnails, I thought to give it a try...

Could you try attached PNG and see if it works for you if you use imagick? I may upgrade the test server to run a later version of imagick, but for now I am a bit taken aback how one PNG could crash the whole PHP process.
 

Attachments

  • failure.webp
    failure.webp
    37.5 KB · Views: 49
Tried on my Nginx and PHP 5.4 PHP-FPM server with and ImagicK and your image failed. It's the image that is problem. I did a screen capture copy of image and named it failure_new.png and that processed fine in Xenforo

using ImagicK 3.1.0RC2 php extension and ImagicK 6.5.4.7-6.el6_2
 

Attachments

  • failure_new.webp
    failure_new.webp
    37.7 KB · Views: 30
Thanks for testing. Yes, it's the image that is crashing imagick, but it really shouldn't do that. Anyone could upload that image and (maliciously) start crashing someone's PHP processes.

I have been using GD for over ten years, and never did I encounter something like this. It shouldn't crash. If it doesn't like the PNG for whatever reason (GD is OK with it, various image viewers I tried are OK with it), it should send a failure return code. I am too lazy to compile imagick and its PHP extension with debug symbols, but I was still interested if this apparent bug had been fixed in later versions.

It's too bad. Despite imagick being said to produce superior thumbnail results, I will most likely go back to GD.
 
Did you check the PHP FPM logs? It normally respawns new children when the process crashesoso you don't necessarily notice the crash.
 
Top Bottom