Quick teardown of workers causes Debugger to fail loading
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: Harald, Assigned: bhackett1024)
References
Details
(Whiteboard: [debugger-mvp])
Attachments
(4 files, 1 obsolete file)
What were you doing?
- Open Debugger on https://worker-teardown.glitch.me/
What happened?
Debugger doesn't load, stays gray.
What should have happened?
Debugger loads.
Anything else we should know?
Flurry of 1 error and 2 types of warnings keeps showing up in Browser Console:
Error while detaching the thread front: No such actor for ID: server1.conn1.child1/workerTarget1064/context1 target-mixin.js:555:21
Handler function DebuggerClient.requester threw an exception: Error: resume command sent while not paused. Currently attached
Stack: _assertPaused@resource://devtools/shared/client/thread-client.js:55:13
before@resource://devtools/shared/client/thread-client.js:80:12
DebuggerClient.requester/<@resource://devtools/shared/client/debugger-client.js:103:31
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:109:22
resume@resource://devtools/shared/client/thread-client.js:122:17
updateWorkerClients@resource://devtools/client/debugger/src/client/firefox/workers.js:42:20
Line: 55, column: 13 ThreadSafeDevToolsUtils.js:88:13
Error while detaching target: undefined target-mixin.js:547:21
Error while detaching the thread front: No such actor for ID: server1.conn1.child1/workerTarget1070/context1 target-mixin.js:555:21
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
I'll look into fixing the error messages, but I see these in the usual case when closing a page with workers or after a worker is terminated, and they don't necessarily indicate a problem.
The debugger loads fine on the page for me, though. Does this still happen for you on tip? Can you paste a complete log from the browser console or from running firefox from a terminal (the errors should be printed to stderr).
Reporter | ||
Comment 3•6 years ago
|
||
It isn't easy reproduce it with the example now. It worked for me 3 times and I had to re-open Debugger once to hit it.
Another sign that the Debugger stopped working is that it does load the Debugger but doesn't show Threads anymore. Browser Console warnings for this case were:
Error while detaching the thread front: 'detach' request packet to 'server1.conn9.child1/context17' can't be sent as the connection is closed. target-mixin.js:555:21
Error while detaching target: undefined target-mixin.js:547:21
Error while detaching the thread front: No such actor for ID: server1.conn10.child1/workerTarget47/context1 target-mixin.js:555:21
Error while detaching target: undefined 2 target-mixin.js:547:21
Error while detaching target: undefined 2 target-mixin.js:547:21
Error while detaching the thread front: No such actor for ID: server1.conn10.child1/workerTarget49/context1 target-mixin.js:555:21
Error while detaching the thread front: No such actor for ID: server1.conn10.child1/workerTarget50/context1 target-mixin.js:555:21
Error while detaching the thread front: No such actor for ID: server1.conn10.child1/workerTarget48/context1 target-mixin.js:555:21
Error while detaching the thread front: No such actor for ID: server1.conn10.child1/workerTarget54/context1 target-mixin.js:555:21
Error while detaching the thread front: 'detach' request packet to 'server1.conn10.child1/context17' can't be sent as the connection is closed. target-mixin.js:555:21
Have to reproduce on a fresh profile to get the stderr.
Assignee | ||
Comment 4•6 years ago
|
||
Depends on D28931
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D28932
Assignee | ||
Comment 6•6 years ago
|
||
OK, thanks, I was able to reproduce this by tweaking the test case to create/destroy workers more frequently. The messages above are all just noise, actually, and printed out when we successfully recover from a protocol error due to a terminated worker thread. Part 2 adds a preference to stop printing those. The actual problem was due to a promise rejection after receiving an error from the server in debugger-client.js, and either wasn't being printed at all or was being printed as a very subtle console.error() call. I'd like to understand sometime why we don't print out these unhandled rejections, because they are a leading cause of debugger breakage in my experience.
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1ebc89e3ad97
https://hg.mozilla.org/mozilla-central/rev/30b551b1a212
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
This got backed out:
https://hg.mozilla.org/integration/mozilla-inbound/rev/618d85aa18ee8402d69354e4980939fb89521436
Check the XPCshell (X) and devtools (dt) failures.
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Assignee | ||
Comment 14•6 years ago
•
|
||
I didn't land the pref here because it caused some weird xpcshell failures and I wasn't feeling very motivated to figure them out.
Updated•6 years ago
|
Comment 15•5 years ago
|
||
In an attempt to verify the fix, I was able to reproduce with 67.0.4 after spamming the open/close DevTools key (F12) with the Debugger tab in focus.
After a quick check with 68.0b13, 69.0a1 (2019-06-30) there was a different behavior as per the description, the whole tab crashed.
Adding a recording with this comment and will post the log bellow.
Comment 16•5 years ago
|
||
@Brian, mind taking a look at this as well?
Is it something that needs to be filed separately or part of the fails mentioned in comment #14?
Thank you!
Comment 17•5 years ago
|
||
Assignee | ||
Comment 18•5 years ago
|
||
Sorry for the late reply. The errors in the log are pretty innocuous, those are often printed if the devtools shut down while user interactions are still being handled. Did you get a crash report for the tab crash?
Comment 19•5 years ago
|
||
Description
•