Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktrace is empty when using bazel-built glog (aarch64, x86_64) #896

Closed
dmellosanjay opened this issue Feb 23, 2023 · 5 comments
Closed
Assignees

Comments

@dmellosanjay
Copy link

I have tested glog 0.4.0, 0.5.0 and 0.6.0 on aarch64 and x86_64 Linux (Ubuntu 18.04) machines and was able to get a stack trace only when I used glog 0.5.0 on a x86_64 Linux machine.

Here's an instance of a test on an aarch64 linux machine using 0.6.0

Test Code:

#include <glog/logging.h>
 
void bar(int x) {
  int* invalid_location = 0;
  int temp;

  //temp = *invalid_location;
  CHECK_EQ(x, 1);
}
 
void foo(int x) {
  bar(x + 1);
}

int main(int argc, char** argv) {
  google::InstallFailureSignalHandler();
  foo(1);
}

Expected result:

WARNING: Logging before InitGoogleLogging() is written to STDERR
F20230223 22:31:24.688732  4806 stack_trace.cpp:8] Check failed: x == 1 (2 vs. 1) 
*** Check failure stack trace: ***
*** Aborted at 1677191484 (unix time) try "date -d @1677191484" if you are using GNU date ***
PC: @                0x0 (unknown)
*** SIGABRT (@0x12c6) received by PID 4806 (TID 0x7f5719ac6740) from PID 4806; stack trace: ***
    @     0x7f57196bd980 (unknown)
    @     0x7f57189b9e87 gsignal
    @     0x7f57189bb7f1 abort
    @           0x21e629 google::logging_fail()
    @           0x21e61d google::LogMessage::Fail()
    @           0x21da78 google::LogMessage::SendToLog()
    @           0x21e2fd google::LogMessage::Flush()
    @           0x221ea9 google::LogMessageFatal::~LogMessageFatal()
    @           0x21c0dd bar()
    @           0x21c116 foo()
    @           0x21c13e main
    @     0x7f571899cc87 __libc_start_main
    @           0x21bf8a _start
    @                0x0 (unknown)
Aborted (core dumped)

Actual Result:

WARNING: Logging before InitGoogleLogging() is written to STDERR
F20230223 22:31:07.857421  1853 stack_trace.cpp:8] Check failed: x == 1 (2 vs. 1) 
*** Check failure stack trace: ***
*** Aborted at 1677191467 (unix time) try "date -d @1677191467" if you are using GNU date ***
PC: @                0x0 (unknown)
Aborted (core dumped)
@sergiud
Copy link
Collaborator

sergiud commented Feb 24, 2023

Can you bisect to determine the commit that introduced the regression?

@dmellosanjay
Copy link
Author

@sergiud I see this issue was fixed for x86_64 in #851. This was broken in release 0.6.0.

Still doesn't work on aarch64 though.

@sergiud
Copy link
Collaborator

sergiud commented Feb 25, 2023

Did you pinpoint the commit that broke aarch64 symbolization?

@dmellosanjay
Copy link
Author

@sergiud I haven't come across a commit that worked for aarch64. I've tested 0.4.0, 0.5.0, 0.6.0 and latest commit on master as of last week.

@sergiud
Copy link
Collaborator

sergiud commented Feb 28, 2023

Should be fixed by #905.

@sergiud sergiud closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants