Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2021-08-26 23:14:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzypp (Old) and /work/SRC/openSUSE:Factory/.libzypp.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp" Thu Aug 26 23:14:20 2021 rev:446 rq:913997 version:17.28.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2021-08-02 12:05:22.313652179 +0200 +++ /work/SRC/openSUSE:Factory/.libzypp.new.1899/libzypp.changes 2021-08-26 23:14:34.056260631 +0200 @@ -1,0 +2,6 @@ +Mon Aug 23 08:39:15 CEST 2021 - m...@suse.de + +- Fix crashes in logging code when shutting down (bsc#1189031) +- version 17.28.1 (22) + +------------------------------------------------------------------- Old: ---- libzypp-17.28.0.tar.bz2 New: ---- libzypp-17.28.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.5hBiHD/_old 2021-08-26 23:14:34.744260341 +0200 +++ /var/tmp/diff_new_pack.5hBiHD/_new 2021-08-26 23:14:34.744260341 +0200 @@ -40,7 +40,7 @@ %endif Name: libzypp -Version: 17.28.0 +Version: 17.28.1 Release: 0 URL: https://github.com/openSUSE/libzypp Summary: Library for package, patch, pattern and product management ++++++ libzypp-17.28.0.tar.bz2 -> libzypp-17.28.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/VERSION.cmake new/libzypp-17.28.1/VERSION.cmake --- old/libzypp-17.28.0/VERSION.cmake 2021-07-26 11:56:27.000000000 +0200 +++ new/libzypp-17.28.1/VERSION.cmake 2021-08-23 08:41:24.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "17") SET(LIBZYPP_COMPATMINOR "22") SET(LIBZYPP_MINOR "28") -SET(LIBZYPP_PATCH "0") +SET(LIBZYPP_PATCH "1") # -# LAST RELEASED: 17.28.0 (22) +# LAST RELEASED: 17.28.1 (22) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/package/libzypp.changes new/libzypp-17.28.1/package/libzypp.changes --- old/libzypp-17.28.0/package/libzypp.changes 2021-07-26 11:56:27.000000000 +0200 +++ new/libzypp-17.28.1/package/libzypp.changes 2021-08-23 08:41:24.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Aug 23 08:39:15 CEST 2021 - m...@suse.de + +- Fix crashes in logging code when shutting down (bsc#1189031) +- version 17.28.1 (22) + +------------------------------------------------------------------- Mon Jul 26 11:48:28 CEST 2021 - m...@suse.de - Rephrase vendor conflict message in case 2 packages are diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/po/sk.po new/libzypp-17.28.1/po/sk.po --- old/libzypp-17.28.0/po/sk.po 2021-07-27 19:16:31.000000000 +0200 +++ new/libzypp-17.28.1/po/sk.po 2021-08-03 21:16:23.000000000 +0200 @@ -6,7 +6,7 @@ "Project-Id-Version: libzypp\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-07-26 11:04+0200\n" -"PO-Revision-Date: 2021-07-27 17:12+0000\n" +"PO-Revision-Date: 2021-08-03 19:11+0000\n" "Last-Translator: Ferdinand Galko <galko.ferdin...@gmail.com>\n" "Language-Team: Slovak <https://l10n.opensuse.org/projects/libzypp/master/sk/>" "\n" @@ -4619,7 +4619,7 @@ #: zypp/solver/detail/SATResolver.cc:1449 #, boost-format msgid "install %1% although it has been retracted" -msgstr "in??talova?? %1%, aj ke?? bol stiahnut??" +msgstr "in??talova?? %1%, aj ke?? bol stiahnut?? sp????" #. translator: %1% is a package name #: zypp/solver/detail/SATResolver.cc:1452 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/tests/zypp/RpmPkgSigCheck_test.cc new/libzypp-17.28.1/tests/zypp/RpmPkgSigCheck_test.cc --- old/libzypp-17.28.0/tests/zypp/RpmPkgSigCheck_test.cc 2021-07-22 10:28:40.000000000 +0200 +++ new/libzypp-17.28.1/tests/zypp/RpmPkgSigCheck_test.cc 2021-08-20 15:11:24.000000000 +0200 @@ -53,8 +53,13 @@ if ( lhs.result != rhs.result ) return false; // protect against reordered details: - if ( lhs.detail.size() != rhs.detail.size() ) - return false; + + // there seems to be a backporting of how rpm prints the signature check result + // breaking our tests here, instead of checking for exact equality we just require + // that all elements in the lhs are existant in the rhs instance. + //if ( lhs.detail.size() != rhs.detail.size() ) + // return false; + for ( const auto & l : lhs.detail ) { if ( std::find( rhs.detail.begin(), rhs.detail.end(), l ) == rhs.detail.end() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/tools/zypp-rpm/main.cc new/libzypp-17.28.1/tools/zypp-rpm/main.cc --- old/libzypp-17.28.0/tools/zypp-rpm/main.cc 2021-07-28 10:11:32.000000000 +0200 +++ new/libzypp-17.28.1/tools/zypp-rpm/main.cc 2021-08-20 15:11:24.000000000 +0200 @@ -402,8 +402,9 @@ } } - int tsProbFilterFlags = RPMPROB_FILTER_NONE; - + // those two cases are already handled by libzypp at the time a package set arrives here, + // we can safely filter those problems. + int tsProbFilterFlags = RPMPROB_FILTER_REPLACEPKG | RPMPROB_FILTER_OLDPACKAGE; if ( msg.ignorearch() ) tsProbFilterFlags |= RPMPROB_FILTER_IGNOREARCH; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/zypp/target/TargetImpl.cc new/libzypp-17.28.1/zypp/target/TargetImpl.cc --- old/libzypp-17.28.0/zypp/target/TargetImpl.cc 2021-07-28 10:11:32.000000000 +0200 +++ new/libzypp-17.28.1/zypp/target/TargetImpl.cc 2021-08-20 15:11:24.000000000 +0200 @@ -1874,20 +1874,11 @@ // bsc#1181328: Some systemd tools require /proc to be mounted AssertProcMounted assertProcMounted( _root ); - rpm::RpmInstFlags flags( policy_r.rpmInstFlags() & rpm::RPMINST_JUSTDB ); - // Why force and nodeps? + // Why nodeps? // // Because zypp builds the transaction and the resolver asserts that - // everything is fine. - // We use rpm just to unpack and register the package in the database. - // We do this step by step, so rpm is not aware of the bigger context. - // So we turn off rpms internal checks, because we do it inside zypp. - flags |= rpm::RPMINST_NODEPS; - flags |= rpm::RPMINST_FORCE; - - if (policy_r.dryRun()) flags |= rpm::RPMINST_TEST; - if (policy_r.rpmExcludeDocs()) flags |= rpm::RPMINST_EXCLUDEDOCS; - if (policy_r.rpmNoSignature()) flags |= rpm::RPMINST_NOSIGNATURE; + // everything is fine, or the user decided to ignore problems. + rpm::RpmInstFlags flags( policy_r.rpmInstFlags() | rpm::RPMINST_NODEPS ); zpt::Commit commit; commit.set_flags( flags ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/zypp/zyppng/media/medianetworkserver.cc new/libzypp-17.28.1/zypp/zyppng/media/medianetworkserver.cc --- old/libzypp-17.28.0/zypp/zyppng/media/medianetworkserver.cc 2021-07-12 11:16:20.000000000 +0200 +++ new/libzypp-17.28.1/zypp/zyppng/media/medianetworkserver.cc 2021-08-20 12:46:27.000000000 +0200 @@ -108,9 +108,11 @@ MediaNetworkConn::MediaNetworkConn( MediaNetworkServer &server, std::shared_ptr<Socket> &&socket ) : _server(server), _connection ( std::move( socket ) ) { MIL_MEDIA << "Initializing Connection object " << std::endl; - _connection->Base::connect( &Socket::sigReadyRead, *this, &MediaNetworkConn::onReadyRead ); - _connection->Base::connect( &Socket::sigDisconnected, *this, &MediaNetworkConn::onDisconnected ); - _connection->Base::connect( &Socket::sigError, *this, &MediaNetworkConn::onError ); + _socketSigConns.insert( _socketSigConns.end(), { + _connection->Base::connect( &Socket::sigReadyRead, *this, &MediaNetworkConn::onReadyRead ), + _connection->Base::connect( &Socket::sigDisconnected, *this, &MediaNetworkConn::onDisconnected ), + _connection->Base::connect( &Socket::sigError, *this, &MediaNetworkConn::onError ) + } ); //make sure we read possibly available data onReadyRead(); @@ -130,6 +132,10 @@ trackedDlFinished( *req ); } MIL_MEDIA << "Closing connection done!" << std::endl; + + // clean up our socket connections, otherwise we receive signals we do not want to handle anymore + std::for_each( _socketSigConns.begin(), _socketSigConns.end(), []( auto &conn){ conn.disconnect(); } ); + _socketSigConns.clear(); } SignalProxy<void ()> MediaNetworkConn::sigDisconnected() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/zypp/zyppng/media/private/medianetworkserver_p.h new/libzypp-17.28.1/zypp/zyppng/media/private/medianetworkserver_p.h --- old/libzypp-17.28.0/zypp/zyppng/media/private/medianetworkserver_p.h 2021-07-12 11:16:20.000000000 +0200 +++ new/libzypp-17.28.1/zypp/zyppng/media/private/medianetworkserver_p.h 2021-08-20 12:46:27.000000000 +0200 @@ -88,6 +88,8 @@ std::shared_ptr<Socket> _connection; std::optional<int32_t> _pendingMessageSize; Signal<void()> _disconnected; + + std::vector<sigc::connection> _socketSigConns; }; class LIBZYPP_NG_NO_EXPORT MediaNetworkThread : public Base diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-17.28.0/zypp-core/base/LogControl.cc new/libzypp-17.28.1/zypp-core/base/LogControl.cc --- old/libzypp-17.28.0/zypp-core/base/LogControl.cc 2021-07-12 11:16:20.000000000 +0200 +++ new/libzypp-17.28.1/zypp-core/base/LogControl.cc 2021-08-20 15:11:24.000000000 +0200 @@ -507,18 +507,18 @@ struct LogControlImpl; /* - * Horrible ugly hack to prevent the use of LogControlImpl when libzypp is shutting down. + * Ugly hack to prevent the use of LogControlImpl when libzypp is shutting down. * Due to the c++ std thread_local static instances are cleaned up before the first global static * destructor is called. So all classes that use logging after that point in time would crash the * application because its accessing a variable that has already been destroyed. - * - * This does not check if the current thread requesting a instance actually has one, it just keeps count - * of how many instances are still available. Usually only the main thread should run into the condition - * of getting a nullptr back. */ - static std::atomic_int & logControlImplReg() { - static std::atomic_int instCount; - return instCount; + int &logControlValidFlag() { + // We are using a POD flag that does not have a destructor, + // to flag if the thread_local destructors were already executed. + // Since TLS data is stored in a segment that is available until the thread ceases to exist it should still be readable + // after thread_local c++ destructors were already executed. Or so I hope. + static thread_local int logControlValid = 0; + return logControlValid; } /////////////////////////////////////////////////////////////////// @@ -669,7 +669,7 @@ , _excessive( getenv("ZYPP_FULLLOG") ) , _lineFormater( new LogControl::LineFormater ) { - logControlImplReg().fetch_add(1); + logControlValidFlag() = 1; std::call_once( flagReadEnvAutomatically, &LogControlImpl::readEnvVars, this); } @@ -677,7 +677,7 @@ ~LogControlImpl() { - logControlImplReg().fetch_sub(1); + logControlValidFlag() = 0; } /** The LogControlImpl singleton @@ -694,7 +694,7 @@ inline LogControlImpl *LogControlImpl::instance() { thread_local static LogControlImpl _instance; - if ( logControlImplReg().load() > 0 ) + if ( logControlValidFlag() > 0 ) return &_instance; return nullptr; }