Closed
Bug 821577
Opened 12 years ago
Closed 12 years ago
DMD: Hang on Mac at start-up
Categories
(Core :: DMD, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(2 files)
|
1.96 KB,
patch
|
justin.lebar+bug
:
review+
justin.lebar+bug
:
approval-mozilla-aurora+
justin.lebar+bug
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
|
73.07 KB,
text/rtf
|
Details |
I'm getting DMD hangs just after start-up on Mac. DMD initializes successfully, then very early on I get a hang here:
#0 0x00007fff90c7236e in spin_lock$VARIANT$mp ()
#1 0x00007fff891302c1 in CFBundleGetMainBundle ()
#2 0x00007fff8917f269 in _CFBundleGetMainBundleIfLooksLikeBundle ()
#3 0x00007fff90743e73 in GetBugsForOurBundleIDFromCoreservicesd ()
#4 0x00007fff90743d76 in _CSCheckFix ()
#5 0x00007fff9074d31f in _Gestalt_SystemVersion ()
#6 0x00007fff9074cd3a in Gestalt ()
#7 0x000000010001b259 in OSXVersion () at /Users/njn/moz/mi1/xpcom/base/nsStackWalk.cpp:76
#8 0x000000010001ad19 in OnLionOrLater () at /Users/njn/moz/mi1/xpcom/base/nsStackWalk.cpp:84
#9 0x000000010001aab8 in StackWalkInitCriticalAddress () at /Users/njn/moz/mi1/xpcom/base/nsStackWalk.cpp:148
#10 0x000000010001ae56 in NS_StackWalk (aCallback=0x10000efd0 <mozilla::dmd::StackTrace::StackWalkCallback(void*, void*, void*)>, aSkipFrames=3, aClosure=0x7fff5fbfe0d0, aThread=0, aPlatformData=0x0) at /Users/njn/moz/mi1/xpcom/base/nsStackWalk.cpp:1218
#11 0x000000010000b51d in mozilla::dmd::StackTrace::Get (aT=0x100409060) at /Users/njn/moz/mi1/memory/replace/dmd/DMD.cpp:590
#12 0x000000010000bd95 in AllocCallback (aPtr=0x10040a080, aReqSize=128, aT=0x100409060) at /Users/njn/moz/mi1/memory/replace/dmd/DMD.cpp:886
#13 0x000000010000bc18 in replace_malloc (aSize=128) at /Users/njn/moz/mi1/memory/replace/dmd/DMD.cpp:943
#14 0x00000001000520f0 in malloc_impl (size=128) at /Users/njn/moz/mi1/memory/build/replace_malloc.c:151
#15 0x00000001000519f9 in zone_malloc (zone=0x10007a2d0, size=128) at /Users/njn/moz/mi1/memory/build/replace_malloc.c:325
#16 0x00007fff90c703c8 in malloc_zone_malloc ()
#17 0x00007fff90c711a4 in malloc ()
#18 0x00007fff91d7ea57 in updateVtable ()
#19 0x00007fff91d807a2 in _class_setInitialized ()
#20 0x00007fff91d8064c in _finishInitializing ()
#21 0x00007fff91d7f6af in _class_initialize ()
#22 0x00007fff91d7f517 in prepareForMethodLookup ()
#23 0x00007fff91d7f2bb in lookUpMethod ()
#24 0x00007fff91d7cf3c in objc_msgSend ()
#25 0x00007fff8914e299 in -[__NSPlaceholderArray initWithCapacity:] ()
#26 0x00007fff8911033f in CFArrayCreateMutable ()
#27 0x00007fff89121cb7 in _CFBundleCopySortedDirectoryContentsAtPath ()
#28 0x00007fff8912174a in _CFBundleURLLooksLikeBundleVersion ()
#29 0x00007fff891447d8 in _CFBundleCreate ()
#30 0x00007fff891303c2 in _CFBundleGetMainBundleAlreadyLocked ()
#31 0x00007fff891302c6 in CFBundleGetMainBundle ()
#32 0x0000000100002b75 in mozilla::BinaryPath::Get (argv0=0x7fff5fbff838 "/Users/njn/moz/mi1/dmdd64/dist/NightlyDebug.app/Contents/MacOS/firefox", aResult=0x7fff5fbff1b0 "") at BinaryPath.h:46
#33 0x0000000100001ea8 in main (argc=4, argv=0x7fff5fbff5f8) at /Users/njn/moz/mi1/browser/app/nsBrowserApp.cpp:208
| Assignee | ||
Comment 1•12 years ago
|
||
This does the trick.
Attachment #692136 -
Flags: review?(justin.lebar+bug)
Instructions on how to reproduce in:
https://wiki.mozilla.org/Performance/MemShrink/DMD
Comment 3•12 years ago
|
||
Comment on attachment 692136 [details] [diff] [review]
DMD: Fix hang at start-up on Mac.
I'm fine with this work-around, but it sounds like there might be a bug in StackWalkInitCriticalAddress.
Attachment #692136 -
Flags: review?(justin.lebar+bug) → review+
| Assignee | ||
Comment 4•12 years ago
|
||
I'm not sure about the bug... the comment says that StackWalkInitCriticalAddress() must be called before any mutexes are created, and DMD creates its own mutex in Init(), so maybe that was the problem.
| Assignee | ||
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
Comment on attachment 692136 [details] [diff] [review]
DMD: Fix hang at start-up on Mac.
[Triage Comment]
npotb
Attachment #692136 -
Flags: approval-mozilla-b2g18+
Attachment #692136 -
Flags: approval-mozilla-aurora+
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 8•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Component: General → DMD
Comment 9•12 years ago
|
||
I tried to reproduce the issue by building Firefox locally whit the
ac_add_options --enable-dmd
line in mozconfig as suggested in comment 2. A different error did not let me see the current issue.
Error log for e082861f545f fix build in attachment.
I will try to verify this on Latest Nightly build.
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Comment on attachment 715147 [details]
Error for e082861f545f fix build
> The crash is
>
> Exception Type: EXC_BAD_ACCESS (SIGSEGV)
> Exception Codes: EXC_I386_GPFLT
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0 libunwind.dylib 0x00007fff9175d610 libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(unsigned int, unsigned long long, libunwind::LocalAddressSpace&, libunwind::Registers_x86_64&) + 72
> 1 libunwind.dylib 0x00007fff9175d58f libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(unsigned int, unsigned long long, libunwind::LocalAddressSpace&, libunwind::Registers_x86_64&) + 37
> 2 libunwind.dylib 0x00007fff9175d50e libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step() + 58
> 3 libunwind.dylib 0x00007fff917614e0 _Unwind_Backtrace + 65
> 4 libdmd.dylib 0x000000010000ef06 NS_StackWalk + 54
If this is reproducable, we should file a bug.
Comment 12•12 years ago
|
||
This is reproducible every time and it's now bug 842566.
You need to log in
before you can comment on or make changes to this bug.
Description
•