Unit test failure, Child aborted
adamjstewart opened this issue · comments
When I try to run the test suite, it immediately crashes:
$ make test
Running tests...
/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/cmake-3.15.1-2pyamocwigucvikvjvtuonstdv3zdadd/bin/ctest --force-new-ctest-process
Test project /private/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/pytest-of-Adam/pytest-12/mock-stage0/uriparser-0.9.3-ukpixytfp2y2g4jlwl6gmqdrm5mkyk4c/spack-build
Start 1: test
1/1 Test #1: test .............................Child aborted***Exception: 0.01 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.02 sec
The following tests FAILED:
1 - test (Child aborted)
Errors while running CTest
make: *** [test] Error 8
This is with uriparser 0.9.3, CMake 3.15.1, and Clang 10.0.1 on macOS 10.14.6. Let me know if I can provide you with any more debug info.
Hi Adam,
can you share your command to call CMake? Any parameters other than a folder name there?
You could try running the testrunner binary directly — ./testrunner
— to see it's the output gives any insights. Let me know.
Hi Sebastian,
Here is the CMake command:
$ cmake .. -G Unix Makefiles -DCMAKE_INSTALL_PREFIX:PATH=/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/uriparser-0.9.3-ukpixytfp2y2g4jlwl6gmqdrm5mkyk4c -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_FIND_FRAMEWORK:STRING=LAST -DCMAKE_FIND_APPBUNDLE:STRING=LAST -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE -DCMAKE_INSTALL_RPATH:STRING=/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/uriparser-0.9.3-ukpixytfp2y2g4jlwl6gmqdrm5mkyk4c/lib;/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/uriparser-0.9.3-ukpixytfp2y2g4jlwl6gmqdrm5mkyk4c/lib64 -DCMAKE_PREFIX_PATH:STRING=/Users/Adam/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/cmake-3.15.1-2pyamocwigucvikvjvtuonstdv3zdadd -DURIPARSER_BUILD_TESTS:BOOL=ON -DURIPARSER_BUILD_DOCS:BOOL=OFF
The detailed test output:
$ ./testrunner
[==========] Running 90 tests from 11 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from FourSuite
[ RUN ] FourSuite.AbsolutizeTestCases
[ OK ] FourSuite.AbsolutizeTestCases (1 ms)
[ RUN ] FourSuite.RelativizeTestCases
[ OK ] FourSuite.RelativizeTestCases (0 ms)
[ RUN ] FourSuite.GoodUriReferences
[ OK ] FourSuite.GoodUriReferences (0 ms)
[ RUN ] FourSuite.BadUriReferences
[ OK ] FourSuite.BadUriReferences (0 ms)
[ RUN ] FourSuite.CaseNormalizationTests
[ OK ] FourSuite.CaseNormalizationTests (0 ms)
[ RUN ] FourSuite.PctEncNormalizationTests
[ OK ] FourSuite.PctEncNormalizationTests (0 ms)
[ RUN ] FourSuite.PathSegmentNormalizationTests
[ OK ] FourSuite.PathSegmentNormalizationTests (0 ms)
[----------] 7 tests from FourSuite (1 ms total)
[----------] 2 tests from MemoryManagerCompletenessSuite
[ RUN ] MemoryManagerCompletenessSuite.AllFunctionMembersRequired
testrunner(49073,0x1171d25c0) malloc: *** error for object 0x7fff9b1b31a8: pointer being freed was not allocated
testrunner(49073,0x1171d25c0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
I'm starting to wonder if there's a bug in my GoogleTest installation. I ran the unit tests for libkml
and they all failed with the same Child aborted***Exception:
message. I'm using GoogleTest 1.8.1 for the record.
Since memory access is involved, maybe throwing AddressSanitizer in can shed some light. I'm thinking of something like this:
cmake -DCMAKE_{C,CXX,{EXE,SHARED}_LINKER}_FLAGS=-fsanitize=address -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ . && make VERBOSE=1 clean all test || ./testrunner
PS: Maybe it's indeed GTest.
I fixed a bug in GTest, but that didn't fix this memory issue. I'll try to track this down when I get a chance.
Sounds good, please keep me in the loop. Thank you!
@adamjstewart any news?
Nah, haven’t gotten a chance to look into this.
Any idea when you'll find time?
Closing for now, happy to re-open as needed.
hi @adamjstewart i am also getting this issue while running smoke tests in c++ using g test but in my case its only happening in our jenkins machine, on my pc its working fine
@Shahrukh-AAI I'm happy to help but I'll need enough details to reproduce the issue.
hi @adamjstewart i am also getting this issue while running smoke tests in c++ using g test but in my case its only happening in our jenkins machine, on my pc its working fine
hello @Shahrukh-AAI have you found the root cause of this, i encountered the same issue, it works well on the PC but failed on the Jenkins machine