symbolize_unittest:TestWithReturnAddress() fails on ARM
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
----------------------------------------------------------
Thanks for the report. This looks the same as #630, no?
I am not sure. Backtrace is very similar, but GLog is built as shared library in Gentoo.
Does disabling TLS help?
Do you mean that potential set_target_properties (symbolize_unittest PROPERTIES CXX_VISIBILITY_PRESET default) change in CMakeLists.txt?
Or something else?
I mean configuring glog with -DWITH_TLS=OFF.
According to @asarubbo:
- glog 0.5.0 passes tests.
- glog 0.6.0 with
set_target_properties (symbolize_unittest PROPERTIES CXX_VISIBILITY_PRESET default)added toCMakeLists.txtstill has the same failure insymbolize_unittest:TestWithReturnAddress(). - glog 0.6.0 configured with
-DWITH_TLS=OFFpasses tests.
However I would prefer to not disable TLS feature.
Similar to #630 this should no longer be an issue with glog at head.
Please verify and report in case the issue persists.