Download progress indicators no longer appear

Bug #2012702 reported by Aaron Rainbolt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lubuntu-update-notifier (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
New
Medium
Unassigned
Kinetic
New
Medium
Unassigned
Lunar
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:

1. Install Lubuntu Lunar from a slightly outdated ISO (the latest may be fine but it may also not have updates available that are needed to test).
2. Click on the Application Menu, search for "Apply", and click "Apply Full Upgrade".
3. Provide your password and press Enter.
4. Wait until you are shown that packages are being downloaded.

Expected result: Download progress should be shown underneath the package names.

Actual result: No numbers appear at all.

Other info: I assume this is probably the result of a somewhat recent change in either Python, PyQt5, or Qt 5.15, since I don't think this used to happen even with the most recent version of lubuntu-update-notifier.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Well this is weird. I can reproduce the bug on an installed Lunar VM, but *not* on an ISO! Everything works just fine on the ISO, for reasons I don't understand. Digging into that further.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

This makes no sense. It looks like the problem only occurs if the cache isn't updated (the equivalent of "sudo apt update"). But the code that updates the progress indicator when downloading cache updates and the code that updates the progress indicator when downloading the upgrades themselves are almost identical (and the if/then statement that isn't identical causes a glitch if you remove it).

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

OK, found it partially. Somehow self.status isn't getting set to "status-downloading" when an update is run without refreshing the cache. This despite the fact that "self.trans2.connect("status-changed", self.status_changed)" is run when doing an upgrade regardless of whether the cache is being updated or not.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Sigh. And here's the rest of the story:

-----

Status:Downloading status-downloading

Status:Finished status-finished

Status Details:Downloading fonts-ubuntu
Status Details:Downloading libobt2v5
Status Details:Downloading libobrender32v5
Status Details:Downloading openbox

-----

Somehow a spurious status-finished is working its way in. I wonder if this is because of the repair_install() function somehow.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Yep, it is indeed repair_install()'s fault, as verified by commenting out a line of code. Frustrating, this didn't happen when that addition was in testing.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Judging from the code, I think this is probably the result of a race condition - somehow the repair_install transaction is still running just as the upgrade transaction begins, setting the status to status-finished just after the upgrader sets the status to status-downloading.

I'll hopefully find some way to resolve the race, but if all else fails, I *can* simply not connect the status-changed signal, which fixes it and probably won't cause a noticeable difference.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

After further investigation, I can't see how this can possibly be a race condition since the aptdaemon transactions are happening synchronously. Maybe something about Python must have changed that broke aptdaemon and that's why it's behaving so strangely now? I dunno.

The only things that the status_changed() function does is set label text (which is unnecessary for the repair_install() function), set the program's internal status (which is the very thing that's messing us up here), and prints debugging info (which the user will usually never see). So I think it's a good solution to just disconnect the status-changed signal from the status_changed() function in repair_install().

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lubuntu-update-notifier - 0.5.4

---------------
lubuntu-update-notifier (0.5.4) lunar; urgency=medium

  * Disconnect the status_changed() function from the status-changed signal in
    repair_install(), as it interferes with upgrade_progress_download().
    (LP: #2012702)
  * Don't try to pass a string to QTreeWidgetItem when it expects an
    Iterable[str]. (LP: #2012823)

 -- Aaron Rainbolt <email address hidden> Sun, 26 Mar 2023 10:48:15 -0500

Changed in lubuntu-update-notifier (Ubuntu):
status: New → Fix Released
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

Just noticed this happening on a Jammy system - I'll be prepping an SRU for it at some point.

Changed in lubuntu-update-notifier (Ubuntu Jammy):
importance: Undecided → Medium
importance: Medium → Low
Changed in lubuntu-update-notifier (Ubuntu Kinetic):
importance: Undecided → Low
summary: - Download progress indicators no longer appear in Lunar
+ Download progress indicators no longer appear
Changed in lubuntu-update-notifier (Ubuntu Jammy):
importance: Low → Medium
Changed in lubuntu-update-notifier (Ubuntu Kinetic):
importance: Low → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.