Closed Bug 1656974 Opened 5 years ago Closed 5 years ago

Crash in [@ shutdownhang | RtlAcquireSRWLockExclusive | mozilla::scache::StartupCache::GetBuffer]

Categories

(Core :: XPCOM, defect)

All
Windows
defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 + verified
firefox81 + fixed

People

(Reporter: philipp, Assigned: alexical)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

[Tracking Requested - why for this release]:

This bug is for crash report bp-60f1d762-b1ef-4b9e-bacf-ca9510200803.

Top 10 frames of crashing thread:

0 ntdll.dll NtWaitForAlertByThreadId 
1 ntdll.dll RtlAcquireSRWLockExclusive 
2 xul.dll mozilla::scache::StartupCache::GetBuffer startupcache/StartupCache.cpp:840
3 xul.dll ReadCachedScript js/xpconnect/loader/mozJSLoaderUtils.cpp:25
4 xul.dll mozJSComponentLoader::ObjectForLocation js/xpconnect/loader/mozJSComponentLoader.cpp:758
5 xul.dll mozJSComponentLoader::Import js/xpconnect/loader/mozJSComponentLoader.cpp:1276
6 xul.dll mozilla::dom::module_getter::ModuleGetter dom/base/ChromeUtils.cpp:576
7 xul.dll InternalCall js/src/vm/Interpreter.cpp:640
8 xul.dll js::NativeGetExistingProperty js/src/vm/NativeObject.cpp:2325
9 xul.dll Interpret js/src/vm/Interpreter.cpp:3471

the volume of these shutdownhangs is jumping up noticably in firefox 80.0b - acoounting for ~2.75% of all browser crashes. this first started on nightly build 20200708094217 and therefore looks tied to the changes in bug 1627075.

Doug can you take a look?

Flags: needinfo?(dothayer)
Assignee: nobody → dothayer
Flags: needinfo?(dothayer)

I don't think this will fully resolve the shutdown hangs associated
with this bug. The underlying problem is that writing the startup
cache during shutdown can take a long time. This seems like A Bad Thing,
and I have a mild leaning toward the thought that we shouldn't write the
startup cache at all during shutdown. However, I do think that trading
shutdown time regressions for startup time wins is probably good, so
I don't feel super comfortable making that change.

However, this change at least fixes the problem where we A) block the main
thread waiting for the write to finish, and B) are more likely to hit a
shutdown hang, since we concentrate all of the hang time in one phase,
rather than it being spread across the shutdown timeline. This is likely
the major change that the regressing bug introduced.

The unfortunate consequence is that if we try to GetBuffer during shutdown,
we will now read out of the omnijar. However, it should overall be better
since we'll be waiting on a (hopefully) small number of small reads rather
than a large write.

Pushed by dothayer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/25e500b64866 Turn off StartupCache when startup is finished r=froydnj
See Also: → 1656973
Pushed by dothayer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e15bd19f021 Turn off StartupCache when startup is finished r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Flags: needinfo?(dothayer)

The patch landed in nightly and beta is affected.
:dthayer, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(dothayer)

Trying to sort out what's going on in bug 1658732 before requesting uplift. That's a fairly strange regression to see from this change.

Bug 1627075 was backed out for 80.0rc2, so we'll hopefully see this go down in volume on Beta once that build starts rolling out.

(In reply to Ryan VanderMeulen [:RyanVM] from comment #9)

Bug 1627075 was backed out for 80.0rc2, so we'll hopefully see this go down in volume on Beta once that build starts rolling out.

No reports from 80.0rc2 - looks like the backout worked. Calling this fixed for Fx80 by bug 1656261.

Flags: needinfo?(dothayer)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: