Closed Bug 1051813 Opened 12 years ago Closed 12 years ago

Crash in webmaker-mediasync when searching for media

Categories

(Webmaker Graveyard :: DevOps, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jon, Assigned: jon)

Details

Attachments

(3 files)

I've been getting a bunch of emails about this while I'm on PTO. Lets investigate it. It happened on: Mon Aug 11 08:11:23 UTC 2014 Sun Aug 10 04:57:22 UTC 2014
i-465c816a on Mon Aug 11 20:25:21 UTC 2014
found this: { "_index": "logstash-2014.08.11", "_type": "logs", "_id": "8rJW4giYQ5-rwq_iDvn7ZQ", "_score": null, "_source": { "host": "i-465c816a", "short_message": "Cannot read property 'results' of undefined", "facility": "butter-production", "file": "/var/www/butter/node_modules/webmaker-mediasync/lib/services/flickr.js", "line": "145", "@version": "1", "@timestamp": "2014-08-11T20:19:46.717Z", "source_host": "10.232.59.151", "err.message": "Cannot read property 'results' of undefined", "err.name": "TypeError", "err.stack": "TypeError: Cannot read property 'results' of undefined\n at /var/www/butter/node_modules/webmaker-mediasync/lib/mediasync.js:44:34\n at /var/www/butter/node_modules/webmaker-mediasync/lib/services/index.js:44:20\n at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:229:13\n at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:110:21\n at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:24:16\n at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:226:17\n at Request._callback (/var/www/butter/node_modules/webmaker-mediasync/lib/services/flickr.js:145:7)\n at Request.self.callback (/var/www/butter/node_modules/webmaker-mediasync/node_modules/request/index.js:148:22)\n at Request.emit (events.js:98:17)\n at Request.<anonymous> (/var/www/butter/node_modules/webmaker-mediasync/node_modules/request/index.js:876:14)", "tags": [ "gelf_message" ] }, "sort": [ 1407788386717, 1407788386717 ] }
Flags: needinfo?(schranz.m)
:cade - When this crashes again, could you pull the search request directly before this crash? Would be good to test a fix for this.
Flags: needinfo?(cade)
Summary: butter-production-elb CRITICAL - Instance i-9b20f9c8 in OutOfService state → Crash in webmaker-mediasync when searching for media
Attachment #8471176 - Flags: review?(schranz.m)
Attachment #8471176 - Flags: review?(cade)
Flags: needinfo?(schranz.m)
Lol wat? this caused it. referrer: https://popcorn.webmaker.org/en-US/editor/102877/edit It appears the user tried at least three or four times to do this.
Flags: needinfo?(cade)
Dropping this data URI into the media search will cause a fatal exception in flickr response handler code.
Attachment #8471618 - Attachment mime type: text/plain → image/jpeg
Attachment #8471618 - Attachment mime type: image/jpeg → text/plain
Comment on attachment 8471176 [details] [review] https://github.com/mozilla/webmaker-mediasync/pull/12 I think the patch is a sane solution, although I'm wondering if we should take precautions against this kind of search. Perhaps we could check if the query given is a data URI at the beginning of the process and if so bail early there with a failed response?
Attachment #8471176 - Flags: review?(schranz.m) → review+
Comment on attachment 8471176 [details] [review] https://github.com/mozilla/webmaker-mediasync/pull/12 I dug into this a bit. Sadly, the response from twitter is a 414 masquerading as a 200 :/ <html>\r\n<head><title>414 Request-URI Too Large</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>414 Request-URI Too Large</h1></center>\r\n<hr><center>nginx/1.4.4</center>\r\n</body>\r\n</html> which brings us to the end of the Flickr service callback: callback( new Error( "[webmaker-mediasync]: Something went horribly wrong." )); we should make sure a more meaningful error is passed back to the client. r- to fix up a missing semi-colon, and to see if you think some work in the Flickr service is warranted.
Attachment #8471176 - Flags: review?(cade) → review-
TypeError: Cannot read property 'results' of undefined at /var/www/butter/node_modules/webmaker-mediasync/lib/mediasync.js:44:34 at /var/www/butter/node_modules/webmaker-mediasync/lib/services/index.js:44:20 at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:229:13 at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:110:21 at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:24:16 at /var/www/butter/node_modules/webmaker-mediasync/node_modules/async/lib/async.js:226:17 at Request._callback (/var/www/butter/node_modules/webmaker-mediasync/lib/services/flickr.js:145:7) at Request.self.callback (/var/www/butter/node_modules/webmaker-mediasync/node_modules/request/index.js:148:22) at Request.emit (events.js:98:17) at Request.<anonymous> (/var/www/butter/node_modules/webmaker-mediasync/node_modules/request/index.js:876:14) That one just brought us down on popcorn.
This is fixed on staging, pushing to prod
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
\O/
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: