Closed Bug 1507035 Opened 6 years ago Closed 6 years ago

Wrong run sizes for size classes >= 16K

Categories

(Core :: Memory Allocator, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox-esr60 --- fixed
firefox64 --- fixed
firefox65 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

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.
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
Will this patch land on ESR 60 too?
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+
https://hg.mozilla.org/mozilla-central/rev/236f09f4709d
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: