Skip to content

[linux] Re-enable parallel testing after avoiding static destructors #269

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

Merged

Conversation

benlangmuir
Copy link
Contributor

This should avoid the crash that has been affecting parallel testing on Ubuntu 16.04.

After updating libsourcekitdInProc to stop exporting all of the llvm
symbols, we can now safely load it without RTLD_DEEPBIND. This notably
fixes running with asan on Linux.
To prevent crashes during `exit` caused by SR-12668, avoid running
static destructors. During testing, we do this by interposing
`__cxa_exit` to prevent registration of destructors. This depends on the
previous commit that disabled RTLD_DEEPBIND. In the sourcekit-lsp
executable, since we control the exit points, we can make a less
invasive change to just use `_Exit` instead of `exit` to avoid cleanups.

This should hopefully fix the CI issues we have seen when testing with
--parallel.

rdar://61837752
@benlangmuir
Copy link
Contributor Author

swiftlang/swift#31287
@swift-ci please test

@benlangmuir
Copy link
Contributor Author

swiftlang/swift#31287
@swift-ci please test

@benlangmuir
Copy link
Contributor Author

Locally tested by running tests with --parallel >300 times in a row on Ubuntu 16.04 with no failures. Previously I would see this crash after ~10-20 runs.

@benlangmuir
Copy link
Contributor Author

swiftlang/swift#31287
@swift-ci please test

@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir benlangmuir force-pushed the parallelize-but-not-destructorize branch from 5bffd44 to 4c925df Compare April 27, 2020 19:10
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir benlangmuir merged commit 5892c04 into swiftlang:master Apr 27, 2020
@benlangmuir benlangmuir deleted the parallelize-but-not-destructorize branch April 27, 2020 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant