Closed Bug 732467 Opened 13 years ago Closed 13 years ago

Desktop b2g client startup crash when building with llvm-gcc-4.2

Categories

(Firefox OS Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 555727

People

(Reporter: gwagner, Unassigned)

References

Details

Cannot open socket for RIL! -*- nsWifiWorker component: Wifi starting Reading symbols for shared libraries . done Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x0000000102ccbac5 in mozilla::gfx::BaseRect<int, nsRect, nsPoint, nsSize, nsMargin>::IsEqualEdges () at /Users/idefix/gaia/build/dist/include/mozilla/gfx/BaseRect.h:6594 6594 bool changed = *overflow != aOverflowAreas; (gdb) bt #0 0x0000000102ccbac5 in mozilla::gfx::BaseRect<int, nsRect, nsPoint, nsSize, nsMargin>::IsEqualEdges () at /Users/idefix/gaia/build/dist/include/mozilla/gfx/BaseRect.h:6594 #1 0x0000000102ccbac5 in nsOverflowAreas::operator!= () at /Users/idefix/gaia/src/layout/generic/nsHTMLReflowMetrics.h:266 #2 0x0000000102ccbac5 in nsIFrame::SetOverflowAreas (this=0x10b4ca928, aOverflowAreas=@0x7fff5fbfb38c) at nsFrame.cpp:6594
What's the rest of the backtrace here? I assume there aren't any other STR besides "start up gecko-b2g build"?
(In reply to Chris Jones [:cjones] [:warhammer] from comment #1) > What's the rest of the backtrace here? I assume there aren't any other STR > besides "start up gecko-b2g build"? That's all GDB gives me. OSX crash reporter shows: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 XUL 0x0000000102cca9d5 nsIFrame::SetOverflowAreas(nsOverflowAreas const&) + 69 (nsHTMLReflowMetrics.h:83) 1 XUL 0x0000000102cd0765 nsIFrame::FinishAndStoreOverflow(nsOverflowAreas&, nsSize) + 2675 (nsFrame.cpp:6783) 2 XUL 0x0000000102cb73fb nsBlockFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) + 2757 (nsBlockFrame.cpp:1200) 3 XUL 0x0000000102cbf17a nsBlockReflowContext::ReflowBlock(nsRect const&, bool, nsCollapsingMargin&, int, bool, nsLineBox*, nsHTMLReflowState&, unsigned int&, nsBlockReflowState&) + 248 (nsBlockReflowContext.cpp:294) 4 XUL 0x0000000102cbcb51 nsBlockFrame::ReflowBlockFrame(nsBlockReflowState&, nsLineList_iterator, bool*) + 1123 (nsBlockFrame.cpp:3209) 5 XUL 0x0000000102cbd821 nsBlockFrame::ReflowLine(nsBlockReflowState&, nsLineList_iterator, bool*) + 159 (nsBlockFrame.cpp:2517) 6 XUL 0x0000000102cbdfdc nsBlockFrame::ReflowDirtyLines(nsBlockReflowState&) + 1002 (nsBlockFrame.cpp:1995) 7 XUL 0x0000000102cb6dad nsBlockFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) + 1143 (nsBlockFrame.cpp:1046) 8 XUL 0x0000000102cc6ee7 nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) + 261 (nsContainerFrame.cpp:941) 9 XUL 0x0000000102cea1f3 nsCanvasFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) + 745 (nsCanvasFrame.cpp:461) 10 XUL 0x0000000102cc6ee7 nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) + 261 (nsContainerFrame.cpp:941) 11 XUL 0x0000000102ce6e1b nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState*, bool, bool, nsHTMLReflowMetrics*, bool) + 561 (nsGfxScrollFrame.cpp:549) 12 XUL 0x0000000102ce75a7 nsHTMLScrollFrame::ReflowContents(ScrollReflowState*, nsHTMLReflowMetrics const&) + 611 (nsGfxScrollFrame.cpp:675) 13 XUL 0x0000000102ce3eee nsHTMLScrollFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) + 714 (nsGfxScrollFrame.cpp:882) 14 XUL 0x0000000102cc6ee7 nsContainerFrame::ReflowChild(nsIFrame*, nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, int, int, unsigned int, unsigned int&, nsOverflowContinuationTracker*) + 261 (nsContainerFrame.cpp:941) 15 XUL 0x0000000102d24ef6 ViewportFrame::Reflow(nsPresContext*, nsHTMLReflowMetrics&, nsHTMLReflowState const&, unsigned int&) + 538 (nsViewportFrame.cpp:231) 16 XUL 0x0000000102c8a0bc PresShell::DoReflow(nsIFrame*, bool) + 808 (nsPresShell.cpp:7546) 17 XUL 0x0000000102c90134 PresShell::ProcessReflowCommands(bool) + 378 (nsPresShell.cpp:7687) 18 XUL 0x0000000102c91bb6 PresShell::FlushPendingNotifications(mozFlushType) + 598 (nsPresShell.cpp:3999) 19 XUL 0x0000000102c6bf51 DocumentViewerImpl::LoadComplete(unsigned int) + 79 (nsDocumentViewer.cpp:1017) 20 XUL 0x000000010341edb6 nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, unsigned int) + 384 (nsDocShell.cpp:6164) 21 XUL 0x0000000103427c47 nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, unsigned int) + 1631 (nsDocShell.cpp:6002) 22 XUL 0x00000001034275e0 non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, unsigned int) + 16 23 XUL 0x0000000103431ee2 nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, unsigned int) + 332 (nsDocLoader.cpp:1383) 24 XUL 0x0000000103432909 nsDocLoader::doStopDocumentLoad(nsIRequest*, unsigned int) + 239 (nsDocLoader.cpp:962) 25 XUL 0x0000000103433220 nsDocLoader::DocLoaderIsEmpty(bool) + 612 (nsCOMPtr.h:784) 26 XUL 0x00000001034334aa nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, unsigned int) + 550 (nsDocLoader.cpp:736) 27 XUL 0x000000010343327d non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, unsigned int) + 13 28 XUL 0x0000000102ae0e96 nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, unsigned int) + 550 (nsLoadGroup.cpp:731) 29 XUL 0x0000000102e51dfd nsDocument::DoUnblockOnload() + 133 (nsCOMPtr.h:532) 30 XUL 0x0000000102e5c649 nsDocument::DispatchContentLoadedEvents() + 925 (nsTDependentString.h:50) 31 XUL 0x0000000102e62c93 nsRunnableMethodImpl<void (nsDocument::*)(), true>::Run() + 43 (nsThreadUtils.h:345) 32 XUL 0x000000010374b372 nsThread::ProcessNextEvent(bool, bool*) + 634 (nsThread.cpp:657) 33 XUL 0x00000001037157fe NS_ProcessPendingEvents_P(nsIThread*, unsigned int) + 78 (nsThreadUtils.cpp:195) 34 XUL 0x000000010360b7cd nsBaseAppShell::NativeEventCallback() + 103 (nsBaseAppShell.cpp:131) 35 XUL 0x00000001035d87b7 nsAppShell::ProcessGeckoEvents(void*) + 233 (nsAppShell.mm:442)
This looks pretty bad ... crasher in an otherwise innocent-looking backtrace.
To build the "b2g product" for desktop, follow these instructions https://wiki.mozilla.org/Gaia/Hacking#Building_B2G
WORKSFORME on a MacBook AIR running OSX Lion. Pulled from hg (m-c) and github (gaia) today.
WORKSFORME on Linux x86-64.
I can give you access to my machine in the SF office.
Is this an optimized build? I'm seeing the same startup crash in an optimized build of Firefox (no b2g involved), but it doesn't happen in a debug build.
(In reply to Peter Van der Beken [:peterv] from comment #8) > Is this an optimized build? I'm seeing the same startup crash in an > optimized build of Firefox (no b2g involved), but it doesn't happen in a > debug build. There is nothing defined in the mozconfig so I assume it's an optimized build.
(In reply to Peter Van der Beken [:peterv] from comment #8) > Is this an optimized build? I'm seeing the same startup crash in an > optimized build of Firefox (no b2g involved), but it doesn't happen in a > debug build. I see the same with an opt build of Firefox too. Both with XCode 4.2.1 and XCode 4.3.1 on OSX 10.7.
(In reply to Mike Hommey [:glandium] from comment #10) > I see the same with an opt build of Firefox too. Both with XCode 4.2.1 and > XCode 4.3.1 on OSX 10.7. OSX 10.7.3, even.
(In reply to Mike Hommey [:glandium] from comment #11) > (In reply to Mike Hommey [:glandium] from comment #10) > > I see the same with an opt build of Firefox too. Both with XCode 4.2.1 and > > XCode 4.3.1 on OSX 10.7. > > OSX 10.7.3, even. I also have Software Mac OS X Lion 10.7.3 (11D50b)
Building with clang leads to a working build. This would suggest a miscompilation with gcc in XCode > 4.1 (which is, I think, what i was using before upgrading).
For OS X 10.7.x, what are the best option for mozconfig then? We should put this on the wiki too if this is a known issue.
(In reply to Mike Hommey [:glandium] from comment #13) > Building with clang leads to a working build. This would suggest a > miscompilation with gcc in XCode > 4.1 (which is, I think, what i was using > before upgrading). this would fit with firefox builds working on 10.7 based buildbot machines, since those use xcode 4.1. My understanding is that xcode > 4.1 don't have a real gcc-4.2 programs, instead using the gcc-4.2 frontend with an llvm backend. I'll try rebuilding OS X with clang
(In reply to John Ford [:jhford] from comment #17) > I'll try rebuilding OS X with clang And it worked, b2g launches. I can confirm that gcc on the system experiencing these issues is 'i686-apple-darwin11-llvm-gcc-4.2'
Summary: Desktop b2g client startup crash → Desktop b2g client startup crash when building with llvm-gcc-4.2
(In reply to John Ford [:jhford] from comment #17) ... > I'll try rebuilding OS X with clang For the rest of us, how did you go about installing clang on OS X. Homebrew?
(In reply to Jeff Griffiths from comment #19) > (In reply to John Ford [:jhford] from comment #17) > ... > > I'll try rebuilding OS X with clang > > For the rest of us, how did you go about installing clang on OS X. Homebrew? I found clang in /Developer/usr/bin/clang - I guess xcode installed it, and this worked for me by setting as described on https://wiki.mozilla.org/Gaia/Hacking. In case it helps someone, my crash was slightly different to the one above ( I had RIL support disabled): Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000009 nsContainerFrame::SyncFrameViewProperties (aPresContext=0x10baa9000, aFrame=0x10baa0c28, aStyleContext=0x0, aView=0x1, aFlags=0) at nsIView.h:116 116 { return reinterpret_cast<nsIViewManager*>(mViewManager); }
(In reply to Jeff Griffiths from comment #19) > (In reply to John Ford [:jhford] from comment #17) > ... > > I'll try rebuilding OS X with clang > > For the rest of us, how did you go about installing clang on OS X. Homebrew? newer Xcode versions have a version of clang/clang++ on the standard path. To build with clang, I ran export CC=clang export CXX=clang++ before make -f client.mk build, but this could easily be inside of your mozconfig.
Thanks - a while ago I had ditched XCode in favour of Apple's smaller basic compiler package - looks like I need to go back.
Confirmed: installed latest Xcode and set CC/CXX to clang as above, desktop build now works fine.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
fyi, /usr/bin/gcc is a softlink to llvm-gcc... you can delete the softlink and link it to the /usr/local/bin/gcc-4.6
You need to log in before you can comment on or make changes to this bug.