Closed
Bug 1320312
Opened 6 years ago
Closed 6 years ago
Windows build failure - xul.dll fails to link due to: error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl MozStackWalk
Categories
(Toolkit :: Telemetry, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox50 | --- | unaffected |
firefox51 | --- | unaffected |
firefox52 | --- | unaffected |
firefox53 | --- | fixed |
People
(Reporter: wgianopoulos, Assigned: Dexter)
References
(Blocks 1 open bug)
Details
(Keywords: regression, Whiteboard: [measurement:client])
Attachments
(1 file, 2 obsolete files)
9.45 KB,
patch
|
Dexter
:
review+
|
Details | Diff | Splinter Review |
Here are the logfile errors: 6:57.17 Telemetry.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl MozStackWalk(void (__cdecl*)(unsigned int,void *,void *,void *),unsigned int,unsigned int,void *,unsigned int,void *)" (__imp_?MozStackWalk@@YA_NP6AXIPAX00@ZII0I0@Z) referenced in function "public: void __thiscall `anonymous namespace'::KeyedStackCapturer::Capture(class nsACString_internal const &)" (?Capture@KeyedStackCapturer@?A0x07cb84f2@@QAEXABVnsACString_internal@@@Z) 6:57.17 6:57.17 xul.dll : fatal error LNK1120: 1 unresolved externals
Reporter | ||
Comment 1•6 years ago
|
||
and here is my .mozconfig . $topsrcdir/browser/config/mozconfig BUILD_OFFICIAL=1 export BUILD_OFFICIAL WIN32_REDIST_DIR=~/mozilla/redist/x86 export WIN32_REDIST_DIR #WIN32_CRT_SRC_DIR=~/mozilla/crtsrc mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/fx-obj mk_add_options RUN_AUTOCONF_LOCALLY=1 mk_add_options AUTOCONF=/usr/local/bin/autoconf-2.13 ac_add_options --enable-optimize=-O2 ac_add_options --disable-debug ac_add_options --enable-tests ac_add_options --disable-updater ac_add_options --disable-crashreporter ac_add_options --enable-jemalloc ac_add_options --enable-eme=adobe ac_add_options --enable-require-all-d3dc-versions mk_add_options MOZ_MAKE_FLAGS="-j3"
Reporter | ||
Comment 2•6 years ago
|
||
I suspect bug 1225851. I am trying just rebuilding in case this was just a hardware issue on my side. If that fails, I will try backing 1225851 out.
Keywords: regression
Comment 3•6 years ago
|
||
I tried the back out of bug 1225851 and it worked then.
Reporter | ||
Updated•6 years ago
|
Component: Build Config → Telemetry
Product: Core → Toolkit
Reporter | ||
Updated•6 years ago
|
Summary: Can no longer build windows trunk → Can no longer build windows trunk since bug 1225851 patches landed.
Comment 4•6 years ago
|
||
Bill, do you have tests disabled in your mozconfig? Maybe this is the reason why the mozilla builder work.
Reporter | ||
Comment 5•6 years ago
|
||
Ah I did post my mozconfig in comment #1. I do not have tests disabled, however I do have crashreporter disabled.
Reporter | ||
Comment 6•6 years ago
|
||
OH and also updater because i do not support automatic updates of my builds.
Assignee | ||
Comment 7•6 years ago
|
||
Mh, I think the MozStackWalk call in Telemetry.cpp [1] needs to be conditionally enabled/disabled based on the MOZ_STACKWALKING define [2], or at least that's what the comment says. [1] - https://dxr.mozilla.org/mozilla-central/rev/bad312aefb42982f492ad2cf36f4c6c3d698f4f7/toolkit/components/telemetry/Telemetry.cpp#519 [2] - https://dxr.mozilla.org/mozilla-central/rev/bad312aefb42982f492ad2cf36f4c6c3d698f4f7/mozglue/misc/StackWalk.h#56
Reporter | ||
Comment 8•6 years ago
|
||
(In reply to Alessio Placitelli [:Dexter] from comment #7) > Mh, I think the MozStackWalk call in Telemetry.cpp [1] needs to be > conditionally enabled/disabled based on the MOZ_STACKWALKING define [2], or > at least that's what the comment says. > > [1] - > https://dxr.mozilla.org/mozilla-central/rev/ > bad312aefb42982f492ad2cf36f4c6c3d698f4f7/toolkit/components/telemetry/ > Telemetry.cpp#519 > [2] - > https://dxr.mozilla.org/mozilla-central/rev/ > bad312aefb42982f492ad2cf36f4c6c3d698f4f7/mozglue/misc/StackWalk.h#56 Alternatively this code needs to include what is required to make the stackwalk work and no be dependent on having crashreporter enabled.
Assignee | ||
Comment 9•6 years ago
|
||
Georg, ni? you so it's on our radar for the next week.
Points: --- → 1
Flags: needinfo?(gfritzsche)
Priority: -- → P1
Whiteboard: [measurement:client]
Reporter | ||
Comment 10•6 years ago
|
||
It would seem to me that the correct fix is to have MOZ-STACKWALKING defined if either crashreporter or telemetry is enabled for the build.
Reporter | ||
Comment 11•6 years ago
|
||
ah so it really seems you need to have enable-profiling for this to work. I can do that.
Updated•6 years ago
|
Summary: Can no longer build windows trunk since bug 1225851 patches landed. → Windows build failure - xul.dll fails to link due to: error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl MozStackWalk
Updated•6 years ago
|
Assignee: nobody → gfritzsche
Flags: needinfo?(gfritzsche)
Updated•6 years ago
|
status-firefox50:
--- → unaffected
status-firefox51:
--- → unaffected
status-firefox52:
--- → unaffected
Version: Trunk → 53 Branch
Comment 14•6 years ago
|
||
Is there a way for Windows developers to build while this is being fixed? I updated my tree and now I cannot build.
Comment 15•6 years ago
|
||
(In reply to Kirk Steuber [:bytesized] from comment #14) > Is there a way for Windows developers to build while this is being fixed? I > updated my tree and now I cannot build. Adding ac_add_options --enable-profiling to your mozconfig would be the simplest solution.
Comment 16•6 years ago
|
||
Building on Windows without a mozconfig is currently failing due to this bug. This state in unacceptable because it is too disruptive. Please either land a fix for this bug ASAP or revert 620b85825ca5.
Flags: needinfo?(alessio.placitelli)
Assignee | ||
Comment 17•6 years ago
|
||
The patch does this: - Changes Telemetry.cpp to disable stack walking if MOZ_STACKWALKING is not defined. - Adds MOZ_STACKWALKING to AppConstant so that it can be used to disable tests. - Changes the stack capturing tests to be skipped if AppConstant.MOZ_STACKWALKING is not defined.
Flags: needinfo?(alessio.placitelli)
Attachment #8815175 -
Flags: review?(gfritzsche)
Assignee | ||
Updated•6 years ago
|
Status: NEW → ASSIGNED
Comment 18•6 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #16) > Building on Windows without a mozconfig is currently failing due to this > bug. This state in unacceptable because it is too disruptive. If this is an important build configuration, maybe this should get CI coverage?
Flags: needinfo?(gps)
Comment 19•6 years ago
|
||
Thanks for fixing the code :Dexter!
Comment 20•6 years ago
|
||
Comment on attachment 8815175 [details] [diff] [review] bug1320312.patch Review of attachment 8815175 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/telemetry/Telemetry.cpp @@ -81,3 @@ > > namespace { > - Unrelated change, please undo. There are a few more of discarded empty lines below in this patch here. @@ +395,5 @@ > const nsClassHashtable<nsStringHashKey, HangReports::AnnotationInfo>& > HangReports::GetAnnotationInfo() const { > return mAnnotationInfo; > } > +#if defined(ENABLE_STACK_CAPTURE) Add an empty line before & after this one. @@ -922,5 @@ > bool GetSQLStats(JSContext *cx, JS::MutableHandle<JS::Value> ret, > bool includePrivateSql); > > void ReadLateWritesStacks(nsIFile* aProfileDir); > - Unrelated change, please undo. @@ +929,5 @@ > AutoHashtable<SlowSQLEntryType> mSanitizedSQL; > Mutex mHashMutex; > HangReports mHangReports; > Mutex mHangReportsMutex; > +#if defined(ENABLE_STACK_CAPTURE) Please undo the removal of the empty lines here & below. @@ +3141,5 @@ > Move(aAnnotations)); > } > +#endif > + > +#if defined(ENABLE_STACK_CAPTURE) This needs to behave the same as the declaration in Telemetry.h The intention here was that Telemetry::CaptureStack() is always declared, but internally it's a no-op when ENABLE_STACK_CAPTURE is not defined (in TelemetryImpl::CaptureStack()). It looks like we didn't cover this too well in the review before.
Attachment #8815175 -
Flags: review?(gfritzsche)
Assignee | ||
Comment 21•6 years ago
|
||
Whoops, sorry Georg, the discarded blank lines were unintended.
Attachment #8815175 -
Attachment is obsolete: true
Attachment #8815255 -
Flags: review?(gfritzsche)
Comment 22•6 years ago
|
||
Comment on attachment 8815255 [details] [diff] [review] bug1320312.patch Review of attachment 8815255 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8815255 -
Flags: review?(gfritzsche) → review+
Assignee | ||
Comment 23•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b115991c792f
Reporter | ||
Comment 24•6 years ago
|
||
+#if defined(MOZ_STACKWALKING) +#define ENABLE_STACK_CAPTURE #include "mozilla/StackWalk.h" #include "nsPrintfCString.h" -#endif +#endif // ENABLE_STACK_CAPTURE ^^^^^^^^^^^^^^^^^^^^ Shouldn't this comment say MOZ_STACKWALKING to match the condition on the #if?
Assignee | ||
Comment 25•6 years ago
|
||
(In reply to Bill Gianopoulos [:WG9s] from comment #24) > +#if defined(MOZ_STACKWALKING) > +#define ENABLE_STACK_CAPTURE > #include "mozilla/StackWalk.h" > #include "nsPrintfCString.h" > -#endif > +#endif // ENABLE_STACK_CAPTURE > ^^^^^^^^^^^^^^^^^^^^ > > Shouldn't this comment say MOZ_STACKWALKING to match the condition on the > #if? Yup, good catch.
Assignee | ||
Comment 26•6 years ago
|
||
Attachment #8815255 -
Attachment is obsolete: true
Attachment #8815311 -
Flags: review+
Comment 27•6 years ago
|
||
Pushed by alessio.placitelli@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/15d6ef5ef0e2 Disable Telemetry stack capturing if stack walking is not available. r=gfritzsche
Assignee | ||
Comment 28•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/15d6ef5ef0e2dfba731d4045813bf0f3828eb5b8 Bug 1320312 - Disable Telemetry stack capturing if stack walking is not available. r=gfritzsche
Comment 29•6 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #18) > (In reply to Gregory Szorc [:gps] from comment #16) > > Building on Windows without a mozconfig is currently failing due to this > > bug. This state in unacceptable because it is too disruptive. > > If this is an important build configuration, maybe this should get CI > coverage? This is a very valid point and I will follow-up on it in another bug. While I'm here, nobody involved with this breakage should feel bad about breaking something that CI didn't catch: the fault is with CI for not testing build configurations that developers rely on.
Flags: needinfo?(gps)
Comment 30•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/15d6ef5ef0e2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•