Bug 220027 - www/firefox: crashes on latest head due to jemalloc update
Summary: www/firefox: crashes on latest head due to jemalloc update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-16 05:32 UTC by Henry Hu
Modified: 2017-06-22 01:26 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2017-06-16 05:32:22 UTC
jemalloc is updated in base to 5.0 on Jun 15. The result is that firefox crashes minutes after startup, or crashes when doing a measurement in about:memory.
The error is:

<jemalloc>: jemalloc_ctl.c:1212: Failed assertion: "node->nchildren > 0"

The reason is that malloc ctl stats.arenas.0.metadata.allocated is renamed to stats.arenas.0.internal (see https://github.com/jemalloc/jemalloc/commit/a0dd3a4483e2e72ee80e70424a6522f873f2c7ff and https://github.com/jemalloc/jemalloc/commit/751f2c332d91209c5ae3234fa444a20850067960), while firefox is still checking the old malloc ctl without checking the return value of mallctlnametomib.

One temporary fix is modifying firefox binary and updating the string. Firefox should be patched for this.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-06-22 01:20:39 UTC
A commit references this bug:

Author: jbeich
Date: Thu Jun 22 01:19:28 UTC 2017
New revision: 444091
URL: https://svnweb.freebsd.org/changeset/ports/444091

Log:
  gecko: phase out system jemalloc via 12.0-CURRENT as well

  https://bugzilla.mozilla.org/show_bug.cgi?id=1363992

  PR:		220027

Changes:
  head/Mk/bsd.gecko.mk