Skip to content

build: Bump Boost version to 1.79 - #46554

Merged
tchaikov merged 1 commit into
ceph:mainfrom
adamemerson:wip-up-the-boost
Jul 25, 2022
Merged

tchaikov merged 1 commit into
ceph:mainfrom
adamemerson:wip-up-the-boost

Conversation

@adamemerson

@adamemerson adamemerson commented Jun 7, 2022 •

Copy link
Copy Markdown
Contributor

This fixes the major blocker with enabling C++20 and also allows us to use C++20 coroutines in asynchronous code.

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@adamemerson

Copy link
Copy Markdown
Contributor Author

So, what are the things needed to make a new Boost available to Jenkins and Teuthology? If I have access to do them I'll happily do them. (Or if there are time consuming parts that don't require special access I can do those and hand over the pieces.)

@cbodley

cbodley commented Jun 7, 2022

Copy link
Copy Markdown
Contributor

@tchaikov

tchaikov commented Jun 8, 2022

Copy link
Copy Markdown
Contributor

Hi Adam, as Casey pointed out. in addition to precompiling boost, we also need to upload the tarball to https://download.ceph.com/qa/.

Comment thread install-deps.sh Resolved
@adamemerson

Copy link
Copy Markdown
Contributor Author

Jenkins, retest this please.

@adamemerson

Copy link
Copy Markdown
Contributor Author

@djgalloway Could you please build/upload debs for Boost? It think that's the only thing blocking this PR (and I'm pretty sure I don't have access) and this PR is the only thing blocking C++20.

@djgalloway

Copy link
Copy Markdown
Contributor

jenkins retest this please

@djgalloway

Copy link
Copy Markdown
Contributor

@adamemerson I built packages. This was my first time attempting it so we may still hit some snags.

https://shaman.ceph.com/repos/libboost/master/892ab89e76b91b505ffbf083f6fb7f2a666d4132/default/256966/

@adamemerson

Copy link
Copy Markdown
Contributor Author

@adamemerson I built packages. This was my first time attempting it so we may still hit some snags.

https://shaman.ceph.com/repos/libboost/master/892ab89e76b91b505ffbf083f6fb7f2a666d4132/default/256966/

Thank you very much!

@djgalloway

Copy link
Copy Markdown
Contributor

@adamemerson

Copy link
Copy Markdown
Contributor Author

892ab89e76b91b505ffbf083f6fb7f2a666d4132

Done! Thank you.

@djgalloway

Copy link
Copy Markdown
Contributor

@adamemerson

Copy link
Copy Markdown
Contributor Author

@tchaikov

Copy link
Copy Markdown
Contributor
../build.deps/mingw/boost/include/boost/align/aligned_allocator.hpp: In member function 'void boost::alignment::aligned_allocator<T, Alignment>::deallocate(boost::alignment::aligned_allocator<T, Alignment>::pointer, boost::alignment::aligned_allocator<T, Alignment>::size_type)':
../src/include/compat.h:352:27: error: '_aligned_free' is not a member of 'boost::alignment'; did you mean 'aligned_free'?
  352 | #define aligned_free(ptr) _aligned_free(ptr)
      |                           ^~~~~~~~~~~~~

turns out aligned_free is a member of boost::alignment, so using a hackish #define to override the default behavior of aligned_free() fails the build.

i am proposing a fix to address this. see #47212

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test windows

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test make check

tchaikov
tchaikov previously approved these changes Jul 21, 2022
@djgalloway

Copy link
Copy Markdown
Contributor

I'm okay with this as long as make check passes. Please don't merge until Friday morning at the earliest, however. I want to be around for fallout if necessary.

And thank you so much @tchaikov for your help. I absolutely would not have figured out that compilation issue you fixed in #47212. We miss you!

@tchaikov

Copy link
Copy Markdown
Contributor
In file included from ../src/dokan/options.cc:14:
../src/dokan/ceph_dokan.h:16:15: error: conflicting declaration 'typedef DWORD NTSTATUS'
   16 | typedef DWORD NTSTATUS;
      |               ^~~~~~~~
In file included from ../build.deps/mingw/boost/include/boost/asio/impl/connect_pipe.ipp:29,
                 from ../build.deps/mingw/boost/include/boost/asio/connect_pipe.hpp:79,
                 from ../build.deps/mingw/boost/include/boost/asio.hpp:64,
                 from ../src/include/win32/winsock_wrapper.h:20,
                 from <command-line>:
/usr/share/mingw-w64/include/bcrypt.h:27:16: note: previous declaration as 'typedef LONG NTSTATUS'
   27 |   typedef LONG NTSTATUS,*PNTSTATUS;
      |                ^~~~~~~~

@tchaikov

Copy link
Copy Markdown
Contributor

i am proposing #47217 to address this issue. the proposed PR includes the commits in this PR to verify my change.

@tchaikov
tchaikov dismissed their stale review July 22, 2022 13:15

we need to fix the test first, see #47217

@tchaikov tchaikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@adamemerson could you update make-dist accordingly? otherwise we'd have FTBFS like

-- BUILDING Boost Libraries at j 48
CMake Error at cmake/modules/BuildBoost.cmake:31 (message):
  Boost v1.75.0 in
  /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-13730-g5623bc3c/rpm/el8/BUILD/ceph-17.0.0-13730-g5623bc3c/src/boost
  is not new enough.  Please either "rm -rf
  /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-13730-g5623bc3c/rpm/el8/BUILD/ceph-17.0.0-13730-g5623bc3c/src/boost"
  so I can download Boost v1.79 for you, or make sure
  /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-13730-g5623bc3c/rpm/el8/BUILD/ceph-17.0.0-13730-g5623bc3c/src/boost
  contains a copy of Boost v1.79.
Call Stack (most recent call first):
  cmake/modules/BuildBoost.cmake:147 (check_boost_version)
  cmake/modules/BuildBoost.cmake:251 (do_build_boost)
  CMakeLists.txt:647 (build_boost)

see https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/64111//consoleFull

Also remove bind_allocator, as Boost.Asio now provides this function.

Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson

Copy link
Copy Markdown
Contributor Author

@adamemerson could you update make-dist accordingly? otherwise we'd have FTBFS like

Done!

@tchaikov
tchaikov self-requested a review July 22, 2022 15:15
@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test windows

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test make check

@tchaikov

Copy link
Copy Markdown
Contributor

@tchaikov tchaikov self-assigned this Jul 25, 2022
@tchaikov
tchaikov merged commit 606ec51 into ceph:main Jul 25, 2022
@djgalloway

Copy link
Copy Markdown
Contributor

@tchaikov The RGW suite is seeing valgrind issues that may be related to boost. Not due to 1.79 explicitly but we were wondering if you could take a look at https://tracker.ceph.com/issues/56500#note-2. Do you understand what's going on there?

@tchaikov

Copy link
Copy Markdown
Contributor

@djgalloway will take a look tomorrow. just saw your comment right before i am about to call it a day.

@cbodley

cbodley commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

essentially, the rgw/verify suite needs a way to run its valgrind jobs against builds (both ceph and boost) with the valgrind flag enabled

would it be possible to:

  • build these ceph-libboost- packages with the valgrind=on flag
  • set WITH_BOOST_VALGRIND=ON for all ceph builds that link to these packages

where would this logic need to go? i see install_boost_on_ubuntu() in https://github.com/ceph/ceph/blob/main/install-deps.sh#L169, but nothing for centos

@cbodley

cbodley commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

cc @yuvalif

@tchaikov

tchaikov commented Jul 28, 2022 •

Copy link
Copy Markdown
Contributor

@cbodley i see you scheduled couple rgw:verify tests with pr-46554-kefu. they all completed without reporting issues. but according to the jenkins build log

CEPH_EXTRA_CMAKE_ARGS=-DALLOCATOR=tcmalloc
...
	cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DWITH_JAEGER=ON -DWITH_SYSTEM_UTF8PROC=ON -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_MGR_DASHBOARD_FRONTEND=OFF -DWITH_PYTHON3=3 -DWITH_CEPHFS_JAVA=ON -DWITH_CEPHFS_SHELL=ON -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default -DWITH_GRAFANA=ON -DWITH_RBD_RWL=ON -DWITH_RBD_SSD_CACHE=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib -DCMAKE_INSTALL_LIBEXECDIR=/usr/libexec -DCMAKE_INSTALL_SYSCONFDIR=/etc -DBOOST_J=48 -DALLOCATOR=tcmalloc ..
...
-- BUILDING Boost Libraries at j 48
-- boost (1.79.0 >= 1.79) already in /build/ceph-17.0.0-13785-g0c4e48e6/src/boost
...
cd /build/ceph-17.0.0-13785-g0c4e48e6/src/boost && CC=/usr/bin/cc CXX=/usr/bin/c++ ./b2 -j48 -d0 --user-config=/build/ceph-17.0.0-13785-g0c4e48e6/obj-x86_64-linux-gnu/user-config.jam toolset=gcc python=3.8 headers stage variant=release threading=multi link=static address-model=64 "cxxflags=-fPIC -w"

the packages were not built with valgrind=on or WITH_BOOST_VALGRIND=ON. so i am afraid that your analysis cannot explain the completed runs on ubuntu?

the ceph-libbooost- packages are not involved in qa runs. they are only used when performing "make check" tests performed by jenkins.

if WITH_BOOST_VALGRIND=ON is proved to be the cure. we need add it at https://github.com/ceph/ceph-build/blob/4aa26880bb7917fa65b5ed11242b4f59aae91a77/scripts/build_utils.sh#L831

@cbodley

cbodley commented Jul 28, 2022

Copy link
Copy Markdown
Contributor

so i am afraid that your analysis cannot explain the completed runs on ubuntu?

thanks @tchaikov. i didn't expect WITH_BOOST_VALGRIND to be on there, i just wanted to test against ubuntu with recent builds, and yours could help rule out the boost version also. that first passing run didn't include any valgrind jobs at all, so i had to reschedule in https://pulpito.ceph.com/cbodley-2022-07-26_14:01:08-rgw:verify-pr-46554-kefu-distro-default-smithi/. that result confirmed that the valgrind issues are effecting ubuntu also - i reported on this in https://tracker.ceph.com/issues/56500#note-8

@tchaikov

Copy link
Copy Markdown
Contributor

that first passing run didn't include any valgrind jobs at all

ahh, i see. so we need to go with WITH_BOOST_VALGRIND=ON then.

@djgalloway

Copy link
Copy Markdown
Contributor

@tchaikov

tchaikov commented Aug 1, 2022

Copy link
Copy Markdown
Contributor

@tchaikov ISTR you asking to build boost for arm64 too. Done. https://shaman.ceph.com/repos/libboost/master/892ab89e76b91b505ffbf083f6fb7f2a666d4132/default/257913/

@djgalloway yes, thank you! to be on par with amd64 nodes. Thank you!

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.

5 participants