windows stacktrace not properly symbolized (built with bazel)
I'm using Google glog (glog-0.5.0, latest release at the time) on windows together with bazel 4.1.0 (which is the latest stable release at the time).
I'm initializing the library and install the failure signal handler right at the start:
int main(int argc, char* argv[]) {
// Initialize Google's logging library.
google::InitGoogleLogging(argv[0]);
google::InstallFailureSignalHandler();
// rest of program ...
I compile with
bazel --bazelrc tools/bazel_windows.rc build --verbose_failures -c opt myapp/myapp:app
which I'm calling from the x64 Native Tools Command Prompt for VS 2019 (Visual Studio 2019 Developer Command Prompt v16.6.3)
and I have
build --copt -g
build --strip=never
in my bazel_windows.rc
but when my app crashes, the output I'm getting is:
*** Aborted at 1625663873 (unix time) try "date -d @1625663873" if you are using GNU date ***
@ 0x7ffa3ec91881 raise
@ 0x7ffa3ec92851 abort
@ 0x7ffa3ec91f9f terminate
@ 0x7ff9f3361aab (unknown)
@ 0x7ff9f3362317 (unknown)
@ 0x7ff9f33640d9 (unknown)
@ 0x7ffa40eb207f (unknown)
@ 0x7ffa40e61454 (unknown)
@ 0x7ffa40e611a5 (unknown)
@ 0x7ffa3e954b59 (unknown)
@ 0x7ff9f3406480 (unknown)
@ 0x7ff63571b38e (unknown)
@ 0x7ff635452d90 (unknown)
@ 0x7ff6357b55d3 (unknown)
@ 0x7ff63562349f (unknown)
@ 0x7ffa3ec41bb2 _configthreadlocale
@ 0x7ffa3f707034 (unknown)
@ 0x7ffa40e62651 (unknown)
What do I need to do to get a meaningful stacktrace?
I'm not sure I'm able to help here: I don't know anything about either how the stacktrace symbolization works, or how debug info on Windows works.
If I were you, I'd probably try running the binary in a debugger rather than relying on glog's stacktraces: apologies in advance if this is an unhelpful suggestion. You could also try https://groups.google.com/g/bazel-discuss to see if anyone else has run into this.
@MrMabulous Could you please verify glog at head? This change should be sufficient to obtain a symbolized stacktrace.
I'll close the issue in the meantime. Please let us know if the issue persists.