Skip to content
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

ARROW-16734: [C++] Bump vendored version of protobuf #13581

Merged
merged 4 commits into from Jul 14, 2022

Conversation

raulcd
Copy link
Member

@raulcd raulcd commented Jul 12, 2022

No description provided.

@github-actions
Copy link

@raulcd
Copy link
Member Author

raulcd commented Jul 12, 2022

@github-actions crossbow submit -g cpp

@github-actions
Copy link

Revision: 3a7527b

Submitted crossbow builds: ursacomputing/crossbow @ actions-132e28e192

Task Status
test-build-cpp-fuzz Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-debian-10-cpp-amd64 Github Actions
test-debian-10-cpp-i386 Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-fedora-35-cpp Github Actions
test-ubuntu-18.04-cpp Github Actions
test-ubuntu-18.04-cpp-release Github Actions
test-ubuntu-18.04-cpp-static Github Actions
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-14 Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-22.04-cpp Github Actions

@raulcd raulcd changed the title ARROW-16733: [C++] Bump vendored version of protobuf ARROW-16734: [C++] Bump vendored version of protobuf Jul 12, 2022
@github-actions
Copy link

@raulcd
Copy link
Member Author

raulcd commented Jul 13, 2022

@github-actions crossbow submit -g cpp

@raulcd
Copy link
Member Author

raulcd commented Jul 13, 2022

@pitrou @lidavidm The latest version of protocol buffers is the following (there was a change of schema versioning between v3.20 and v21):

ARROW_PROTOBUF_BUILD_VERSION=v21.2
ARROW_PROTOBUF_BUILD_SHA256_CHECKSUM=9ae699200f3a80c735f9dc3b20e46d447584266f4601403e8fe5b97005f204dd

If I try to set the latest version all code and test works but there is a failure on the thread-sanitizer job building substrait.
See part of the stack trace for this build (https://github.com/ursacomputing/crossbow/runs/7302033023?check_suite_focus=true):

[86/902] Building CXX object CMakeFiles/substrait.dir/substrait_ep-generated/substrait/type.pb.cc.o
FAILED: CMakeFiles/substrait.dir/substrait_ep-generated/substrait/type.pb.cc.o 
/usr/bin/ccache /usr/lib/ccache/clang++-12  -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DARROW_NO_DEPRECATED_API -DARROW_WITH_RE2 -DARROW_WITH_TIMING_TESTS -DARROW_WITH_UTF8PROC -DDYNAMIC_ANNOTATIONS_ENABLED -DTHREAD_SANITIZER -D_GLIBCXX_EXTERN_TEMPLATE=0 -Isubstrait_ep-generated -Iprotobuf_ep-install/include -Isrc -I/arrow/cpp/src -I/arrow/cpp/src/generated -Qunused-arguments -fcolor-diagnostics -ggdb -O0  -Wall -Wextra -Wdocumentation -Wshorten-64-to-32 -Wno-missing-braces -Wno-unused-parameter -Wno-constant-logical-operand -Wno-return-stack-address -Werror -Wno-unknown-warning-option -Wno-pass-failed -msse4.2  -fsanitize-blacklist=/arrow/cpp/build-support/sanitizer-disallowed-entries.txt -g -fPIC   -fsanitize=thread -std=c++11 -MD -MT CMakeFiles/substrait.dir/substrait_ep-generated/substrait/type.pb.cc.o -MF CMakeFiles/substrait.dir/substrait_ep-generated/substrait/type.pb.cc.o.d -o CMakeFiles/substrait.dir/substrait_ep-generated/substrait/type.pb.cc.o -c substrait_ep-generated/substrait/type.pb.cc
In file included from substrait_ep-generated/substrait/type.pb.cc:4:
In file included from substrait_ep-generated/substrait/type.pb.h:28:
In file included from protobuf_ep-install/include/google/protobuf/generated_message_reflection.h:47:
In file included from protobuf_ep-install/include/google/protobuf/unknown_field_set.h:53:
protobuf_ep-install/include/google/protobuf/parse_context.h:328:47: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    int chunk_size = buffer_end_ + kSlopBytes - ptr;
        ~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:342:45: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
      chunk_size = buffer_end_ + kSlopBytes - ptr;
                 ~ ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:786:41: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
  int nbytes = buffer_end_ + kSlopBytes - ptr;
      ~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:804:39: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    nbytes = buffer_end_ + kSlopBytes - ptr;
           ~ ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:836:32: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
  int chunk_size = buffer_end_ - ptr;
      ~~~~~~~~~~   ~~~~~~~~~~~~^~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:840:23: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    int overrun = ptr - buffer_end_;
        ~~~~~~~   ~~~~^~~~~~~~~~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:861:30: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    chunk_size = buffer_end_ - ptr;
               ~ ~~~~~~~~~~~~^~~~~
protobuf_ep-install/include/google/protobuf/parse_context.h:884:25: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
  uint32_t number = tag >> 3;
           ~~~~~~   ~~~~^~~~
8 errors generated.

This seems to be a substrait issue more than ARROW but I wanted to get your thoughts on this.
The current updated version on this PR is the latest before the change of schema versioning which works for the sanitizer job (I reproduced the issue locally).

@github-actions
Copy link

Revision: 9253949

Submitted crossbow builds: ursacomputing/crossbow @ actions-529e93f4b6

Task Status
test-build-cpp-fuzz Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-debian-10-cpp-amd64 Github Actions
test-debian-10-cpp-i386 Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-fedora-35-cpp Github Actions
test-ubuntu-18.04-cpp Github Actions
test-ubuntu-18.04-cpp-release Github Actions
test-ubuntu-18.04-cpp-static Github Actions
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-14 Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-22.04-cpp Github Actions

@lidavidm
Copy link
Member

this is really a protobuf issue and we already suppress such warnings for MSVC which is stricter about these things

set(SUBSTRAIT_SUPPRESSED_WARNINGS)
if(MSVC)
# Protobuf generated files trigger some spurious warnings on MSVC.
# Implicit conversion from uint64_t to uint32_t:
list(APPEND SUBSTRAIT_SUPPRESSED_WARNINGS "/wd4244")
# Missing dll-interface:
list(APPEND SUBSTRAIT_SUPPRESSED_WARNINGS "/wd4251")
endif()

looks like we need to suppress them for all compilers now

@raulcd
Copy link
Member Author

raulcd commented Jul 13, 2022

@github-actions crossbow submit test-ubuntu-20.04-cpp-thread-sanitizer

@github-actions
Copy link

Revision: e80016f

Submitted crossbow builds: ursacomputing/crossbow @ actions-33d6602cc3

Task Status
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions

@raulcd
Copy link
Member Author

raulcd commented Jul 13, 2022

It seems it is only on clang because we specifically build with: -Wshorten-64-to-32: https://github.com/apache/arrow/blob/master/cpp/cmake_modules/SetupCxxFlags.cmake#L285
Supressing the errors fixes the build.

@raulcd
Copy link
Member Author

raulcd commented Jul 13, 2022

@github-actions crossbow submit -g cpp

@raulcd raulcd marked this pull request as ready for review July 13, 2022 14:27
@github-actions
Copy link

Revision: e80016f

Submitted crossbow builds: ursacomputing/crossbow @ actions-6d7f56138a

Task Status
test-build-cpp-fuzz Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-debian-10-cpp-amd64 Github Actions
test-debian-10-cpp-i386 Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-fedora-35-cpp Github Actions
test-ubuntu-18.04-cpp Github Actions
test-ubuntu-18.04-cpp-release Github Actions
test-ubuntu-18.04-cpp-static Github Actions
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-14 Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-22.04-cpp Github Actions

@lidavidm lidavidm merged commit 5d86e9f into apache:master Jul 14, 2022
@ursabot
Copy link

ursabot commented Jul 15, 2022

Benchmark runs are scheduled for baseline = e766828 and contender = 5d86e9f. 5d86e9f is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.63% ⬆️0.59%] test-mac-arm
[Failed ⬇️0.63% ⬆️0.32%] ursa-i9-9960x
[Finished ⬇️0.18% ⬆️0.07%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 5d86e9fc ec2-t3-xlarge-us-east-2
[Failed] 5d86e9fc test-mac-arm
[Failed] 5d86e9fc ursa-i9-9960x
[Finished] 5d86e9fc ursa-thinkcentre-m75q
[Finished] e766828c ec2-t3-xlarge-us-east-2
[Failed] e766828c test-mac-arm
[Failed] e766828c ursa-i9-9960x
[Finished] e766828c ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants