Closed Bug 1584820 Opened 5 years ago Closed 5 years ago

Crash in [@ JSRope::flatten]

Categories

(Core :: JavaScript Engine, defect, P1)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 blocking fixed

People

(Reporter: pascalc, Assigned: iain)

References

(Regression)

Details

(Keywords: crash, regression, Whiteboard: [rca - design error])

Crash Data

Attachments

(4 files)

This bug is for crash report bp-5a546a4c-aec2-450a-9beb-304370190928.

Top 10 frames of crashing thread:

0 xul.dll JSRope::flatten js/src/vm/StringType.cpp:856
1 xul.dll js::AtomizeString js/src/vm/JSAtom.cpp:980
2 xul.dll bool js::ValueToId<js::CanGC> js/src/vm/JSAtom-inl.h:93
3 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRObjectLiteral<js::XDR_DECODE> js/src/vm/JSObject.cpp:1667
4 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRScript<js::XDR_DECODE> js/src/vm/JSScript.cpp:1176
5 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRInterpretedFunction<js::XDR_DECODE> js/src/vm/JSFunction.cpp:627
6 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRScript<js::XDR_DECODE> js/src/vm/JSScript.cpp:1176
7 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRInterpretedFunction<js::XDR_DECODE> js/src/vm/JSFunction.cpp:627
8 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRScript<js::XDR_DECODE> js/src/vm/JSScript.cpp:1176
9 xul.dll class mozilla::Result<mozilla::Ok, JS::TranscodeResult> js::XDRInterpretedFunction<js::XDR_DECODE> js/src/vm/JSFunction.cpp:627

New signature with a significant volume on Nightly that popped up over the week end.

It might be a bug caused by the landing of Bug 1575370.
Caroline, can you investigate this issue?

Has Regression Range: --- → yes
Has STR: --- → no
Flags: needinfo?(ccullen)
Keywords: regression
Priority: -- → P1
Regressed by: 1575370

Update crash signature to include js::gc::AtomMarkingRuntime::markAtom<T>, which started spiking at the same moment.

Crash Signature: [@ JSRope::flatten] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ]
Crash Signature: [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton]

Caroline and I are looking into this. It looks like we are not tracing a GCVector. Working on a patch.

Crash Signature: [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton]
Flags: needinfo?(ccullen)

The original atom deduplication patch in bug 1575370 rooted the atom map used when encoding data, but not the atom table used when decoding data. This patch fixes that problem by turning it into a RootedVector.

This means the decoder needs to be stack-allocated. (Fortunately, we already always allocate the decoder on the stack.) Currently, XDRDecoder is the templatized sibling of XDRDecoder, which means there's no base decoder class to put the RootedVector in (and mark with MOZ_RAII). This patch adds a real XDRDecoder class to make it all work.

Depends on D47680

Pushed by iireland@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/348bf8439041 Refactor atomMap / hasAtomMap to match other XDRState accessors r=caroline
Assignee: nobody → iireland
Regressions: 1586199

Reopening, we are still crashing.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Iain, should we back out Bug 1575370 ?

Flags: needinfo?(iireland)

This patch reverts the patches associated with bug 1575370, bug 1584820, bug 1585158, and bug 1585874. We will reland this code once we've figured out why it is causing crashes in nightly.

Flags: needinfo?(iireland)
Pushed by iireland@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b6f7d715828 Revert atom deduplication patches r=tcampbell
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Crash Signature: [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>]
Crash Signature: [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>] [@ js::ContextChecks::check]
Crash Signature: [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>] [@ js::ContextChecks::check] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>] [@ js::ContextChecks::check] [@ js::XDRIncrementalEncoder::~XDRIncrementalEncoder()]
Crash Signature: [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>] [@ js::ContextChecks::check] [@ js::XDRIncrementalEncoder::~XDRIncrementalEncoder()] → [@ JSRope::flatten] [@ js::gc::AtomMarkingRuntime::markAtom<T> ] [@ JSContext::markAtom] [@ js::CloneFunctionObjectIfNotSingleton] [@ JSRope::flattenInternal<T>] [@ js::ContextChecks::check] [@ js::XDRIncrementalEncoder::~XDRIncrementalEncoder()]

This bug has been identified as part of a pilot on determining root causes of blocking and dot release drivers.

It needs a root-cause set for it. Please see the list at https://docs.google.com/document/d/1FFEGsmoU8T0N8R9kk-MXWptOPtXXXRRIe4vQo3_HgMw/.

Add the root cause as a whiteboard tag in the form [rca - <cause> ] and remove the rca-needed keyword.

If you have questions, please contact :tmaity.

Keywords: rca-needed

There were multiple issues among the original patches, which got backed out and re-landed once fixed in Bug 1587638, the fix provided by Iain here identified the following root cause:

(based on comment 6) The problem comes with the design of XDR encoding and decoding which are meant to look symmetrical by design. However, when decoding there is a need for telling the GC about newly created Atoms, which is not the case when encoding. This lack of symmetry is the root cause of the issue.

Keywords: rca-needed
Whiteboard: [rca - design error]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: