pop-os / shop

Pop!_Shop
GNU General Public License v3.0
92 stars 19 forks source link

Segfault on 404 on the PPA (when apt is locked) #393

Closed AnomalRoil closed 2 years ago

AnomalRoil commented 2 years ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

$ apt policy pop-shop
pop-shop:
  Installed: 3.4.2pop0~1659553725~22.04~cdc74cf
  Candidate: 3.4.2pop0~1659553725~22.04~cdc74cf
  Version table:
 *** 3.4.2pop0~1659553725~22.04~cdc74cf 1001
       1001 http://apt.pop-os.org/release jammy/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt policy packagekit
packagekit:
  Installed: 1.2.5-2ubuntu2
  Candidate: 1.2.5-2ubuntu2
  Version table:
 *** 1.2.5-2ubuntu2 500
        500 http://apt.pop-os.org/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:

When using the Pop Shop to update, if it fails with a 404 when retrieving stuff, it seems:

sep 27 08:50:13 odys PackageKit[1822]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-update auth (only_trusted:1)
sep 27 08:50:14 odys PackageKit[1822]: new update-packages transaction /3060_ababccac scheduled from uid 1000
sep 27 08:50:14 odys PackageKit[1822]: uid 1000 obtained auth for org.freedesktop.packagekit.system-update
sep 27 08:50:14 odys io.elementary.a[19801]: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
sep 27 08:50:14 odys io.elementary.a[19801]: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 pop-launcher amd64 1.2.1~1662488179~22.04~6e2fa02 is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-ar amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-zh-hant amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-zh-hans amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-ru amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-pt amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-ja amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-it amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-fr amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-es amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-en amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-de amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 firefox amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys packagekitd[1822]: http://apt.pop-os.org/release jammy/main amd64 pop-default-settings all 5.1.0~1663192506~22.04~5c9bcd8 is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys PackageKit[1822]: update-packages transaction /3060_ababccac from uid 1000 finished with failed after 2794ms
sep 27 08:50:16 odys io.elementary.a[19801]: Package.vala:577: Operation failed for package Operating System Updates - E: http://apt.pop-os.org/release jammy/main amd64 pop-launcher amd64 1.2.1~1662488179~22.04~6e2fa02 is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-ar amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-zh-hant amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-zh-hans amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-ru amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-pt amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-ja amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-it amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-fr amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-es amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-en amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox-locale-de amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 firefox amd64 104.0.2~1662490162~22.04~faed4ab is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
                                             E: http://apt.pop-os.org/release jammy/main amd64 pop-default-settings all 5.1.0~1663192506~22.04~5c9bcd8 is not (yet) available (404  Not Found [IP: 143.204.9.94 80])
sep 27 08:50:16 odys io.elementary.a[19801]: g_value_get_pointer: assertion 'G_VALUE_HOLDS_POINTER (value)' failed
sep 27 08:50:16 odys kernel: io.elementary.a[19801]: segfault at 8 ip 000055fe686cbde1 sp 00007ffd3d082590 error 4 in io.elementary.appcenter[55fe68695000+67000]
sep 27 08:50:16 odys kernel: Code: c6 fc ff 48 89 e9 48 89 ef 48 8d 15 59 96 ff ff 45 31 c0 48 8d 35 f4 0a 03 00 e8 ea f6 fc ff 48 8b 45 50 48 89 ef 48 8b 40 08 <48> 8b 70 08 e8 06 f6 fc ff 48 83 c4 08 4c 89 e0 5d 41 5c 41 5d 41
sep 27 08:50:17 odys systemd[1300]: app-gnome-io.elementary.appcenter-19801.scope: Consumed 6.145s CPU time.

I double checked and apt.pop-os.org resolves properly and even setting it to another of its valid IPs in my /etc/hosts/ file didn't solve the issue. (It seems to be a 301 redirect, but I guess it's normal)

Steps to reproduce (if you know):

Maybe setting an invalid IP for apt.pop-os.org? Not sure what's going on here.

Expected behavior:

For it to work. Segfaulting seems bad.

Other Notes:

It seems my apt was locked by the auto-updater:

$ sudo apt-get update
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 2444 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/

$ ps aux | grep 2444
root        2444  0.0  0.0  28852  9612 ?        SN   07:52   0:00 apt-get update

After killing it and re-trying it worked... I'm finding it weird the auto-updater isn't somehow timing out after 10-15 minutes...

So, I guess this bug is two-fold:

AnomalRoil commented 2 years ago

So, I was able to consistently reproduce the crash by setting a wrong IP for apt.pop-os.org in my hosts file.

mmstick commented 2 years ago

I will check it out