Closed
Bug 1172157
Opened 9 years ago
Closed 9 years ago
Profiler returning malformed JSON
Categories
(DevTools :: Performance Tools (Profiler/Timeline), defect)
DevTools
Performance Tools (Profiler/Timeline)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: vporof, Assigned: shu)
Details
Attachments
(1 file, 1 obsolete file)
1.73 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
error occurred while processing 'getProfile: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data Stack: ProfilerActor.prototype.onGetProfile@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/profiler.js:182:19 DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1469:15 LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:569:11 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 Line: 182, column: 18 onPacket threw an exception: Error: Server did not specify an actor, dropping packet: {"error":"unknownError","message":"error occurred while processing 'getProfile: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data\nStack: ProfilerActor.prototype.onGetProfile@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/profiler.js:182:19\nDSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1469:15\nLocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:569:11\nmakeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14\nmakeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14\nLine: 182, column: 18"} Stack: DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:968:1 LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:569:11 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 Line: 968, column: 0
Reporter | ||
Comment 1•9 years ago
|
||
Happened while profiling this page.
Comment 2•9 years ago
|
||
Was it a fresh-ish instance or one running for a few hours/days? Saw an exception in C++ with similar but assumed it was me.
Flags: needinfo?(shu)
Updated•9 years ago
|
Summary: Finished recording hangs while loading with error "Server did not specify an actor, dropping packet: " → Profiler returning malformed JSON
Reporter | ||
Comment 3•9 years ago
|
||
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #2) > Was it a fresh-ish instance or one running for a few hours/days? > > Saw an exception in C++ with similar but assumed it was me. A few hours old firefox.
Assignee | ||
Comment 4•9 years ago
|
||
Saves malformed JSON to ~/bad-profile.json. We'll back this out after catching where the parse error is exactly.
Assignee | ||
Updated•9 years ago
|
Attachment #8616281 -
Flags: review?(bgirard)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → shu
Status: NEW → ASSIGNED
Flags: needinfo?(shu)
Assignee | ||
Comment 5•9 years ago
|
||
I wonder if it's bug 1167895.
Comment 6•9 years ago
|
||
Comment on attachment 8616281 [details] [diff] [review] Save malformed profile JSON to file to help debug. Review of attachment 8616281 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/profiler/TableTicker.cpp @@ +230,5 @@ > + if (homePath) { > + nsCString path; > + path.Append(homePath); > + path.Append('/'); > + path.Append("bad-profile.json"); I don't like the idea of writing files on people' disk. The nightly population is much more than just mozilla employees. This is used by devtools now so a lot of people can hit this code. This would be a bit better if we wrote this out in the profile directory. How about just sending it to stdout? It's not that uncommon so we should watch stdout.
Attachment #8616281 -
Flags: review?(bgirard) → review-
Assignee | ||
Comment 7•9 years ago
|
||
Write out to a temp dir instead.
Attachment #8616281 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8616832 -
Flags: review?(bgirard)
Comment 8•9 years ago
|
||
Comment on attachment 8616832 [details] [diff] [review] Save malformed profile JSON to file to help debug. Review of attachment 8616832 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Might want to add a notification to stdout.
Attachment #8616832 -
Flags: review?(bgirard) → review+
Comment 9•9 years ago
|
||
Can we have a pref that specifies a path to dump this too? Then we can opt in
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #9) > Can we have a pref that specifies a path to dump this too? Then we can opt in I was planning on backing this out when we actually catch the error. Too much work for a temporary thing.
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #8) > Comment on attachment 8616832 [details] [diff] [review] > Save malformed profile JSON to file to help debug. > > Review of attachment 8616832 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good. Might want to add a notification to stdout. Sure, will do.
Assignee | ||
Updated•9 years ago
|
Keywords: leave-open
Assignee | ||
Comment 14•9 years ago
|
||
I asked Jordan and Victor in person about seeing any dumped malformed profiles, and they didn't see any. Benoit and Markus, have you seen any?
Flags: needinfo?(mstange)
Flags: needinfo?(bgirard)
Comment 15•9 years ago
|
||
I haven't seen this since this landed, seems fixed to me.
Flags: needinfo?(mstange)
Comment 16•9 years ago
|
||
Yes I haven't seen it either. I've checked a few times in the past and again today. Looks like this no longer fails for some reason.
Flags: needinfo?(bgirard)
Assignee | ||
Comment 18•9 years ago
|
||
Nobody has seen any bad profiles for a while. Backed out temporary dumping patch in https://hg.mozilla.org/integration/mozilla-inbound/rev/004e8bb3f339
Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Comment 19•9 years ago
|
||
I can reproduce this issue with Firefox 40.0.2 on 64bit Linux by running a runtime analysis on this Bugzilla page (open this page, start runtime analysis, refresh page, end runtime analysis, see exception in .xsession-errors). Here's the log output: onPacket threw an exception: Error: Server did not specify an actor, dropping packet: {"error":"unknownError","message":"error occurred while processing 'getProfile: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data\nStack: ProfilerActor.prototype.onGetProfile@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/profiler.js:182:19\nDSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1456:15\nLocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11\nmakeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14\nmakeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14\nLine: 182, column: 18"} Stack: DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:944:1 LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 Line: 944, column: 0
Comment 20•9 years ago
|
||
Seems like this issue is related to an Add-In (uBlock Origin). Here's the related issue: https://github.com/gorhill/uBlock/issues/627
Comment 21•9 years ago
|
||
Looks like the fix for this (bug 1167895) only landed in Firefox 41, not in 40. So unfortunately it looks like this is going to stay unfixed until Firefox 41 will be released.
Comment 22•6 years ago
|
||
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•