Closed Bug 1746153 Opened 3 years ago Closed 2 years ago

Pausing the JS execution in the MBT for a while causes a disconnect and the currently selected tab to crash

Categories

(DevTools :: General, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Attachments

(1 file)

Attached patch Patch to apply for reproduction (deleted) — Splinter Review

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0 ID:20211212214735

I can see a regular disconnect of the MBT when keeping the JS execution paused for a while within an observer callback. As result the currently active tab in the browsing window also crashes.

Steps:

  1. Apply the attached patch to mozilla-central. If it fails use eg. the changeset c4514bad8a09
  2. Build Firefox
  3. Start Firefox with mach run --remote-debugging-port --setpref="remote.log.level=Trace" --setpref="remote.log.truncate=false"
  4. Use another Firefox profile and open https://client-bidi-demo-sep21.glitch.me/
  5. Enter localhost:9222 as connection details, connect and click both send buttons in order to create a new BiDi session and subscribe to the command
  6. The terminal output should show a new connection now.
  7. Go back to the Firefox instance as started in step 3.
  8. Open the MBT
  9. Switch back to Firefox and open a new tab
  10. Check that the debugger halted on the line with the debugger statement
  11. Wait for about a minute to check if a disconnect happens
  12. If not, continue execution, and repeat step 9 and following

When the MBT disconnects lines like the following are visible:

> console.error: "Error in enumIndexedProperties" (new Error("Connection closed, pending request to server1.conn0.contentProcess49643/obj202, type enumProperties failed\n\nRequest stack:\nrequest@resource://devtools/shared/protocol/Front.js:292:14\ngenerateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19\nenumProperties@resource://devtools/client/fronts/object.js:154:18\nenumIndexedProperties@resource://devtools/client/shared/components/object-inspector/utils/client.js:12:40\nloadItemProperties@resource://devtools/client/shared/components/object-inspector/utils/load-properties.js:62:19\nloadObjectProperties@resource://devtools/client/debugger/src/client/firefox/commands.js:50:49\nsetPreview/<@resource://devtools/client/debugger/src/actions/preview.js:138:37\n", "resource://devtools/shared/protocol/Front.js", 106))

There is no crash information available when the tab crashes.

Whiteboard: [devtools-triage]

ni: Need to check if this still happens and maybe find shorter STRs

Flags: needinfo?(jdescottes)
Component: Inspector → General
Flags: needinfo?(jdescottes)

Didn't mean to clear the ni

Flags: needinfo?(jdescottes)
Whiteboard: [devtools-triage]

Henrik, can you still reproduce this?
Any chance to get simpler STRs?

Flags: needinfo?(hskupin)

I paused for 1 hour on google docs, in a very active firefox session with many tabs without being able to witness any crash.
I suspect that some code unrelated to DevTools ends up causing a crash by navigating or closing the tab.
We might also have addressed something while working on the enabling of the MBT...

This bug doesn't sounds actionable with the current STR.
Feel free to reopen if you re-witness a crash while being paused.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(jdescottes)
Resolution: --- → WORKSFORME

Just had the chance to check the steps in some kind of updated form that applies to our current code and I'm not able to see the crash anymore.

Flags: needinfo?(hskupin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: