Repository: google/glog

Issue #630: symbolize_unittest fails with static library (BUILD_SHARED_LIBS=OFF) and disabled usage of gtest (WITH_GTEST=OFF)
Created: 2021-03-31T18:30:34Z
In current trunk of glog, when building with -DWITH_GTEST=ON:
$ make test
Running tests...
Test project /tmp/glog_build
      Start  1: demangle
 1/10 Test  #1: demangle .........................   Passed    0.00 sec
      Start  2: logging
 2/10 Test  #2: logging ..........................   Passed    1.34 sec
      Start  3: signalhandler
 3/10 Test  #3: signalhandler ....................   Passed    0.00 sec
      Start  4: stacktrace
 4/10 Test  #4: stacktrace .......................   Passed    0.00 sec
      Start  5: stl_logging
 5/10 Test  #5: stl_logging ......................   Passed    0.00 sec
      Start  6: symbolize
 6/10 Test  #6: symbolize ........................   Passed    0.00 sec
      Start  7: cmake_package_config_init
 7/10 Test  #7: cmake_package_config_init ........   Passed    0.02 sec
      Start  8: cmake_package_config_generate
 8/10 Test  #8: cmake_package_config_generate ....   Passed    0.76 sec
      Start  9: cmake_package_config_build
 9/10 Test  #9: cmake_package_config_build .......   Passed    1.03 sec
      Start 10: cmake_package_config_cleanup
10/10 Test #10: cmake_package_config_cleanup .....   Passed    0.01 sec

100% tests passed, 0 tests failed out of 10

Total Test time (real) =   3.19 sec

And with -DWITH_GTEST=OFF:
$ make test
Running tests...
Test project /tmp/glog_build
      Start  1: demangle
 1/10 Test  #1: demangle .........................   Passed    0.01 sec
      Start  2: logging
 2/10 Test  #2: logging ..........................   Passed    1.37 sec
      Start  3: signalhandler
 3/10 Test  #3: signalhandler ....................   Passed    0.00 sec
      Start  4: stacktrace
 4/10 Test  #4: stacktrace .......................   Passed    0.00 sec
      Start  5: stl_logging
 5/10 Test  #5: stl_logging ......................   Passed    0.00 sec
      Start  6: symbolize
 6/10 Test  #6: symbolize ........................Subprocess aborted***Exception:   0.01 sec
      Start  7: cmake_package_config_init
 7/10 Test  #7: cmake_package_config_init ........   Passed    0.03 sec
      Start  8: cmake_package_config_generate
 8/10 Test  #8: cmake_package_config_generate ....   Passed    0.89 sec
      Start  9: cmake_package_config_build
 9/10 Test  #9: cmake_package_config_build .......   Passed    1.09 sec
      Start 10: cmake_package_config_cleanup
10/10 Test #10: cmake_package_config_cleanup .....   Passed    0.02 sec

90% tests passed, 1 tests failed out of 10

Total Test time (real) =   3.44 sec

The following tests FAILED:
          6 - symbolize (Subprocess aborted)
Errors while running CTest
make: *** [Makefile:126: test] Error 8
$ ./symbolize_unittest
F20210331 18:28:41.426044 13463 symbolize_unittest.cc:335] CHECK_STREQ failed: symbol == "non_inline_func" (google::thread_msg_data vs. non_inline_func)
*** Check failure stack trace: ***
    @     0x55bb674a3672  google::LogMessage::Fail()
    @     0x55bb674a3552  google::LogMessage::SendToLog()
    @     0x55bb674a2e1e  google::LogMessage::Flush()
    @     0x55bb674a6baf  google::LogMessageFatal::~LogMessageFatal()
    @     0x55bb6749c437  TestWithPCInsideNonInlineFunction
    @     0x55bb6749c6c6  google::thread_msg_data
    @     0x7f5b407c1e60  __libc_start_main
    @     0x55bb6749ba5a  google::thread_msg_data
Aborted

