Bug #64907
closedSome jammy jenkins builders had rogue versions of protobuf packages
0%
Description
This is a breakout of the original issue from https://tracker.ceph.com/issues/64696
sjust and dmick diagnosed a build failure involving /usr/bin/protoc not being the expected version on jammy builders. Someone/something had installed a /usr/bin/protoc-25.1.0 and symlinked /usr/bin/protoc to it, which broke the build. This was
cross-checked by running debsums protobuf-compiler, which reported the installed
binary was not the one the package contained. The rogue version was manually uninstalled and the package forcibly reinstalled (with apt install --reinstall protobuf-compiler).
Later, Rixin Luo reported similar version mismatches appearing in a build with a similar, maybe same, error message:
/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/seastar/gen/src/proto/metrics2.pb.h:17:2: error: This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/seastar/gen/src/proto/metrics2.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/seastar/gen/src/proto/metrics2.pb.h:19:2: error: regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
Rixin Luo discovered that the version of protobuf.pc installed referred to a different version than looked correct (again, 25.1.0). debsums again found errors in libprotobuf-dev (which contains the .pc file, as well as a lot of header files and other things that mismatched). On all the hosts where that was the case (irvingi05 and adami08), libprotobuf-dev was forcibly reinstalled, which fixed the version in protobuf.pc to match the reported version of libprotoc from protoc --version.
This shell script helped to identify the package damage, after installing debsums on the hosts in question:
#!/bin/bash
for p in $(dpkg -l '*protobuf*' | grep '^ii' | awk '{print $2;}'); do
if ! debsums -s $p >/dev/null 2>&1; then
echo $p failed
fi
done
CB Updated by Casey Bodley over 2 years ago · Edited
braggi09 https://jenkins.ceph.com/job/ceph-pull-requests/140788/
adami08 https://jenkins.ceph.com/job/ceph-pull-requests/140720/
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-targets.cmake:111 (message):
The imported target "protobuf::protoc" references the file
"/usr/bin/protoc-25.1.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-targets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-config.cmake:14 (include)
src/CMakeLists.txt:390 (_find_package)
src/seastar/cmake/SeastarDependencies.cmake:162 (find_package)
src/seastar/CMakeLists.txt:399 (seastar_find_dependencies)
MB Updated by Matan Breizman over 2 years ago · Edited
Laura Flores wrote in #note-3:
I'm not sure that the newer occurrences are the same as the original ones:
-- Found yaml-cpp: /usr/lib/x86_64-linux-gnu/libyaml-cpp.so (found suitable version "0.7.0", minimum required is "0.5.1")
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-config.cmake:14 (include):
include could not find requested file:
/usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-targets.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:391 (_find_package)
src/seastar/cmake/SeastarDependencies.cmake:162 (find_package)
src/seastar/CMakeLists.txt:399 (seastar_find_dependencies)
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-config.cmake:14 (include):
include could not find requested file:
/usr/lib/x86_64-linux-gnu/cmake/protobuf/protobuf-targets.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:391 (_find_package)
src/seastar/cmake/SeastarDependencies.cmake:165 (find_package)
src/seastar/CMakeLists.txt:399 (seastar_find_dependencies)
-- Found ragel: /usr/bin/ragel (Required is at least version "6.10")
-- Found PthreadSetName: 1
From SeastarDependencies.cmake:
# workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/25079
# since protobuf v22.0, it started using abseil, see
# https://github.com/protocolbuffers/protobuf/releases/tag/v22.0 .
# but due to https://gitlab.kitware.com/cmake/cmake/-/issues/25079,
# CMake's FindProtobuf does add this linkage yet. fortunately,
# ProtobufConfig.cmake provided by protobuf defines this linkage. so we try
# the CMake package configuration file first, and fall back to CMake's
# FindProtobuf module.
find_package (Protobuf QUIET CONFIG)
if (Protobuf_FOUND AND Protobuf_VERSION VERSION_GREATER_EQUAL 2.5.0)
# do it again, so the message is printed when the package is found
find_package(Protobuf CONFIG REQUIRED)
else ()
find_package(Protobuf 2.5.0 REQUIRED)
endif ()
endmacro ()
AK Updated by adam kraitman about 2 years ago
- Status changed from New to In Progress
I re-imaged braggi09 with Ubuntu jammy and ran the builder ansible-playbook, I used a PXE with a tftp server to boot in to a live CD and manually installed jammy on braggi09, I will add the steps to the Wiki, while running the builder ansible-playbook I got this error
STDOUT:
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
STDERR:
> vagrant: A new version of Vagrant is available: 2.4.1 (installed version: 2.2.19)!> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html
Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:
nokogiri requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.7.4.191.
AK Updated by adam kraitman about 2 years ago
Also Re-imaged adami08 with jammy, Regarding irvingi05 I will need to do a firmware update before I can re-image it
AK Updated by adam kraitman about 2 years ago · Edited
Finished to re-image all three builders(irvingi05, adami08 and braggi09) , On the jammy version the vagrant-libvirt plugin is installed only with the newer vagrant version(Tested with vagrant_2.4.1-1) so we need the new vagrant version (2.4.4.1-1) to be uploaded to https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default/pool/main/v/vagrant/
DM Updated by Dan Mick almost 2 years ago
- Status changed from In Progress to Resolved