SRU justification for input-remapper 2.0.1-1ubuntu0.24.04.1 (noble).

[Impact]

* input-remapper-control is run by the installed udev rule for every
  input device add event. If /run/dbus/system_bus_socket is not available
  yet (coldplug before dbus.socket exists, or a D-Bus restart), pydbus's
  SystemBus() raises GLib.GError. In 2.0.1 that call is outside the try
  block in Daemon.connect(), so the exception is unhandled and Apport
  records a crash report. This is the same defect as resolute's 2.2.0,
  fixed there by 2.2.0-1ubuntu0.26.04.1.

* The fix moves SystemBus() inside the existing GLib.GError handlers
  (initial connect and fallback retry loop). When the bus is unavailable
  the helper logs an error and exits 5 instead of raising.

[Test Case]

* With the system bus unavailable:

    DBUS_SYSTEM_BUS_ADDRESS=unix:path=/nonexistent \
      input-remapper-control --command autoload --device /dev/input/event0

  - stock 2.0.1-1: unhandled gi.repository.GLib.GError traceback, exit 1
  - patched: "Service not running? ..." and "Daemon missing", exit 5,
    no traceback and no Apport report

  Verified against the published noble source in a clean tree.

* Regression check: input-remapper-daemon starts normally and remapping
  autoloads at login and on hotplug; input-remapper-gtk starts normally.

[Regression Potential]

* Low. Only the placement of an existing call inside an existing
  exception handler changes; the success path and the fallback retry
  path are behaviourally unchanged. A missing bus now produces exit 5
  instead of an unhandled exception.


** Attachment added: "input-remapper_2.0.1-1ubuntu0.24.04.1.debdiff"
   
https://bugs.launchpad.net/bugs/2174519/+attachment/6022784/+files/input-remapper_2.0.1-1ubuntu0.24.04.1.debdiff

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

Title:
  input-remapper-control crashed with gi.repository.GLib.GError in
  bus_get() during udev autoload

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/input-remapper/+bug/2174519/+subscriptions


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

Reply via email to