When attempting to read the EXIF data for some images, the python process using piexif will appear to hang and eventually will consume all available memory.
>>> im = Image.open("GettyImages_539746540.jpg")
>>> exif_dict = piexif.load(im.info["exif"])
Killed
^ The Killed message is happening because the code above is running in a docker container and gets killed when it exceeds it's memory boundary. On a server without docker, the process simply consumes all memory until the server crashes.
Here is an image with bad EXIF data which cause the issue above.
cc @hMatoba Please let me know if you intend to do any more work on this library. It's ok if you're not - but it would be helpful to know as soon as possible. Thanks!
When attempting to read the EXIF data for some images, the python process using
piexif
will appear to hang and eventually will consume all available memory.^ The
Killed
message is happening because the code above is running in a docker container and gets killed when it exceeds it's memory boundary. On a server without docker, the process simply consumes all memory until the server crashes.Here is an image with bad EXIF data which cause the issue above.![GettyImages_539746540](https://user-images.githubusercontent.com/142910/59637989-63b9b880-9114-11e9-8fa3-492fc2468418.jpg)
I've also attached a zipped version, just in case Github processes images. GettyImages_539746540.jpg.zip
This library is used in the thumbor project so the bug described above is a huge problem.