Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV crashes in production

Hi,

I am running an application in production and I see by python process getting killed while performing opencv imdecode. Now 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 renable other image formats as well. I am need for recommendations on the checks to make sure image decode doesn't take away all me memory or makes my service prone to DOS attacks.

Thanks, Anand

OpenCV crashes in production

Hi,

I am running an application in production and I see by my python process getting killed crash while performing opencv imdecode. Now 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 renable 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 me my memory or makes my service prone to DOS attacks.

Thanks, Anand