SRU justification for input-remapper 2.2.0-1ubuntu0.26.04.1 (resolute). Test build available in ppa:chris-bainbridge/sru; requesting review by universe-sponsors.
[Impact] * input-remapper-control, run by the installed udev rule for every input device add event, crashes with an unhandled gi.repository.GLib.GError when the system D-Bus is unavailable. The crash was reported on 26.04 (LP #2174519) and matches upstream issue https://github.com/sezanzeb/input-remapper/issues/1148 : the udev rule runs input-remapper-control during coldplug, before /run/dbus/system_bus_socket exists (and whenever the bus is stopped or restarting). In 2.2.0, Daemon.connect() calls SystemBus() outside the try block that handles GLib.GError, so the exception escapes and Apport records a crash report; the autoload attempt also fails. * The fix moves the SystemBus() call inside the existing GLib.GError handlers (initial connect and fallback retry loop). When the bus is unavailable the helper now logs an error and exits 5 instead of raising an unhandled exception. Behaviour when the bus is reachable is unchanged. * The equivalent change for the dasbus-based code was submitted upstream (https://github.com/sezanzeb/input-remapper/pull/1396, refs #1148) and is already uploaded to the tenacious development series as 2.2.1-1ubuntu1 (devel-first requirement). [Test Case] * Reproduce with the unpatched package (2.2.0-1): sudo unshare -m sh -c 'mount -t tmpfs tmpfs /run/dbus && input- remapper-control --command autoload --device /dev/input/event0'; echo exit=$? Result: unhandled traceback ending in "gi.repository.GLib.GError: g-io-error-quark: Could not connect: No such file or directory (1)", exit code 1, Apport crash report. * With the patched package the same command logs ERROR: Service not running? g-io-error-quark: Could not connect: No such file or directory (1) ERROR: Daemon missing and exits 5, with no traceback and no Apport report. Verified on 26.04.1 with the 2.2.0-1ubuntu0.26.04.1 PPA build. * Regression check: input-remapper-daemon starts normally, remapping autoloads at login (session autostart) and on device hotplug, and input-remapper-gtk starts normally. The full upstream unit test suite passes on the patched source (538 tests, run in an Ubuntu 26.04 VM as a non-root user), including two new regression tests covering the no-system-bus path. [Regression Potential] * Low. The patch only moves an existing call inside an existing exception handler; no other code path changes. If the bus is unavailable, the behaviour changes from "unhandled exception + Apport report" to "logged error + exit 5" (the fallback path still retries and exits 8 if the bus remains unavailable, as before). Remapping itself is unaffected: the session autostart performs the real autoload after login, and hotplug autoload works once the bus is up. ** Bug watch added: github.com/sezanzeb/input-remapper/issues #1148 https://github.com/sezanzeb/input-remapper/issues/1148 -- 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
