** Description changed:

- 1) lsb_release -rd:
- Description: Ubuntu Kylin 26.04
+ [Impact]
  
- 2) apt-cache policy pkgname:
- Package: libkysdk-system (3.0.1.2-0ubuntu1)
+ On affected Ubuntu Kylin 26.04 installations, /usr/bin/bluetoothService
+ crashes during startup while retrieving the current user through
+ kdk_system_get_eUser() in libkysysinfo.so.3. This disrupts Bluetooth
+ functionality at login.
  
- 3) What you expected to happen:
- The `/usr/bin/bluetoothService` should start normally during system boot 
without any errors, allowing the system to provide standard Bluetooth 
functionality.
- 
- 4) What happened instead:
- Immediately after system startup, `/usr/bin/bluetoothService` (provided by 
`ukui-bluetooth`) crashes and generates a coredump.
- According to the stack trace, the segmentation fault occurs in the D-Bus 
message handling (`dbus_message_iter_recurse` in `libdbus-1.so.3`), which is 
triggered by a call to `kdk_system_get_eUser` from `libkysysinfo.so.3` (part of 
the `libkysdk-system` package) during initialization.
- 
- ==============================================
- SRU JUSTIFICATION
- ==============================================
- 
- [Impact]
- On Ubuntu Kylin 26.04, the crash of `/usr/bin/bluetoothService` renders 
Bluetooth services completely unavailable upon login. The root cause is within 
the `libkysdk-system` package, specifically in how `kdk_system_get_eUser` 
handles D-Bus interactions. Updating `libkysdk-system` resolves the underlying 
D-Bus crash and restores Bluetooth functionality for the user.
+ The current Resolute implementation releases D-Bus reply messages while
+ iterators and strings referring to their contents are still in use. The
+ targeted fix keeps replies alive until the required data have been read
+ and copied. It also separates parent/child iterators and initializes the
+ user-list pointer before cleanup can be reached.
  
  [Test Plan]
- 1. Boot a standard Ubuntu Kylin 26.04 system.
- 2. Check the status of the Bluetooth service: `systemctl status 
bluetoothService`
- 3. Observe that the service fails and a crash file is generated in 
`/var/crash/`.
- 4. Enable the proposed repository and upgrade the `libkysdk-system` package 
to the patched version.
- 5. Reboot the system.
- 6. Verify that `/usr/bin/bluetoothService` is now in an 'active (running)' 
state.
- 7. Confirm that no new coredumps are generated in `/var/crash/`.
+ 
+ Use an Ubuntu Kylin 26.04 (Resolute) desktop. Record the architecture,
+ session type, kernel, controller and ukui-bluetooth version. Begin with a
+ system using the normal release, updates and security pockets and no
+ unrelated proposed packages. This test verifies the reported startup crash
+ and desktop stability; pairing or connecting to a remote Bluetooth device
+ is not required to exercise the reported failure.
+ 
+ 1. With libkysdk-system 3.0.1.2-0ubuntu1 installed, confirm the package
+    version using apt-cache policy and dpkg-query. Boot and log into UKUI
+    using the sequence that reproduced the original failure. Record the
+    failure, new crash timestamps and the relevant backtrace, including
+    kdk_system_get_eUser/dbus_message_iter_recurse where available.
+ 
+ 2. Inspect systemctl cat ukui-bluetooth.service. In the tested Resolute
+    package (ukui-bluetooth 4.20.0.0-0ubuntu2), the unit launches
+    /usr/bin/bluetoothService after lightdm.service. Check it with
+    systemctl status ukui-bluetooth.service and record its restart count
+    with systemctl show ukui-bluetooth.service -p NRestarts -p ExecMainStatus.
+    Do not confuse this unit with the separate BlueZ bluetooth.service.
+    Record bluetoothctl list so the hardware environment is explicit.
+ 
+ 3. Once the SRU is accepted, enable resolute-proposed and install the
+    accepted libkysdk-system version from the Ubuntu archive. Upgrade
+    libkysdk-system-dev to the same version if it is installed. Record the
+    exact version and apt policy. If a local build of the same version was
+    installed previously, use --reinstall or a clean test installation to
+    ensure that these are the official archive binaries.
+ 
+ 4. Reboot and log into UKUI. Open the Bluetooth settings and check
+    systemctl status ukui-bluetooth.service. Confirm the process is running,
+    its restart count does not increase, and no new instance of the original
+    startup crash appears in journalctl -b -u ukui-bluetooth.service,
+    /var/crash or coredump records. Old crash files are retained and
+    distinguished by their timestamps. A controlled restart using
+    sudo systemctl restart ukui-bluetooth.service can supplement, but must
+    not replace, the reboot/login tests.
+ 
+ 5. After the reboot checks, perform one logout/login cycle. Check that the
+    UKUI panel, sidebar and desktop remain responsive
+    and that ukui-bluetooth.service continues running without an increasing
+    restart count after these transitions. Record each result and any new
+    crashes.
+ 
+ 6. Report the exact accepted package version, its archive origin, the
+    original reproduction and each test result in a bug comment. Attach
+    supporting logs. Mark verification-done-resolute only if the official
+    proposed package passes the complete agreed test plan. If it fails,
+    report the failure and use verification-failed-resolute instead.
  
  [Where problems could occur]
- `libkysdk-system` (specifically `libkysysinfo.so.3`) is a foundational SDK 
library used by various UKUI desktop components. The fix modifies the internal 
D-Bus handling within `kdk_system_get_eUser`. If the fix introduces logic 
errors, it could impact other UKUI components (like the panel or sidebar) that 
query current user information, potentially causing them to fail or crash. 
Regression testing will include verifying general desktop login and UKUI panel 
stability to ensure they continue functioning properly alongside the restored 
Bluetooth service.
+ 
+ The modified function returns the active user's name and is used by UKUI
+ components as well as the Bluetooth service. Incorrect lifetime handling
+ could still produce a crash, an incorrect user name, or a leak on success
+ or failure paths. Login transitions could expose issues that a single
+ successful startup misses. The tests therefore cover repeated startup,
+ logout/login and normal panel, sidebar and desktop operation.
+ 
+ The patch retains the existing D-Bus lookup and does not change the public
+ API or import the upstream tty/who implementation or signal-handler
+ changes. The SRU driver must still investigate any new user-information
+ or desktop failures observed during testing.
+ 
+ [Other Info]
+ 
+ The later stable release Stonking and current development release
+ Tenacious already publish libkysdk-system 3.0.1.3-0ubuntu1, which contains
+ the alternative upstream implementation addressing this crash:
+ https://launchpad.net/ubuntu/+source/libkysdk-system/3.0.1.3-0ubuntu1
+ 
+ The Resolute fix is independently implemented to keep the stable-release
+ change focused on D-Bus object lifetime. It is not a cherry-pick or code
+ subset of upstream commit 6a50f83d68ecddb6c1f574b9387c939130c2575c.
+ 
+ The revised debdiff supersedes the previous Resolute attachments. Local
+ pre-upload testing and later verification of the official proposed
+ binaries are reported separately in comments.

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

Title:
  [SRU] /usr/bin/bluetoothService crashes in kdk_system_get_eUser during
  startup

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntukylin/+bug/2151287/+subscriptions


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

Reply via email to