Last Comment Bug 526152 - jemalloc alignment assertion and abort on Linux
: jemalloc alignment assertion and abort on Linux
Product: Core
Classification: Components
Component: Memory Allocator (show other bugs)
: Trunk
: x86 Linux
-- normal (vote)
: ---
Assigned To: David Mandelin [:dmandelin]
: Mike Hommey [:glandium]
: 533595 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2009-11-02 21:08 PST by Mark Finkle (:mfinkle) (use needinfo?)
Modified: 2010-06-23 16:40 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (795 bytes, patch)
2009-11-03 15:32 PST, David Mandelin [:dmandelin]
pavlov: review+
dveditz: approval1.9.2.7+
Details | Diff | Splinter Review

Description User image Mark Finkle (:mfinkle) (use needinfo?) 2009-11-02 21:08:13 PST
I am getting the following assertion when attempting to start Fennec, a xulrunner based application, on Ubunto 8.10

jemalloc.c:5801: Failed assertion: "((alignment - 1) & alignment) == 0 && alignment >= sizeof(void *)"

Stack looks like this:

UNKNOWN [/lib/tls/i686/cmov/ +0x0000E618]
abort+0x00000188 [/lib/tls/i686/cmov/ +0x0002D268]
memalign+0x000000AF [../../mobile-debug/mobile/dist/bin/fennec +0x0001FCEA]
__libc_memalign+0x00000042 [/lib/tls/i686/cmov/ +0x00073A42]
___tls_get_addr+0x000000AF [/lib/ +0x0001081F]
UNKNOWN [/home/mfinkle/Source/mozilla-trunk/mobile-debug/mobile/dist/bin/xulrunner/ +0x01473BAD]
NS_InitXPCOM3_P+0x000000D9 [/home/mfinkle/Source/mozilla-trunk/mobile-debug/mobile/dist/bin/xulrunner/ +0x0140FBBC]
UNKNOWN [/home/mfinkle/Source/mozilla-trunk/mobile-debug/mobile/dist/bin/xulrunner/ +0x001CD847]
XRE_main+0x000021BD [/home/mfinkle/Source/mozilla-trunk/mobile-debug/mobile/dist/bin/xulrunner/ +0x001D3800]
UNKNOWN [../../mobile-debug/mobile/dist/bin/fennec +0x000024AD]
__libc_start_main+0x000000E5 [/lib/tls/i686/cmov/ +0x00016685]
Comment 1 User image David Mandelin [:dmandelin] 2009-11-03 15:32:37 PST
Created attachment 410067 [details] [diff] [review]

Bug analysis for the record: this started asserting because a boolean TLS variable was added, with size == 1 on Ubuntu. jemalloc's memalign asserts that the alignment is at least pointer-width. We can fix just by going up to that size if necessary; the alignment guarantee offered by the memalign API is still upheld.
Comment 2 User image David Mandelin [:dmandelin] 2009-11-03 18:21:01 PST
Comment 3 User image Ben Combee (:bcombee) 2009-12-09 13:51:53 PST
*** Bug 533595 has been marked as a duplicate of this bug. ***
Comment 4 User image Ben Combee (:bcombee) 2009-12-09 13:53:00 PST
I'd love to see this fix moved over to 1.9.2 to make debugging fennec on n900 possible without patch
Comment 5 User image Martin Stránský 2009-12-16 07:21:19 PST
I can reproduce in on Fedora12/Firefox 3.6.b3. It would be great to have it in 1.9.2.
Comment 6 User image Johnathan Nightingale [:johnath] 2010-03-10 13:07:51 PST
Comment on attachment 410067 [details] [diff] [review]

Approving this because we believe it's still hurting the ability to debug fennec. If that's stopped being a problem for other reasons, then we should clear this approval rather than adding what looks like workaround code, right?
Comment 7 User image Stuart Parmenter 2010-03-11 13:41:29 PST
lets take this, should have done long ago
Comment 8 User image christian 2010-05-12 11:49:55 PDT
Comment on attachment 410067 [details] [diff] [review]

a=LegNeato for Please ONLY land this on mozilla-1.9.2 default, as we
are still working on on the relbranch
Comment 9 User image David Mandelin [:dmandelin] 2010-06-18 13:56:00 PDT

Note You need to log in before you can comment on or make changes to this bug.