With dev-libs/boost-1.77.0-r2, program use net-libs/libtorrent-rasterbar (I tested net-p2p/qbittorrent) will crash on startup. The crash don't happen when I downgrade dev-libs/boost to 1.76.0-r1 The compiler is sys-devel/clang with default-libcxx Reproducible: Always Actual Results: The backtrace from `gdb qbittorrent` #0 get_meta (p=0x7fffe6f3d030 "") at src/malloc/mallocng/meta.h:137 #1 0x00007ffff7f9d01c in __libc_free (p=0x7fffe6f3d030) at src/malloc/mallocng/free.c:105 #2 0x00007ffff7a76aa6 in boost::alignment::aligned_free (ptr=0x7fffe6f3d030) at /usr/include/boost/align/detail/aligned_alloc_posix.hpp:35 #3 0x00007ffff7a76a96 in boost::asio::aligned_delete (ptr=0x7fffe6f3d030) at /usr/include/boost/asio/detail/memory.hpp:124 #4 0x00007ffff7a7e258 in boost::asio::detail::thread_info_base::deallocate<boost::asio::detail::thread_info_base::default_tag> (this_thread=<optimized out>, pointer=0x7fffe6f3d030, size=127) at /usr/include/boost/asio/detail/thread_info_base.hpp:198 #5 0x00007ffff7ce29c1 in boost::asio::detail::recycling_allocator<boost::asio::detail::executor_op<boost::asio::detail::binder0<libtorrent::session_handle::async_call<void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&>(void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&) const::{lambda()#1}>, std::__1::allocator<void>, boost::asio::detail::scheduler_operation>, boost::asio::detail::thread_info_base::default_tag>::deallocate(boost::asio::detail::executor_op<boost::asio::detail::binder0<libtorrent::session_handle::async_call<void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&>(void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&) const::{lambda()#1}>, std::__1::allocator<void>, boost::asio::detail::scheduler_operation>*, unsigned long) (this=this@entry=0x7fffe6cfe580, p=0x7fffe6f3d030, n=<optimized out>, n@entry=1) at /usr/include/boost/asio/detail/recycling_allocator.hpp:60 #6 0x00007ffff7ce2962 in boost::asio::detail::executor_op<boost::asio::detail::binder0<libtorrent::session_handle::async_call<void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&>(void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&) const::{lambda()#1}>, std::__1::allocator<void>, boost::asio::detail::scheduler_operation>::ptr::reset() (this=this@entry=0x7fffe6cfe5b8) at /usr/include/boost/asio/detail/executor_op.hpp:35 #7 0x00007ffff7ce2894 in boost::asio::detail::executor_op<boost::asio::detail::binder0<libtorrent::session_handle::async_call<void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&>(void (libtorrent::aux::session_impl::*)(std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>), std::__1::function<std::__1::shared_ptr<libtorrent::torrent_plugin> (libtorrent::torrent_handle const&, libtorrent::client_data_t)>&) const::{lambda()#1}>, std::__1::allocator<void>, boost::asio::detail::scheduler_operation>::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) (owner=0x7fffe7076150, base=<optimized out>) at /usr/include/boost/asio/detail/executor_op.hpp:63 #8 0x00007ffff7a76dcd in boost::asio::detail::scheduler_operation::complete (this=0x2, this@entry=0x7fffe6f3d030, owner=0x7fffe6f3d030, owner@entry=0x7fffe7076150, ec=..., bytes_transferred=3874738208, bytes_transferred@entry=0) at /usr/include/boost/asio/detail/scheduler_operation.hpp:40 #9 0x00007ffff7a76727 in boost::asio::detail::scheduler::do_run_one (this=this@entry=0x7fffe7076150, lock=..., this_thread=..., ec=...) at /usr/include/boost/asio/detail/impl/scheduler.ipp:486 #10 0x00007ffff7a76461 in boost::asio::detail::scheduler::run (this=0x7fffe7076150, ec=...) at /usr/include/boost/asio/detail/impl/scheduler.ipp:204 #11 0x00007ffff7a74181 in boost::asio::io_context::run (this=0x7fffe70aaf58) at /usr/include/boost/asio/impl/io_context.ipp:63 #12 0x00007ffff7cc64be in libtorrent::session::start(libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>, libtorrent::session_params&&, boost::asio::io_context*)::$_0::operator()() const (this=<optimized out>) at /usr/src/debug/net-libs/libtorrent-rasterbar-2.0.4-r2/libtorrent-rasterbar-2.0.4/src/session.cpp:344 #13 0x00007ffff7cc6496 in std::__1::__invoke<libtorrent::session::start(libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>, libtorrent::session_params&&, boost::asio::io_context*)::$_0>(libtorrent::session::start(libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>, libtorrent::session_params&&, boost::asio::io_context*)::$_0&&) (__f=...) at /usr/include/c++/v1/type_traits:3694 #14 0x00007ffff7cc648e in std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, libtorrent::session::start(libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>, libtorrent::session_params&&, boost::asio::io_context*)::$_0>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, libtorrent::session::start(libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>, libtorrent::session_params&&, boost::asio::io_context*)::$_0>&, std::__1::__tuple_indices<>) (__t=...) at /usr/include/c++/v1/thread:280 #15 0x00007ffff7cc6381 in std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, libtorrent::session::start(libtorrent::flags::bitfield_flag<unsigned char, libtorrent::session_flags_tag, void>, libtorrent::session_params&&, boost::asio::io_context*)::$_0> >(void*) ( __vp=<optimized out>) at /usr/include/c++/v1/thread:291 #16 0x00007ffff7feb55c in start (p=0x7fffe6cfe840) at src/thread/pthread_create.c:203 OpenBSD report this to upstream: https://github.com/arvidn/libtorrent/issues/6468 emerge --info: Portage 3.0.24 (python 3.9.7-final-0, default/linux/amd64/17.0/musl, gcc-12.0.1, musl-1.2.2-r3, 5.13.12-zen+ x86_64) ================================================================= System uname: Linux-5.13.12-zen+-x86_64-Intel-R-_Core-TM-_i5-9400T_CPU_@_1.80GHz-with-libc KiB Mem: 32650164 total, 14861476 free KiB Swap: 8388604 total, 8388604 free Timestamp of repository gentoo: Mon, 27 Sep 2021 11:51:41 +0000 Head commit of repository gentoo: f0d895be1de54dc94760153eae2f7bfafb3fb87e Timestamp of repository gentoo-zh: Mon, 27 Sep 2021 10:36:34 +0000 Head commit of repository gentoo-zh: a4b9fb67f003891f6bd941bbbcff796739e34541 Timestamp of repository guru: Sat, 25 Sep 2021 17:21:16 +0000 Head commit of repository guru: d6874e2fd6819e0bfd4184919a5fd682315daf91 Timestamp of repository mv: Tue, 21 Sep 2021 08:06:36 +0000 Head commit of repository mv: 6d5aa1c9d53f8a90a5d825182cf745d07e424a19 Timestamp of repository pentoo: Sun, 26 Sep 2021 14:06:19 +0000 Head commit of repository pentoo: 90cf20c44c9033573cc2b05245c442e06f27ac93 Timestamp of repository pg_overlay: Mon, 27 Sep 2021 10:51:30 +0000 Head commit of repository pg_overlay: 8c35cc745babb0d30dbbd46864cd0b48cc1d4ff5 Timestamp of repository musl: Thu, 23 Sep 2021 22:36:19 +0000 Head commit of repository musl: ba57f12dfbd74659cddaee81bf6868076294b734 sh bash 5.1_p8 ld LLD 12.0.1 (compatible with GNU linkers) ccache version 4.4.1 [disabled] app-shells/bash: 5.1_p8::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r2::gentoo dev-lang/python: 2.7.18_p13::pg_overlay, 3.9.7::pg_overlay dev-lang/rust: 1.55.0::12101111-overlay dev-util/ccache: 4.4.1::gentoo dev-util/cmake: 3.21.3::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.5::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1::12101111-overlay sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.14::gentoo (virtual/os-headers) sys-libs/musl: 1.2.2-r3::gentoo Repositories: gentoo location: /usr/portage/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo priority: -1000 gentoo-zh location: /usr/portage/gentoo-zh sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git masters: gentoo guru location: /usr/portage/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo mv location: /usr/portage/mv sync-type: git sync-uri: https://github.com/gentoo-mirror/mv.git masters: gentoo pentoo location: /usr/portage/pentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/pentoo.git masters: gentoo pg_overlay location: /usr/portage/pg_overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/pg_overlay.git masters: gentoo musl location: /usr/portage/musl sync-type: git sync-uri: https://github.com/gentoo-mirror/musl.git masters: gentoo priority: 900 12101111-overlay location: /usr/portage/local masters: gentoo priority: 1000 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-gentoo-linux-musl" CC="clang" CFLAGS="-march=skylake -mtune=skylake -O3 -pipe -falign-functions=32 -fomit-frame-pointer -ffunction-sections -fdata-sections -flto=thin" CHOST="x86_64-gentoo-linux-musl" CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXX="clang++" CXXFLAGS="-march=skylake -mtune=skylake -O3 -pipe -falign-functions=32 -fomit-frame-pointer -ffunction-sections -fdata-sections -flto=thin -stdlib=libc++" DISTDIR="/var/cache/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance candy config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=skylake -mtune=skylake -O3 -pipe -falign-functions=32 -fomit-frame-pointer -ffunction-sections -fdata-sections" GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo" INSTALL_MASK="" LANG="zh_CN.UTF-8" LC_ALL="zh_CN.UTF-8" LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -flto=thin -Wl,-O3 -Wl,--gc-sections -march=skylake -mtune=skylake" MAKEOPTS="-j6" PKGDIR="/var/cache/binpkgs" PORTAGE_BINHOST="ssh://root@192.168.1.104/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" RUSTFLAGS="-Ctarget-cpu=skylake -Clinker=clang -Clink-arg=-fuse-ld=lld -Ctarget-feature=-crt-static" USE="X acl alsa amd64 bluetooth bzip2 clang cli compiler-rt crypt cups dbus default-compiler-rt default-libcxx dri elogind eselect-ldso fortran gif iconv ipv6 jemalloc jpeg libcxx libcxxabi libglvnd libtirpc libunwind llvm-libunwind ncurses nls nptl opengl openmp pam pcre png policykit pulseaudio readline seccomp split-usr ssl svg tcpd unicode vaapi vulkan wayland xattr zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="hda-intel usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86 ARM AArch64 RISCV WebAssembly AMDGPU AVR BPF Hexagon Lanai MSP430 Mips NVPTX PowerPC Sparc SystemZ XCore" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="arm aarch64 i386 x86_64 riscv32 riscv64" QEMU_USER_TARGETS="arm aarch64 riscv32 riscv64" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fd62ae6124f090f65aeddf2aa47744b0c2be9b5 commit 9fd62ae6124f090f65aeddf2aa47744b0c2be9b5 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-31 04:44:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-31 04:45:13 +0000 net-libs/libtorrent-rasterbar: depend on older Boost (<1.77) for now, runtime crashes Bug: https://github.com/arvidn/libtorrent/issues/6468 Bug: https://bugs.gentoo.org/815145 Signed-off-by: Sam James <sam@gentoo.org> ...rasterbar-2.0.4-r4.ebuild => libtorrent-rasterbar-2.0.4-r5.ebuild} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Thanks!
Doesn't crash for me. Could be clang-specific, as I have it built with gcc.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4187e6957ace5bebdd22b8ad44a404566baeed57 commit 4187e6957ace5bebdd22b8ad44a404566baeed57 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-31 10:21:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-31 10:21:32 +0000 net-libs/libtorrent-rasterbar: undo boost upper bound I think I was too hasty here. Bug: https://bugs.gentoo.org/815145 Signed-off-by: Sam James <sam@gentoo.org> ...rasterbar-2.0.4-r5.ebuild => libtorrent-rasterbar-2.0.4-r4.ebuild} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
(In reply to 12101111 from comment #0) > OpenBSD report this to upstream: I am the OpenBSD developer that opened the ticket. I am curious if you rebuild just libtorrent-rasterbar with -O1 when using Clang does it still crash? Also what version of Clang are you using? We're currently using 11.1.0 as our system compiler.
(In reply to Brad Smith from comment #5) > (In reply to 12101111 from comment #0) > > OpenBSD report this to upstream: > > I am the OpenBSD developer that opened the ticket. I am curious if you > rebuild just libtorrent-rasterbar with -O1 when using Clang does it still > crash? Also what version of Clang are you using? We're currently using > 11.1.0 as our system compiler. I compile libtorrent-rasterbar and qbittorrent with -O1 -g -fsanitize=address using clang 13, and boost 1.77.0 with -O3 -flto=thin. It crash and address sanitizer print the bad free issue. My system don't have gcc installed and all packages are built use musl libc, libc++ and libc++abi and clang/clang++ as compiler from source code.
this must not further block boost-1.77 stabilisation if it is not reproduced on standard configurations.
I agree with asturm. If it is not reproducible with gcc and only clang this is not a valid candidate for block.
it don't crash after built with c++17 (change -DCMAKE_CXX_STANDARD=14 to -DCMAKE_CXX_STANDARD=17)
(In reply to 12101111 from comment #9) > it don't crash after built with c++17 (change -DCMAKE_CXX_STANDARD=14 to > -DCMAKE_CXX_STANDARD=17) Well, it's a harmless change, so why not if it helps?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f41639d8233c787d370e55f518d6de0812a15ce commit 8f41639d8233c787d370e55f518d6de0812a15ce Author: Sam James <sam@gentoo.org> AuthorDate: 2021-12-08 06:06:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-12-08 06:13:35 +0000 net-libs/libtorrent-rasterbar: add 2.0.5 Just includes a bunch of the patches we upstreamed. Bug: https://bugs.gentoo.org/815145 Signed-off-by: Sam James <sam@gentoo.org> net-libs/libtorrent-rasterbar/Manifest | 1 + .../libtorrent-rasterbar-2.0.5.ebuild | 74 ++++++++++++++++++++++ 2 files changed, 75 insertions(+)