I've been thinking about NS_StackWalk and Win64 lately and I've been debating whether it would be beneficial for us to remove our dependency on dbghelp.dll in the Win64 case. Windows provides Rtl* functions to do 64-bit unwinding.

I think that the work that Nathan, Luke and dmajor did in bug 844196 might be useful for this situation.

On 11/06/14 9:48 AM, Benoit Girard wrote:
Off the top of my head:
- Are you compiling with --enable-profiling?
- The actual unwind is performed by DbgHelp library. Make sure it's
up-to-date. We have had this issue on windows xp that require a
DbgHelp update. Unlikely for win8 but a good thing to check.
- The call is made here:
http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsStackWalk.cpp#381
but I don't see anything wrong.
- Are you compiling with frame pointers? Apparently in AMD64 the
defaults may be different. Try compiling explicitly with frame
pointers (or making sure they are there). If that's it we need to
update --enable-profiling to do the right thing.

On Thu, Nov 6, 2014 at 12:26 AM, Nicholas Nethercote
<n.netherc...@gmail.com> wrote:
Hi,

NS_StackWalk is totally broken on Win64. I've been looking into this
because it prevents DMD from working usefully, but I am stuck. Details
are in https://bugzilla.mozilla.org/show_bug.cgi?id=1088343.

You can see examples of this in debug mochitest logs when assertions
failures occur. E.g. here's one on Windows 7 (32-bit):

11:53:45     INFO -  [Parent 2180] ###!!! ASSERTION: Invalid value
(157286400 / 102760448) for
explicit/js/compartment(http://too-big.com/)/stuff: 'false', file
aboutMemory.js, line 0
11:53:45     INFO -  #01: NS_InvokeByIndex
[xpcom/reflect/xptcall/md/win32/xptcinvoke.cpp:71]
11:53:45     INFO -  #02: CallMethodHelper::Invoke()
[js/xpconnect/src/XPCWrappedNative.cpp:2394]
11:53:45     INFO -  #03: XPCWrappedNative::CallMethod(XPCCallContext
&,XPCWrappedNative::CallMode)
[js/xpconnect/src/XPCWrappedNative.cpp:1713]
11:53:45     INFO -  #04: XPC_WN_CallMethod(JSContext *,unsigned
int,JS::Value *) [js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1250]
11:53:45     INFO -  #05: js::CallJSNative(JSContext *,bool
(*)(JSContext *,unsigned int,JS::Value *),JS::CallArgs const &)
[js/src/jscntxtinlines.h:231]

(And so on for another 96 frames.)

Compare it with the corresponding one on Windows 8 (64-bit):

12:22:36     INFO -  [Parent 3484] ###!!! ASSERTION: Invalid value
(157286400 / 102760448) for
explicit/js/compartment(http://too-big.com/)/stuff: 'false', file
aboutMemory.js, line 0
12:22:36     INFO -  #01: KERNELBASE + 0x26ea

Yeah, a single unhelpful frame is all you get.

It seems that the first two frames are gotten correctly and then
things go haywire on the third frame. Typically we skip at least the
first two frames so often the stack traces end up empty or almost
empty.

This is a bad situation; stack traces are used in lots of different
places. If anyone has any idea what might be wrong, I'd love to hear
about it. Thank you.

Nick
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to