On 24/11/18 05:00PM, Julian Andres Klode wrote: > On Mon, Nov 18, 2024 at 04:34:37PM +0100, Christian Heusel wrote: > > On 24/11/17 10:08PM, David Kalnischkies wrote: > > > Hi Christian Heusel, > > > > Hello David, > > > > > > > > Am Sun, Nov 17, 2024 at 08:15:21PM +0100, schrieb Christian Heusel: > > > > * What was the outcome of this action? > > > > Building the package yields test failures for 2.9.11 > > > > > > Did you try with earlier versions or is 2.9.11 the first you try? > > > > Yes I tried earlier versions and they all worked fine. The last version > > that worked was the previous release 2.9.10 but I package it for [a > > while now] (since 2.9.2). > > > > In the meantime we had another release (2.9.12) which fixed the > > URITest.AutoProxyTest issue, so let's just ignore that for now. The > > crash in the other tests persists though! > > > > I also took the time and bisected between 2.9.10 and 2.9.11 which commit > > introduced the failure and I landed on the following: > > > > commit b430a53e45b6d676142af7da78564de3bd97ef5f (HEAD) > > Author: наб <nabijaczlew...@nabijaczleweli.xyz> > > Date: Tue Nov 12 19:50:56 2024 +0100 > > > > methods/http.cc: APT::StringView -> std::string_view > > > > There seems to be an issue with your bisecting, as that change introduced > no difference unless Acquire::http::User-Agent-Non-Interactive is set, > where it sends a "non-interactive" flag in the user agent.
Yeah no sorry, I think the bisect went fine but I just reported the wrong result since I did a git show instead of git bisect log. This would instead give the following commit: e900ad1a7 ("apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h: APT::StringView -> std::string_view") I have posted the bisect log at the very bottom. > > > > > > [ RUN ] TreeParserTest.ParseInvalid > > > > /usr/include/c++/14.2.1/string_view:256: constexpr const > > > > std::basic_string_view<_CharT, _Traits>::value_type& > > > > std::basic_string_view<_CharT, _Traits>::operator[](size_type) const > > > > [with _CharT = char; _Traits = std::char_traits<char>; const_reference > > > > = const char&; size_type = long unsigned int]: Assertion '__pos < > > > > this->_M_len' failed. > > > > Aborted (core dumped) > > > > > > While the libapt code this is crashing in should be rewritten to not > > > crash… (which I did once, but it was kinda ugly, so we discarded it, but > > > now that a bunch of std::string_view recently landed perhaps…) anyway, > > > this is a test that is trying to trigger an exception. Do you perhaps > > > build with exceptions disabled? > > > > No, our buildflags are the following[1]: > > > > CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ > > -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \ > > -fstack-clash-protection -fcf-protection \ > > -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" > > CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" > > > > But I guess the added -D_GLIBCXX_ASSERTIONS is relevant to trigger the > > bug..? So somehow (just judging from the backtrace) there seems to be a > > bounds issue in APT::Internal::PatternTreeParser::parseShortPattern with > > the check that might now be caught since the switch to std::string_view..? > > This should be it. Great! > > > > > > Or was GoogleTest perhaps built without them? Which type of GoogleTest > > > is that anyhow, the pre-built or the one that is build with apt. > > > > It is using the system one: > > > > $ ldd src/build/test/libapt/libapt_test | grep gtest > > libgtest.so.1.15.2 => /usr/lib/libgtest.so.1.15.2 (0x00007f684c157000) > > > > Also I think the test suite is not responsible given that one version of > > the upstream code works and another one does not. > > I think there's some issue with the system one; I was building apt in > a docker.io/archlinux container earlier and that found no tests at all > for some reason. Huh? I'd need more information and would be glad to look into this, but I guess it's directly really relevant for this issue .. > > > > > Best regards > > > > > > David Kalnischkies > > > > Thanks for being awesome, > > Chris > > > > [0]: > > https://gitlab.archlinux.org/archlinux/packaging/packages/apt/-/commits/main/?ref_type=HEADS > > [1]: > > https://gitlab.archlinux.org/archlinux/devtools/-/blob/master/config/makepkg/x86_64.conf?ref_type=heads#L43-57 > > [2]: > > https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux#Using_a_chroot_environment > > > > -- > debian developer - deb.li/jak | jak-linux.org - free software dev > ubuntu core developer i speak de, en Cheers, Chris git bisect start # status: waiting for both good and bad commits # good: [09e853dd424a6ab53bd5791de75894a985968399] Release 2.9.10 git bisect good 09e853dd424a6ab53bd5791de75894a985968399 # status: waiting for bad commit, 1 good commit known # bad: [7ea8ab32e68a55ad20b54561d6341b295c6ffe9c] Release 2.9.11 git bisect bad 7ea8ab32e68a55ad20b54561d6341b295c6ffe9c # good: [90d89c7c1a39aca33fad430f04e09b44d4b7319a] dpkgpm: use getline() for Apport var/crash lines git bisect good 90d89c7c1a39aca33fad430f04e09b44d4b7319a # good: [e33add3c2afa33a6f81b2eaed1fdcd29dc28790f] apt-private/private-update.cc: APT::StringView -> std::string_view git bisect good e33add3c2afa33a6f81b2eaed1fdcd29dc28790f # bad: [e900ad1a727912b340aa43417bff895294854d3b] apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h: APT::StringView -> std::string_view git bisect bad e900ad1a727912b340aa43417bff895294854d3b # good: [bd65dba7361047ae1048e1b73500ca26b7e96102] apt-pkg/deb/debmetaindex.cc: prepare for APT::StringView -> std::string_view git bisect good bd65dba7361047ae1048e1b73500ca26b7e96102 # good: [4793c0875dcb82151e1c2d7f38964e738f20f056] apt-pkg/acquire-item.cc: prepare for APT::StringView -> std::string_view git bisect good 4793c0875dcb82151e1c2d7f38964e738f20f056 # good: [b430a53e45b6d676142af7da78564de3bd97ef5f] methods/http.cc: APT::StringView -> std::string_view git bisect good b430a53e45b6d676142af7da78564de3bd97ef5f # first bad commit: [e900ad1a727912b340aa43417bff895294854d3b] apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h: APT::StringView -> std::string_view
signature.asc
Description: PGP signature