Closed Bug 1537657 Opened 6 years ago Closed 6 years ago

Paused workers stay as zombies on page refresh

Categories

(DevTools :: Debugger, defect)

defect
Not set
critical

Tracking

(firefox-esr60 unaffected, firefox66 wontfix, firefox67 wontfix, firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: Harald, Assigned: bhackett1024)

References

Details

(Keywords: regression)

Attachments

(3 files)

Attached image image.png

What were you doing?

  1. Open Debugger on https://tuner.cloud/
  2. Open the worker file webpack:///pitchfinder-worker.js and set a breakpoint in the message handler
  3. Wait for the breakpoint to be hit (sing a song or tune your guitar)
  4. Refresh

What happened?

Worker list expands on each refresh.

(Bonus: Breakpoints panel stays empty as well, while reason shows Paused on Breakpoint)

What should have happened?

Only latest worker gets shown, list gets cleared on page refresh.


Original source: https://github.com/digitarald/chromatic-tuner-web-app

Attached video Annotated recording

I am able to reproduce it. Also note that line BP marker is missing in the BP gutter after refresh. It's visible in the recording, but not explicitly mentioned here.

Honza

When trying this test case I've also noticed bug 1537748

Honza

Brian, do you have thoughts on this?

Flags: needinfo?(bhackett1024)

Are we just failing to resume the workers so they never get detached/destroyed?

Paused workers are not resumed when navigating, but I don't think that just telling them to resume is the right fix: they could pause at a breakpoint somewhere else (or an unpaused worker could pause at a breakpoint before it is destroyed) and will not finish shutting down.

The patch I'm about to post takes care of this by detaching from all worker threads when navigating. This unpauses the worker threads and should prevent them from pausing anywhere else, and keeps the threads from piling up when refreshing.

Flags: needinfo?(bhackett1024)
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/75634ae8f7c5 Detach from workers when navigating, r=loganfsmyth.
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/69a4cc3f97e8 Detach from workers when navigating, r=loganfsmyth.
Flags: needinfo?(bhackett1024)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Assignee: nobody → bhackett1024
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: