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 unittest hangs on MSVC #328

Closed
NeroBurner opened this issue Jun 19, 2018 · 0 comments
Closed

stacktrace unittest hangs on MSVC #328

NeroBurner opened this issue Jun 19, 2018 · 0 comments
Labels

Comments

@NeroBurner
Copy link
Contributor

NeroBurner commented Jun 19, 2018

With MSVC compiler the stacktrace unittest hangs until killed

tested with the following MSVC versions:

  • MSVC 14 2015 sdk 8.1
  • MSVC 14 2015 Win64
  • MSVC 15 2017 Win64

for reference the test command output of MSVC 14 2015 sdk 8.1

cmake --build _build_Debug --target RUN_TESTS
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 6/19/2018 4:06:22 AM.
The target "CopyLocalFilesOutputGroup" listed in a BeforeTargets attribute at "C:\Tools\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets (80,82)" does not exist in the project, and will be ignored.
The target "CopyLocalFilesOutputGroup" listed in a BeforeTargets attribute at "C:\Tools\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets (80,82)" does not exist in the project, and will be ignored.
Project "C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj" on node 1 (default targets).
Project "C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj" (1) is building "C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
InitializeBuildStatus:
  Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  All outputs are up-to-date.
FinalizeBuildStatus:
  Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
  Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\ZERO_CHECK.vcxproj" (default targets).
PrepareForBuild:
  Creating directory "x64\Debug\RUN_TESTS\".
  Creating directory "x64\Debug\RUN_TESTS\RUN_TESTS.tlog\".
InitializeBuildStatus:
  Creating "x64\Debug\RUN_TESTS\RUN_TESTS.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
PostBuildEvent:
  setlocal
  "C:\Program Files (x86)\CMake\bin\ctest.exe" --force-new-ctest-process -C Debug
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  :VCEnd
  Test project C:/projects/glog/_build_vs-14-2015-sdk-8-1_Debug
      Start 1: demangle
  1/6 Test #1: demangle .........................   Passed    0.04 sec
      Start 2: logging
  2/6 Test #2: logging ..........................***Failed    0.46 sec
  Passed 8 tests
  
  PASS
  Test with golden file failed. We'll try to show the diff:
  --- C:/projects/glog/src/logging_unittest.err.munged	2018-06-19 04:06:24.146193100 -0700
  +++ "C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\/captured.err.munged"	2018-06-19 04:06:24.146193100 -0700
  @@ -80,7 +80,7 @@
   IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo bar 10 3.400000
   WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: array
   IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: const array
  -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: ptr 12345678
  +IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: ptr 0000000012345678
   IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: ptr 0000000000000000
   EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo 1000 0000001000 3e8
   IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo 1000
  diff command was failed.
  Check failed: MungeAndDiffTestStderr(FLAGS_test_srcdir + "/src/logging_unittest.err")
  
      Start 3: signalhandler
  3/6 Test #3: signalhandler ....................   Passed    0.01 sec
      Start 4: stacktrace
  4/6 Test #4: stacktrace .......................***Timeout 1500.01 sec
  Obtained 10 stack frames.
  Backtrace 0: expected: 00007FF69B2B4500..00007FF69B2B4600  actual: 00007FF69B2B459F ... OK
  Backtrace 1: expected: 00007FF69B2B4840..00007FF69B2B4940  actual: 00007FF69B2B48CB ... OK
  Backtrace 2: expected: 00007FF69B2B48E0..00007FF69B2B49E0  actual: 00007FF69B2B496F ... OK
  Backtrace 3: expected: 00007FF69B2B4990..00007FF69B2B4A90  actual: 00007FF69B2B4A1F ... OK
  Backtrace 4: expected: 00007FF69B2B4A40..00007FF69B2B4B40  actual: 00007FF69B2B4ACF ... OK
  Backtrace 5: expected: 00007FF69B2B1E38..00007FF69B2B1F38  actual: 00007FF69B2B44E9 ... F0619 04:06:24.263830   504 stacktrace_unittest.cc:109] Check failed: ret_addr <= range.end (00007FF69B2B44E9 vs. 00007FF69B2B1F38) 
  *** Check failure stack trace: ***
      @   00007FF69B2B716B  google::LogMessage::Fail
      @   00007FF69B2B7071  google::LogMessage::SendToLog
      @   00007FF69B2B6857  google::LogMessage::Flush
      @   00007FF69B2B8461  google::LogMessageFatal::~LogMessageFatal
      @   00007FF69B2B4443  CheckRetAddrIsInFunction
      @   00007FF69B2B47EE  CheckStackTraceLeaf
      @   00007FF69B2B48CB  CheckStackTrace4
      @   00007FF69B2B496F  CheckStackTrace3
      @   00007FF69B2B4A1F  CheckStackTrace2
      @   00007FF69B2B4ACF  CheckStackTrace1
      @   00007FF69B2B44E9  CheckStackTrace
      @   00007FF69B2B4B36  main
      @   00007FF69B2D4C24  invoke_main
      @   00007FF69B2D4AC7  __scrt_common_main_seh
      @   00007FF69B2D498E  __scrt_common_main
      @   00007FF69B2D4C49  mainCRTStartup
      @   00007FFCEA108364  BaseThreadInitThunk
      @   00007FFCEBEA70B1  RtlUserThreadStart
  
      Start 5: stl_logging
  5/6 Test #5: stl_logging ......................   Passed    0.01 sec
      Start 6: symbolize
  6/6 Test #6: symbolize ........................   Passed    0.02 sec
  
  67% tests passed, 2 tests failed out of 6
  
  Total Test time (real) = 1500.56 sec
  
  The following tests FAILED:
  	  2 - logging (Failed)
  	  4 - stacktrace (Timeout)
  Errors while running CTest
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files (x86)\CMake\bin\ctest.exe" --force-new-ctest-process -C Debug [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1 [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 8. [C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj]
Done Building Project "C:\projects\glog\_build_vs-14-2015-sdk-8-1_Debug\RUN_TESTS.vcxproj" (default targets) -- FAILED.

edit: compiled without GFLAGS, master abce788

cmake: renamed GFLAGS_NAMESPACE to GLOG_GFLAGS_NAMESPACE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants