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
[SR-3122] RepositoryManagerTests failes with malloc_error_break #5181
Comments
Comment by Doug Coleman (JIRA) Meant to include: |
This is definitely some bug in either XCTest or maybe NSCondition (macOS) ... I am not sure which but I was able to create a minimal test case which can reproduces this bug (https://github.com/aciidb0mb3r/malloc_error/blob/master/Tests/mallocTests/mallocTests.swift#L6) . It happens very rarely ~ 1 in 500 runs. How to reproduce? $ xcrun --find swift There would be atleast one test output with: Test Suite 'All tests' started at 2016-11-03 11:37:12.656
Test Suite 'mallocPackageTests.xctest' started at 2016-11-03 11:37:12.657
Test Suite 'mallocTests' started at 2016-11-03 11:37:12.657
Test Case '-[mallocTests.mallocTests testExample]' started.
Test Case '-[mallocTests.mallocTests testExample]' passed (0.001 seconds).
Test Suite 'mallocTests' passed at 2016-11-03 11:37:12.658.
Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'mallocPackageTests.xctest' passed at 2016-11-03 11:37:12.658.
Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'All tests' passed at 2016-11-03 11:37:12.658.
Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.002) seconds
xctest(14092,0x7fffde2be3c0) malloc: *** error for object 0x7fbc19c03e18: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug |
/cc @phausler |
That looks like proper usage of NSCondition. Does this fail on Darwin too? |
This is a Darwin bug so far (I am not sure if we had case where it failed on Linux yet) |
We keep on seeing this on CI, is it possible to disable the test while you are looking into the test? Test Case '-[FunctionalTests.MiscellaneousTestCase testSwiftTestParallelAndReturnError:]' started.
/Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx/swiftpm/Tests/FunctionalTests/MiscellaneousTests.swift:377: error: -[FunctionalTests.MiscellaneousTestCase testSwiftTestParallelAndReturnError:] : failed - executionFailure(error: exit(1): /Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx/buildbot_incremental/swiftpm-macosx-x86_64/debug/swift-test --chdir /var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/Miscellaneous_ParallelTestsPkg.K20E81/Miscellaneous_ParallelTestsPkg --parallel, output: "Tests\n50%: ParallelTestsPkgTests.ParallelTestsTests/testExample1\n100%: ParallelTestsPkgTests.ParallelTestsTests/testExample2\n\nTest Suite \'Selected tests\' started at 2016-11-07 17:55:39.037\nTest Suite \'ParallelTestsPkgPackageTests.xctest\' started at 2016-11-07 17:55:39.038\nTest Suite \'ParallelTestsTests\' started at 2016-11-07 17:55:39.038\nTest Case \'-[ParallelTestsPkgTests.ParallelTestsTests testExample1]\' started.\nTest Case \'-[ParallelTestsPkgTests.ParallelTestsTests testExample1]\' passed (0.001 seconds).\nTest Suite \'ParallelTestsTests\' passed at 2016-11-07 17:55:39.039.\n\t Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.001) seconds\nxctest(8816,0x7fff76458000) malloc: *** error for object 0x7f80ab813e18: incorrect checksum for freed object - object was probably modified after being freed.\n*** set a breakpoint in malloc_error_break to debug\n")
Test Case '-[FunctionalTests.MiscellaneousTestCase testSwiftTestParallelAndReturnError:]' failed (5.729 seconds). |
There are many places where we use NSCondition but since this was failing more than other tests disabled it here 5a239a3 |
This was fixed by apple/swift#5852 |
Additional Detail from JIRA
Watchers: @shahmishal
md5: 637213f7d97f0b64f7100d9f5be79ac0
relates to:
Issue Description:
Test Suite 'RepositoryManagerTests' started at 2016-11-02 09:45:59.171
Test Case '-[SourceControlTests.RepositoryManagerTests testBasicsAndReturnError:]' started.
xctest(67732,0x7fff79ae6000) malloc: *** error for object 0x7fb4969a7418: incorrect checksum for freed object - object was probably modified after being freed.
/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
/Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
Build step 'Execute shell' marked build as failure
[BFA] Scanning build for known causes...
..[BFA] Found failure cause(s):
[BFA] Compile Error from category Compile
[BFA] Done. 2s
[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
Finished: FAILURE
The text was updated successfully, but these errors were encountered: