Reopening: 2.12ubuntu8 fixed only one direction of the version skew.

GLib.Source.set_callback forwards user_data (one positional argument) with
python3-gi <= 3.55.2 and forwards nothing with >= 3.55.3. 2.12ubuntu8
changed `lambda _: callback()` to `callback`, which is right for new gi but
raises

  install_or_postpone.<locals>.emit_started() takes 0 positional
arguments but 1 was given

on systems with an older gi (a retained 24.04 Python stack, a held
python3-gi, or a partial upgrade). The error tracker still reports this
variant for 2.12ubuntu9:

https://errors.ubuntu.com/problem/838e3929676e66058dcc44b56d16f32aa8ce16f5

Bucket 838e3929, signature `/usr/bin/unattended-upgrade:TypeError` (the
exception type only, so the bucket merges both variants). 218/week in the
release-scoped 26.04 counter (a floor; 63.5% of the 200 sampled incidents
have no release), ~90/day (~630/week) sample-derived, at least ~40
machines by apport's 2/day cap. Stock 26.04 (2.12ubuntu9 + python3-gi
3.56.2) is not affected; this is a version-skew bug, not a stock-26.04
regression.

The fix accepts either arity:

    source.set_callback(lambda *_: callback())

It is inert on new gi, fixes old gi, and would also have covered the
2.12ubuntu7 variant reported in #2148276. A `python3-gi (>= 3.55.3)`
dependency is not an option: it would make the package uninstallable on
exactly the systems that crash, and unattended-upgrades does not depend on
python3-gi at all.

Verification on resolute (python3-gi 3.56.2):
- test/test_postpone.py passes with the patch (9 passed);
- the same test passes with an emulation of the <= 3.55.2 override
  (set_callback forwarding user_data);
- the unpatched code reproduces the exact TypeError above under that
  emulation.

SRU template draft:
  Impact: daily TypeError and apport report on systems with python3-gi
    <= 3.55.2; updates still proceed.
  Test plan: run test/test_postpone.py on 26.04 (new gi) and under an
    emulation of the old override, or install the 26.04 package on a
    24.04 userland (gi 3.48.2) and run the postpone test.
  Regression potential: one wrapper, returns the callback's value
    unchanged, only the desktop postpone path, no dependency change.

Patches prepared for resolute and stonking (2.12ubuntu9.1) and tenacious
(2.14ubuntu2); the debdiffs are attached. The resolute and stonking patches
are identical apart from the changelog distribution line. The tenacious
upload is a normal devel upload; the other two are SRUs. Subscribing
ubuntu-sponsors.

Systems that hold 2.12ubuntu7 need to unpin to pick up the fix; the
packaging cannot update a held package.


** Changed in: unattended-upgrades (Ubuntu)
       Status: Fix Released => Confirmed

** Changed in: unattended-upgrades (Ubuntu Resolute)
   Importance: Undecided => High

** Changed in: unattended-upgrades (Ubuntu Resolute)
       Status: New => Confirmed

** Changed in: unattended-upgrades (Ubuntu Stonking)
   Importance: Undecided => High

** Changed in: unattended-upgrades (Ubuntu Stonking)
       Status: New => Confirmed

** Attachment added: "sru-debdiffs.txt"
   
https://bugs.launchpad.net/bugs/2146446/+attachment/6025258/+files/sru-debdiffs.txt

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

Title:
  /usr/bin/unattended-upgrade: TypeError:
  install_or_postpone.<locals>.run_in_thread.<locals>.<lambda>() missing
  1 required positional argument: '_'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/2146446/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to