CI Build Updates#5308
Merged
Merged
Conversation
Provide a sane default for `CMAKE_GENERATOR` in the build script so that it can be invoked without having to set that in the environment.
The lsb-release command is missing on our images; just show the information from the file instead of relying on it.
libcrypto will read uninitialized memory as entropy. Suppress warnings from this behavior.
Member
Author
|
It gets better: the version of valgrind on the Ubuntu Xenial images has a broken Sigh. |
2c16b20 to
2ceeb9d
Compare
Deleting the apt cache can be helpful for reducing the size of a container, but since we don't push it anywhere, it only hinders our ability to debug problems while working on the container. Keep it.
Use a multi-stage docker build so that we can cache early stages and not need to download the apt-provided dependencies during every build (when only later stages change).
The valgrind in the PPA is broken and ignores `--exit-errorcode`. Build and install our own.
Our docker builds are getting expensive, let's cache some of this.
61469fc to
6dd6742
Compare
We currently talk to Azure Repos for executing an online test (online::clone::path_whitespace). Add a simpler test to talk to Azure Repos to make it obvious that strange test failures are not likely the whitespace in the path, but actually a function of talking to Azure Repos itself.
6dd6742 to
eb3e31c
Compare
valgrind will warn that OpenSSL will use undefined data in connect/read when talking to certain other TLS stacks. Thankfully, this only seems to occur when gcc is the compiler, so hopefully valgrind is just misunderstanding an optimization. Regardless, suppress this warning.
Provide usage hints to valgrind. We trust the data coming back from OpenSSL to have been properly initialized. (And if it has not, it's an OpenSSL bug, not a libgit2 bug.) We previously took the `VALGRIND` option to CMake as a hint to disable mmap. Remove that; it's broken. Now use it to pass on the `VALGRIND` definition so that sources can provide valgrind hints.
eb3e31c to
c863b3c
Compare
Member
Author
|
Merging this so that CI is reliable again. |
pks-t
reviewed
Nov 28, 2019
Member
pks-t
left a comment
There was a problem hiding this comment.
Thanks a lot for these changes, they all look good to me. I'm always baffled by the amount of broken stuff we're dealing with when using Ubuntu. Broken libssh2 as it does produce memory leaks and other stuff by default, non-working valgrind options, a whole lot of suppressions...
Anyway, thanks for taking care of these issues!
| path: /tmp/dockercache | ||
| - script: | | ||
| if [ -f /tmp/dockercache/${{parameters.docker.image}}.tar ]; then docker load < /tmp/dockercache/${{parameters.docker.image}}.tar; fi | ||
| displayName: 'Load Docker cache' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our CI builds are currently flaky. Some of these issues are related to the upgrade to xenial for our Linux build and test runs. Some of them snuck in because that move destabilized our CI and we didn't catch problems.
Here are some issues:
libssh2.so, but we're currently statically linking againstlibssh2. Thus the suppression file can't match those symbols and we see a number of valgrind errors.--exit-errorcodeis ignored. 😳Fixes:
libssh2.so.--exit-errorcodeworks again.i. Extend the suppressions for valgrind to include uninitialized usage stemming from OpenSSL.
ii. Mark memory returned from OpenSSL as initialized explicitly.
In addition, there are a few build process enhancements:
-G, so it needs a default to supply if none was given in the environment.docker buildwill pick up again from the first modified stage, re-using the unchanged stages from the cache.apt-get install ...tools in the container. This bloats the image somewhat, but since we don't store it in a registry, this is of limited pain.