Duplicate issue #845: symbolize_unittest:TestWithReturnAddress() fails on ARM
Created: 2022-08-04T15:25:16Z
User in Gentoo reported that symbolize_unittest:TestWithReturnAddress() fails on ARM.
Original report: https://bugs.gentoo.org/863599
GLog 0.6.0
Output of ctest:
Test project /var/tmp/portage/dev-cpp/glog-0.6.0/work/glog-0.6.0_build-.arm
      Start  1: logging_custom_prefix
 1/17 Test  #1: logging_custom_prefix ............   Passed    5.64 sec
      Start  2: demangle
 2/17 Test  #2: demangle .........................   Passed    0.01 sec
      Start  3: logging
 3/17 Test  #3: logging ..........................   Passed    6.72 sec
      Start  4: signalhandler
 4/17 Test  #4: signalhandler ....................   Passed    0.01 sec
      Start  5: stacktrace
 5/17 Test  #5: stacktrace .......................   Passed    0.01 sec
      Start  6: stl_logging
 6/17 Test  #6: stl_logging ......................   Passed    0.01 sec
      Start  7: symbolize
 7/17 Test  #7: symbolize ........................Subprocess aborted***Exception:   4.20 sec
      Start  8: mock-log
 8/17 Test  #8: mock-log .........................   Passed    0.05 sec
      Start  9: cmake_package_config_init
 9/17 Test  #9: cmake_package_config_init ........   Passed    0.03 sec
      Start 10: cmake_package_config_generate
10/17 Test #10: cmake_package_config_generate ....   Passed    1.00 sec
      Start 11: cmake_package_config_build
11/17 Test #11: cmake_package_config_build .......   Passed    1.55 sec
      Start 12: cmake_package_config_cleanup
12/17 Test #12: cmake_package_config_cleanup .....   Passed    0.02 sec
      Start 13: cleanup_init
13/17 Test #13: cleanup_init .....................   Passed    0.01 sec
      Start 15: cleanup_immediately
14/17 Test #15: cleanup_immediately ..............   Passed    3.18 sec
      Start 16: cleanup_with_absolute_prefix
15/17 Test #16: cleanup_with_absolute_prefix .....   Passed    3.17 sec
      Start 17: cleanup_with_relative_prefix
16/17 Test #17: cleanup_with_relative_prefix .....   Passed    6.17 sec
      Start 14: cleanup_logdir
17/17 Test #14: cleanup_logdir ...................   Passed    0.01 sec

94% tests passed, 1 tests failed out of 17

Total Test time (real) =  31.82 sec

The following tests FAILED:
	  7 - symbolize (Subprocess aborted)
Errors while running CTest
Output from these tests are in: /var/tmp/portage/dev-cpp/glog-0.6.0/work/glog-0.6.0_build-.arm/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

Fragment of LastTest.log:
7/17 Testing: symbolize
7/17 Test: symbolize
Command: "/var/tmp/portage/dev-cpp/glog-0.6.0/work/glog-0.6.0_build-.arm/symbolize_unittest"
Directory: /var/tmp/portage/dev-cpp/glog-0.6.0/work/glog-0.6.0_build-.arm
"symbolize" start time: Aug 04 07:04 CEST
Output:
----------------------------------------------------------
F20220804 07:04:56.388806    82 symbolize_unittest.cc:373] CHECK_STREQ failed: symbol == "main" (google::thread_msg_data vs. main)
*** Check failure stack trace: ***
    @   0x8aeddc  google::LogMessage::SendToLog()
    @   0x8aac60  google::LogMessage::Flush()
    @   0x8ac4cc  google::LogMessageFatal::~LogMessageFatal()
    @   0x8a5cdc  TestWithReturnAddress()
    @   0x8a41b0  google::thread_msg_data
    @ 0xf7afd90c  (unknown)
    @ 0xf7afda14  (unknown)
    @   0x8a58a0  google::thread_msg_data
<end of output>
Test time =   4.20 sec
----------------------------------------------------------
Test Failed.
"symbolize" end time: Aug 04 07:05 CEST
"symbolize" time elapsed: 00:00:04
----------------------------------------------------------

Closing comment (2024-01-08T18:32:46Z): Similar to #630 this should no longer be an issue with glog at head.
Please verify and report in case the issue persists.