Refreshing tab when on Slack, crashes the browser
Categories
(Core :: DOM: Service Workers, defect, P1)
Tracking
()
People
(Reporter: jonalmeida, Assigned: asuth)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(1 file, 2 obsolete files)
47 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
STR
- Log into a Slack group.
- When the page loads, refresh the page (I used Cmd + R, it that makes a difference).
Expected
- Refresh and don't crash.
Actual
- 💥
- Maybe a separate issue, but sites don't all load doesn't seem to work well.
This doesn't seem to happen on other pages in my brief testing.
Version: 71.0a1 (2019-09-25) (64-bit)
Crash log: https://crash-stats.mozilla.org/report/index/e298aa31-dcba-4308-8f71-7c6850190925
Reporter | ||
Comment 1•5 years ago
|
||
Disabled extensions and the issue stopped showing up. It seems it was related to the fx_cast extension I have which has a native component to it that might be related.
Feel free to close if there is nothing actionable to do on the browser side to avoid these kinds of crashes.
Reporter | ||
Comment 2•5 years ago
|
||
Ignore comment 1, the issue returned after disabling every extension individually. This is not related to any particular addon. Restarting in safe mode (which I had originally tried but didn't mention) seems to solve the problem.
Not sure what the difference is between safe mode and all addons disabled. ¯\_(ツ)_/¯
Comment 3•5 years ago
|
||
Seems similar to Bug 1370005, which was fixed a while back. The moz crash reason is MOZ_DIAGNOSTIC_ASSERT(!IsExclusive || !mHaveRequest) (Using an exclusive promise in a non-exclusive fashion). Not sure if this should move to Core | AV Playback, similar to Bug 1370005.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Dolske, can you help find an owner for this ? Sounds like it's easily reproducible. Or, do you think this should be in a different component?
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Hsin-Yi, we think this is more a dom issue, could you take a look at this please (or getting someone to look at it as per comment 4).
Comment 6•5 years ago
|
||
Not a DOM Core issue. ClientManager is more service worker related. And this isn't happening on the main thread.
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
This looks like another case of GenericPromise
(IsExclusive=true) being a bad name and default for an abstraction that imitates an abstraction with no such limitation.
Updated•5 years ago
|
Comment 8•5 years ago
|
||
(In reply to Andrew Sutherland [:asuth] (he/him) from comment #7)
This looks like another case of
GenericPromise
(IsExclusive=true) being a bad name and default for an abstraction that imitates an abstraction with no such limitation.
Does this regress from https://bugzilla.mozilla.org/show_bug.cgi?id=1456995?
Assignee | ||
Comment 9•5 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #8)
Does this regress from https://bugzilla.mozilla.org/show_bug.cgi?id=1456995?
Not directly, no. There could be some level of correlation, but this is Clients API stuff which is largely unaffected by parent-intercept. As such, uplift is likely appropriate.
Assignee | ||
Comment 10•5 years ago
|
||
This crash signature is too broad, but I'm not sure how to refine it appropriately. For example, it's also picking up:
- ClientSourceOpChild::DoSourceOp null deref:
- https://crash-stats.mozilla.org/report/index/d5010436-4779-455b-a698-d0f0f0191021
- Media illegal instructions crashes:
It seems like perhaps the frames that start with "mozilla::MozPromise" should be filtered out? Or at least those with the GenericPromise "T" value giving a prefix of mozilla::MozPromise<bool, nsresult, true>
, also the GenericNonExclusivePromise case of mozilla::MozPromise<bool, nsresult, false>
. In the media crashes, their template parameters are implementation specific, so could be differentiated on, although they're also fairly chatty. NI'ing :willkg for Socorro.
Comment 11•5 years ago
|
||
Andrew: I wrote up bug #1590194 to add mozilla::MozPromise<T>::ThenInternal
to the signature prefix list.
Assignee | ||
Comment 12•5 years ago
|
||
Although many Clients API usages are inherently exclusive (a specific claim
or control request), the execution-ready promise is shared by all requests
to get the state of a client that is not yet execution ready.
Assignee | ||
Comment 13•5 years ago
|
||
GenericPromise is a somewhat dangerous typedef because its name conceals that
it is exclusive, and an exclusive promise is in contradiction to the presumed
Promise semantics given that all JS Promises are non-exclusive.
This adds a GenericExclusivePromise typedef that's equivalent to the existing
GenericPromise typedef and tries to provide guidance to the existing
GenericPromise comments to use the more explicitly named version.
Depends on D49976
Assignee | ||
Comment 14•5 years ago
|
||
GenericExclusivePromise is a more explicitly named GenericPromise. The goal of
this conversion is to make it clear that these uses:
- Have been audited to some approximation and appear to be correctly and
intentionally exclusive. - Make it clear when we're writing new code that attempts to reuse these
promises may result in runtime problems. It's easy to gloss over
the type GenericPromise and not realize that it's exclusive.
In general, the ServiceWorker and Clients usages tend to fall into two usage
patterns:
- Single-use promise for a specific request. If content code makes multiple
requests, multiple promises are created. - Promises used under the hood, but are converted back to explicit callbacks
before the crossing into bindings.
Depends on D49977
Assignee | ||
Comment 15•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=59e5495e8030ea9f3f60f10c0decff70c3f40204
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Pushed by bugmail@asutherland.org: https://hg.mozilla.org/integration/autoland/rev/87c82b01a388 ExecutionReadyPromise should not be exclusive. r=perry
Comment 17•5 years ago
|
||
Backed out changeset 87c82b01a388 (Bug 1583859) for causing bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h CLOSED TREE
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=272322689&repo=autoland&lineNumber=23269
Comment 18•5 years ago
|
||
Backout by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2cd1797819f4 Backed out changeset 87c82b01a388 for causing bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h CLOSED TREE
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 19•5 years ago
|
||
One of my changes meant to be in D49976 ended up in D49980, and I was only landing D49976 but I'd tested with the full stack, so it went awry. Apologies.
Comment 20•5 years ago
|
||
Pushed by bugmail@asutherland.org: https://hg.mozilla.org/integration/autoland/rev/165ae98171b3 ExecutionReadyPromise should not be exclusive. r=perry
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 21•5 years ago
|
||
After feedback from :bholley and some introspection I'm abandoning the patches related to the conversion of "GenericPromise" to "GenericExclusivePromise". I think it probably makes sense for us to consider a combination of:
- Using explicit types/typedefs that are less homogeneous than Generic(Exclusive)Promise and use a naming convention that avoids implying JS Promise semantics.
- Just using direct lambda callbacks more and/or explicit callback interfaces. Since most of our uses turn out to be fine with exclusive promises and we frequently only have 1 or 2 threads in-play (versus MozPromises' media-motivated creation that can potentially have a ton of threads and the AbstractThread affinity concepts), this could potentially be beneficial overall.
I'm going to put this on my brain's back-burner though because I think various searchfox things stewing will address most of my concerns.
Comment 22•5 years ago
|
||
bugherder |
Assignee | ||
Comment 23•5 years ago
|
||
Comment on attachment 9103075 [details]
Bug 1583859 - ExecutionReadyPromise should not be exclusive. r=perry
Beta/Release Uplift Approval Request
- User impact if declined: MOZ_DIAGNOSTIC_ASSERT crashes on beta. The crashes won't happen on release, just beta.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This changes a low-level async abstraction from the "assert if used by more than 1 caller" mode to the "I expect to be called by multiple callers" mode. This is type-checked and otherwise doesn't change application logic beyond not crashing.
- String changes made/needed:
Comment 24•5 years ago
|
||
Comment on attachment 9103075 [details]
Bug 1583859 - ExecutionReadyPromise should not be exclusive. r=perry
Fix for a low volume crash on beta, we don't have enough volume on nightly to know if it is effective so let's land it early in beta and see theeffect. Uplift approved for 71 beta 5, thanks.
Comment 25•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Comment 26•5 years ago
|
||
Adding another signature spotted in crash stats.
Comment 27•5 years ago
|
||
I just got this (similar case, during a slack refresh) on a Nightly 11/11 build, so we're still hitting this (or something very closely related). I got the new signature Marcia added a couple of weeks ago.
Seems to be mac only
Assignee | ||
Comment 29•5 years ago
|
||
Can you provide a link to your crash on crash-stats? I'm not seeing any.
Updated•4 years ago
|
Description
•