Wrong run sizes for size classes >= 16K

RESOLVED FIXED in Firefox -esr60

Status

()

defect
RESOLVED FIXED
5 months ago
5 months ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
mozilla65
Points:
---

Firefox Tracking Flags

(firefox-esr60 fixed, firefox64 fixed, firefox65 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 months ago
Decoder was hitting the following on arm64 linux:

Assertion failure: aSize <= gMaxLargeClass, at /srv/repos/mozilla-central/memory/build/mozjemalloc.cpp:2537                                                                                                                                                                                      

This looks related to bug 1477176 comment 7, but it's not entirely certain, considering the other weird observations in that bug.

Anyways, this made me dig into this a little, so I looked on an arm64 host I have access to, but unfortunately, it had 4KB page sizes, so I went to a ppc64 host with 64KB pages, and there, generating some malloc traffic with logalloc-replay, I was able to produce a completely different crash in RedBlackTree<arena_chunk_map_t, ArenaAvailTreeTrait>::TreeNode::SetRight.

I then tried to hard code the mozjemalloc page size to 64KB on x86, and was able to reproduce the same crash. Some debugging later, I figured that the parameters for the size classes >= 16k are wrong, and could be the cause of all the problems.
(Assignee)

Updated

5 months ago
Duplicate of this bug: 1477176

Comment 3

5 months ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/236f09f4709d
Fix run sizes for size classes >= 16KB on systems with large pages. r=njn

Comment 4

5 months ago
Will this patch land on ESR 60 too?
(Assignee)

Comment 5

5 months ago
Comment on attachment 9024902 [details]
Bug 1507035 - Fix run sizes for size classes >= 16KB on systems with large pages.

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1414168

User impact if declined: Crashes on tier 3 systems with page sizes > 4KB

Is this code covered by automated tests?: No

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): Practically speaking, the patch does nothing on tier 1 platforms, where the page size is 4KB, and where there is no size class that fails to pass the overhead test. It only changes something on tier 3 platforms that use page sizes larger than 16KB, for size classes >= 16KB, for the better.

String changes made/needed: N/A

[ESR Uplift Approval Request]

If this is not a sec:{high,crit} bug, please state case for ESR consideration: Multiple downstreams for tier 3 systems tend to use ESR.

User impact if declined: See above

Fix Landed on Version: 65

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): See above

String or UUID changes made by this patch: N/A
Attachment #9024902 - Flags: approval-mozilla-esr60?
Attachment #9024902 - Flags: approval-mozilla-beta?
Comment on attachment 9024902 [details]
Bug 1507035 - Fix run sizes for size classes >= 16KB on systems with large pages.

Crash fix for downstream builds, let's take this on ESR60 and beta 64.
Attachment #9024902 - Flags: approval-mozilla-esr60?
Attachment #9024902 - Flags: approval-mozilla-esr60+
Attachment #9024902 - Flags: approval-mozilla-beta?
Attachment #9024902 - Flags: approval-mozilla-beta+

Comment 9

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/236f09f4709d
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.