Skip to content

Conversation

matt-kwong
Copy link
Contributor

@matt-kwong matt-kwong commented May 21, 2018

Add a Dockerfile that uses a RBE base image with Clang 7 to run sanitizers.

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@@ -14,15 +14,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:jessie
FROM gcr.io/cloud-marketplace/google/rbe-debian8@sha256:496193842f61c9494be68bd624e47c74d706cabf19a693c4653ffe96a97e43e3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add an explanatory comment what's the image about - the image name is incomprehensible for someone who doesn't have lot of knowledge about foundry/RBE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in new Dockerfile

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:jessie
FROM gcr.io/cloud-marketplace/google/rbe-debian8@sha256:496193842f61c9494be68bd624e47c74d706cabf19a693c4653ffe96a97e43e3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed, let's introduce a separate rbe clang image (cxx_sanitizers.. ) and use cxx_jessie_x64 (after removing clang) for running basic C/C++ suites.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/grpc/grpc/blob/master/tools/run_tests/run_tests.py#L526

We actually use the current Jessie Dockerfile for clang3.5. clang3.5 is installed in https://github.com/grpc/grpc/blob/master/tools/dockerfile/test/cxx_jessie_x64/Dockerfile#L73, so we at least have to keep that version of clang, but I'm fine with removing the version installed from source.

Before updating my PR, since I forgot to remove clang, are you ok with the name cxx_rbe_jessie_x64 or do you think cxx_sanitizers_x64 is better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think cxx_sanitizers_... is better because it's more readable. no one knows what rbe is.

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@matt-kwong
Copy link
Contributor Author

@matt-kwong matt-kwong changed the title Use RBE's Jessie base image Add Dockerfile using RBE's Jessie base image May 22, 2018
@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@@ -29,4 +29,4 @@
RUN apt-get update && apt-get -y install gcc-4.8 gcc-4.8-multilib g++-4.8 g++-4.8-multilib && apt-get clean

# Define the default command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove <%include file="../../clang_update.include"/> from this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,31 @@
%YAML 1.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not that many folks know what RBE means -> either add a comment or rename.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the name of the file

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link

[trickle] No significant performance differences

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@matt-kwong
Copy link
Contributor Author

matt-kwong commented May 23, 2018

@jtattermusch I think this is ready for review. This PR introduces two ASAN C++ failures, both bm_clousure. It introduces at least one TSAN C++ failure, but there might be more failures since we sample tests for most sanitizers.

@grpc-testing
Copy link

[trickle] No significant performance differences

@@ -490,6 +490,14 @@ def makefile_name(self):
return 'Makefile'

def _clang_make_options(self, version_suffix=''):
if self.args.config == 'ubsan':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to special-case ubsan?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @nicolasnoble

I'm actually not sure why UBSAN is a special case. If anything, I expect all of the sanitizers to break. Before this change, UBSAN wouldn't build from a linking error because it would use clang instead of clang++ as the LD. Our Makefile specifies that the LD for all sanitizers should be clang++, but I'm guessing run_tests.py overrides that behavior.

Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but please see the comment about special-casing ubsan).

@grpc-testing
Copy link

[microbenchmarks] No significant performance differences

@matt-kwong
Copy link
Contributor Author

MacOS failure - #15027

After a master sanitizer build runs all tests, I'll open issues for the new test failures.

@matt-kwong matt-kwong merged commit f30db9d into grpc:master May 23, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants