As Grant mentioned in internal channels.

This likely could be related to the same Focal and later errors we are
now seeing
https://errors.ubuntu.com/problem/4166288511f42a64aee694b80c7d9d3103bb8581

We think the issue might be due to the apt origin of some configured
repository not being present yet, or somehow properly configured.


To confirm, can we get the customer to provide us with:
  1. A gdb backtrace from running:
/usr/lib/ubuntu-advantage/apt-esm-hook process-templates

  2. Please also attach `apt-cache policy` output

  3. Maybe it's worth running this attached binary which has the
following patch applied to our apt-esm-hook

diff --git a/apt-hook/hook.cc b/apt-hook/hook.cc
index aed341d5..80b60c5d 100644
--- a/apt-hook/hook.cc
+++ b/apt-hook/hook.cc
@@ -151,7 +151,7 @@ static void check_esm_upgrade(pkgCache::PkgIterator pkg, 
pkgPolicy *policy, resu
    {
       for (pkgCache::VerFileIterator pf = ver.FileList(); !pf.end(); pf++)
       {
-         if (pf.File().Archive() != 0 && pf.File().Origin() == 
std::string("UbuntuESM"))
+         if (pf.File().Archive() != 0 && DeNull(pf.File().Origin()) == 
std::string("UbuntuESM"))
          {
             if (std::find(res.esm_i_packages.begin(), 
res.esm_i_packages.end(), pkg.Name()) == res.esm_i_packages.end()) {
                 res.esm_i_packages.push_back(pkg.Name());
@@ -167,7 +167,7 @@ static void check_esm_upgrade(pkgCache::PkgIterator pkg, 
pkgPolicy *policy, resu
                 }
             }
          }
-         if (pf.File().Archive() != 0 && pf.File().Origin() == 
std::string("UbuntuESMApps"))
+         if (pf.File().Archive() != 0 && DeNull(pf.File().Origin()) == 
std::string("UbuntuESMApps"))
          {
             if (std::find(res.esm_a_packages.begin(), 
res.esm_a_packages.end(), pkg.Name()) == res.esm_a_packages.end()) {
                 res.esm_a_packages.push_back(pkg.Name());

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1929123

Title:
  segfault in apt-esm-hook

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1929123/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to