{"action":"closed","issue":{"url":"https://api.github.com/repos/thumbor/thumbor/issues/447","labels_url":"https://api.github.com/repos/thumbor/thumbor/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/thumbor/thumbor/issues/447/comments","events_url":"https://api.github.com/repos/thumbor/thumbor/issues/447/events","html_url":"https://github.com/thumbor/thumbor/issues/447","id":63289244,"number":447,"title":"Corrupted result storage crash request","user":{"login":"masom","id":438456,"avatar_url":"https://avatars.githubusercontent.com/u/438456?v=3","gravatar_id":"","url":"https://api.github.com/users/masom","html_url":"https://github.com/masom","followers_url":"https://api.github.com/users/masom/followers","following_url":"https://api.github.com/users/masom/following{/other_user}","gists_url":"https://api.github.com/users/masom/gists{/gist_id}","starred_url":"https://api.github.com/users/masom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masom/subscriptions","organizations_url":"https://api.github.com/users/masom/orgs","repos_url":"https://api.github.com/users/masom/repos","events_url":"https://api.github.com/users/masom/events{/privacy}","received_events_url":"https://api.github.com/users/masom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-20T19:35:59Z","updated_at":"2015-03-20T19:40:46Z","closed_at":"2015-03-20T19:40:46Z","body":"We just hit a few issues with some files that ended up being corrupted on disk.\r\n\r\nThumbor tries to load the result and determine the mime type. If the byffer contains invalid data the entire request is aborted.\r\n\r\nIdeally thumbor should continue without the result storage result.\r\n\r\n```\r\n» 19 Mar 2015 15:41:40.764 2015-03-19 19:41:41 thumbor:ERROR ERROR: Traceback (most recent call last):\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/tornado/web.py\", line 1320, in _stack_context_handle_exception\r\n» 19 Mar 2015 15:41:40.764 raise_exc_info((type, value, traceback))\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/tornado/web.py\", line 1503, in wrapper\r\n» 19 Mar 2015 15:41:40.764 result = method(self, *args, **kwargs)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/handlers/imaging.py\", line 100, in get\r\n» 19 Mar 2015 15:41:40.764 self.check_image(kw)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/handlers/imaging.py\", line 96, in check_image\r\n» 19 Mar 2015 15:41:40.764 return self.execute_image_operations()\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/handlers/__init__.py\", line 97, in execute_image_operations\r\n» 19 Mar 2015 15:41:40.764 self.filters_runner.apply_filters(thumbor.filters.PHASE_PRE_LOAD, self.get_image)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/filters/__init__.py\", line 81, in apply_filters\r\n» 19 Mar 2015 15:41:40.764 callback()\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/handlers/__init__.py\", line 122, in get_image\r\n» 19 Mar 2015 15:41:40.764 self._fetch(self.context.request.image_url, self.context.request.extension, callback)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/handlers/__init__.py\", line 372, in _fetch\r\n» 19 Mar 2015 15:41:40.764 callback(False, buffer=buffer)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/handlers/__init__.py\", line 109, in callback\r\n» 19 Mar 2015 15:41:40.764 engine.load(buffer, req.extension)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/engines/__init__.py\", line 91, in load\r\n» 19 Mar 2015 15:41:40.764 imageOrFrames = self.create_image(buffer)\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/thumbor/engines/pil.py\", line 52, in create_image\r\n» 19 Mar 2015 15:41:40.764 img = Image.open(BytesIO(buffer))\r\n» 19 Mar 2015 15:41:40.764 File \"/var/projects/popkey-thumbor/local/lib/python2.7/site-packages/PIL/Image.py\", line 2274, in open\r\n» 19 Mar 2015 15:41:40.764 % (filename if filename else fp))\r\n» 19 Mar 2015 15:41:40.764 IOError: cannot identify image file <_io.BytesIO object at 0x7f64c92cccb0>\r\n```"}}