OpenCV crashes in production
Hi,
I am running an application in production and I see my python process crash while performing opencv imdecode. Some of these images are bad images that usually crash the system but I need to make sure I gracefully handle this in my code and log the crash dump.
Can anyone provide suggestions on the best way to do this?
Also, I reduced the number of failures by only accepting JPEG and PNG images. I was seeing more failures with TIFF and JPEG2000s, but I would like to re-enable other image formats as well. I am in need for recommendations on the checks to make sure image decode doesn't take away all my memory or makes my service prone to DOS attacks.
Thanks, Anand
just curious, - what is your server doing ?
My server just tries to decode the image bytes. Those image bytes sometime try to allocate lot of memory and crash. Since it's a production server, I need to make sure that the memory footprint of my application is not unbounded.
I am now facing the issue for some JPEG2000 images. Did any found an answer?