FS#63796 - [fwupd] update to 1.3.1-2 is broken

Attached to Project: Community Packages
Opened by Carlo Carloni Calame (cmcc) - Monday, 16 September 2019, 22:12 GMT
Last edited by Filipe Laíns (FFY00) - Wednesday, 18 September 2019, 10:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Bruno Pagani (ArchangeGabriel)
Filipe Laíns (FFY00)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Today, after update to latest version of fwup, 'sudo systemctl status fwupd' reports

● fwupd.service - Firmware update daemon
Loaded: loaded (/usr/lib/systemd/system/fwupd.service; static; vendor preset: disabled)
Active: failed (Result: core-dump) since Tue 2019-09-17 00:07:45 CEST; 4s ago
Docs: https://fwupd.org/
Process: 105677 ExecStart=/usr/lib/fwupd/fwupd (code=dumped, signal=TRAP)
Main PID: 105677 (code=dumped, signal=TRAP)

Sep 17 00:07:45 XXX systemd[1]: Starting Firmware update daemon...
Sep 17 00:07:45 XXX systemd[1]: fwupd.service: Main process exited, code=dumped, status=5/TRAP
Sep 17 00:07:45 XXX systemd[1]: fwupd.service: Failed with result 'core-dump'.
Sep 17 00:07:45 XXX systemd[1]: Failed to start Firmware update daemon.

Additional info:
* fwupd 1.3.1-2

Steps to reproduce:
sudo systemctl start fwupd
This task depends upon

Closed by  Filipe Laíns (FFY00)
Wednesday, 18 September 2019, 10:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  fwupd 1.3.1-3
Comment by Filipe Laíns (FFY00) - Tuesday, 17 September 2019, 12:34 GMT
Are you sure you updated your whole system?

If you have `tpm2-abrmd` installed you need at least `tpm2-tss` 2.3.0.

Can you post the output of the following commands?
```
pacman -Qi tpm2-abrmd
pacman -Qi tpm2-tss
```

I am fairly certain `pacman -Syu` will solve your issue.
Comment by Carlo Carloni Calame (cmcc) - Tuesday, 17 September 2019, 14:42 GMT
Yes, I'm sure my system is up-to-date.

tpm2-tss is version 2.3.1-3.

Stangely, I had tpm2-abrmd 2.2.0-2 installed (it's in the community repo), but removing it "systemctl start fwupd" works. So, it looks like tpm2-abrmd is the culprit, or its interplay with tpm2-tss and/or fwupd...
Comment by Filipe Laíns (FFY00) - Tuesday, 17 September 2019, 15:28 GMT
Weird, are you able to reinstall it and provide a backtrace so that we can identify the issue?
Comment by Carlo Carloni Calame (cmcc) - Tuesday, 17 September 2019, 15:53 GMT
Yes, sure. After stopping fwupd, reinstalling and starting tpm2-abrmd, and restarting fwupd (with failure), I find this in my dmesg

[28299.216974] traps: fwupd[42401] trap int3 ip:7fb8db0f9176 sp:7ffd63203f10 error:0 in libglib-2.0.so.0.6200.0[7fb8db0b1000+81000]

and "coredumpctl info PID" gives

PID: 42401 (fwupd)
UID: 0 (root)
GID: 0 (root)
Signal: 5 (TRAP)
Timestamp: Tue 2019-09-17 17:47:25 CEST (2min 34s ago)
Command Line: /usr/lib/fwupd/fwupd
Executable: /usr/lib/fwupd/fwupd
Control Group: /system.slice/fwupd.service
Unit: fwupd.service
Slice: system.slice
Boot ID: XXX
Machine ID: XXX
Hostname: XXX
Storage: /var/lib/systemd/coredump/core.fwupd.0.YYY.lz4
Message: Process 42401 (fwupd) of user 0 dumped core.

Stack trace of thread 42401:
#0 0x00007fb8db0f9176 n/a (libglib-2.0.so.0)
#1 0x00007fb8db0f93c8 g_logv (libglib-2.0.so.0)
#2 0x00007fb8db0f95b0 g_log (libglib-2.0.so.0)
#3 0x00007fb8d42e327a Tss2_Tcti_Tabrmd_Init (libtss2-tcti-tabrmd.so.0)
#4 0x00007fb8d4e34153 n/a (libtss2-esys.so.0)
#5 0x00007fb8d4e3441a n/a (libtss2-esys.so.0)
#6 0x00007fb8d4e357b9 n/a (libtss2-esys.so.0)
#7 0x00007fb8d4e3598e n/a (libtss2-esys.so.0)
#8 0x00007fb8d4e3519f n/a (libtss2-esys.so.0)
#9 0x00007fb8d4e353ad n/a (libtss2-esys.so.0)
#10 0x00007fb8d4e264ad Esys_Initialize (libtss2-esys.so.0)
#11 0x00007fb8d4c3bad8 fu_uefi_pcrs_setup (libfu_plugin_uefi.so)
#12 0x00007fb8d4c39e6f n/a (libfu_plugin_uefi.so)
#13 0x000055c871863ce4 fu_device_probe (fwupd)
#14 0x00007fb8d4c36adb fu_plugin_coldplug (libfu_plugin_uefi.so)
#15 0x000055c87186d7bb fu_plugin_runner_coldplug (fwupd)
#16 0x000055c87187a7bd n/a (fwupd)
#17 0x000055c8718854e2 fu_engine_load (fwupd)
#18 0x000055c8718582d5 main (fwupd)
#19 0x00007fb8daa9bee3 __libc_start_main (libc.so.6)
#20 0x000055c87185864e _start (fwupd)

Stack trace of thread 42405:
#0 0x00007fb8dab66667 __poll (libc.so.6)
#1 0x00007fb8d9dc5419 n/a (libusb-1.0.so.0)
#2 0x00007fb8d9dc6440 libusb_handle_events_timeout_completed (libusb-1.0.so.0)
#3 0x00007fb8d9dc6530 libusb_handle_events (libusb-1.0.so.0)
#4 0x00007fb8dae6cfaa n/a (libgusb.so.2)
#5 0x00007fb8db0ddbc1 n/a (libglib-2.0.so.0)
#6 0x00007fb8dac4157f start_thread (libpthread.so.0)
#7 0x00007fb8dab710e3 __clone (libc.so.6)

Stack trace of thread 42404:
#0 0x00007fb8dab66667 __poll (libc.so.6)
#1 0x00007fb8d9dcbc90 n/a (libusb-1.0.so.0)
#2 0x00007fb8dac4157f start_thread (libpthread.so.0)
#3 0x00007fb8dab710e3 __clone (libc.so.6)

Stack trace of thread 42406:
#0 0x00007fb8dab66667 __poll (libc.so.6)
#1 0x00007fb8db101130 n/a (libglib-2.0.so.0)
#2 0x00007fb8db1020d3 g_main_loop_run (libglib-2.0.so.0)
#3 0x00007fb8db271b18 n/a (libgio-2.0.so.0)
#4 0x00007fb8db0ddbc1 n/a (libglib-2.0.so.0)
#5 0x00007fb8dac4157f start_thread (libpthread.so.0)
#6 0x00007fb8dab710e3 __clone (libc.so.6)

Stack trace of thread 42403:
#0 0x00007fb8dab66667 __poll (libc.so.6)
#1 0x00007fb8db101130 n/a (libglib-2.0.so.0)
#2 0x00007fb8db101201 g_main_context_iteration (libglib-2.0.so.0)
#3 0x00007fb8db101252 n/a (libglib-2.0.so.0)
#4 0x00007fb8db0ddbc1 n/a (libglib-2.0.so.0)
#5 0x00007fb8dac4157f start_thread (libpthread.so.0)
#6 0x00007fb8dab710e3 __clone (libc.so.6)


I hope this helps...
Comment by Filipe Laíns (FFY00) - Tuesday, 17 September 2019, 16:02 GMT
Eh, how silly of me. This happens because the uefi plugin is set to not tolerate GDEBUG, it should be fixed by 8b98b1cbd9d96479510faca3aed5bfdeff16066b. My bad for wasting your time, I have been a bit distracted this afternoon.

Just to confirm, could you try the following PKGBUILD?

```
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Mirco Tischler <mt-ml at gmx dot de>

pkgname=fwupd
pkgver=1.3.1
pkgrel=2
pkgdesc="A simple daemon to allow session software to update firmware"
arch=(x86_64)
url="https://github.com/fwupd/fwupd"
license=(LGPL)
depends=(libxmlb efivar python libsmbios libgusb
libsoup json-glib gcab libarchive gpgme
libgudev polkit shared-mime-info modemmanager
tpm2-tss)
makedepends=(meson valgrind gobject-introspection gtk-doc
python-cairo noto-fonts noto-fonts-cjk python-gobject vala
bash-completion python-pillow help2man gnu-efi-libs)
checkdepends=(umockdev)
backup=('etc/fwupd/daemon.conf'
'etc/fwupd/redfish.conf'
'etc/fwupd/remotes.d/dell-esrt.conf'
'etc/fwupd/remotes.d/fwupd-tests.conf'
'etc/fwupd/remotes.d/lvfs-testing.conf'
'etc/fwupd/remotes.d/lvfs.conf'
'etc/fwupd/remotes.d/vendor-directory.conf'
'etc/fwupd/remotes.d/vendor.conf'
'etc/fwupd/uefi.conf')
source=("https://people.freedesktop.org/~hughsient/releases/${pkgname}-${pkgver}.tar.xz"{,.asc}
'fix-tpm2-abrmd.patch::https://github.com/fwupd/fwupd/commit/8b98b1cbd9d96479510faca3aed5bfdeff16066b.patch')
sha256sums=('6fcb6773a2e1fe12bd7aa86aebcfd2cb6a877f7400590abaad8347cc881f7aa0'
'SKIP'
'd5c333757abede95fbb3e67e70718c59a3d011e39da86b8bc67eceb921af660b')
validpgpkeys=(163EB50119225DB3DF8F49EA17ACBA8DFA970E17) # Richard Hughes <richard@hughsie.com>

prepare() {
cd ${pkgname}-${pkgver}

patch -p1 < ../fix-tpm2-abrmd.patch

# This tests are failing inside a chroot
sed -i "/test('uefi-self-test', e)/d" plugins/uefi/meson.build
sed -i "/test('dell-self-test', e)/d" plugins/dell/meson.build
}

build() {
cd ${pkgname}-${pkgver}
arch-meson -D b_lto=false ../build
ninja -v -C ../build
}

check() {
cd build
meson test
}

package() {
DESTDIR="${pkgdir}" ninja -C build install
# Fixup mode to match polkit
install -d -o root -g 102 -m 750 "${pkgdir}"/usr/share/polkit-1/rules.d
# Move D-BUS policy
mv "${pkgdir}"/{etc,usr/share}/dbus-1/system.d
rmdir "${pkgdir}"/etc/dbus-1
# Remove the tests
rm -r "${pkgdir}"/usr/share/installed-tests/
}

```
Comment by Carlo Carloni Calame (cmcc) - Tuesday, 17 September 2019, 16:16 GMT
yep, it works! (although building the package fails at the check() stage , saying "2/14 fwupd-self-test FAIL 25.26 s (killed by signal 6 SIGABRT)", I just commented the "meson test" line in the PKGBUILD).

Thanks for your help.
Comment by Filipe Laíns (FFY00) - Tuesday, 17 September 2019, 16:17 GMT
Okay, thank you. I will backport the patch tomorrow.

Loading...