New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade to 1.2.2, fwupd failed to start for SQL error #909

Closed
Xuanwo opened this Issue Jan 2, 2019 · 11 comments

Comments

8 participants
@Xuanwo
Copy link

Xuanwo commented Jan 2, 2019

$ fwupdmgr --version
client version: 1.2.2
compile-time dependency versions
        gusb:   0.3.0
        efivar: 35
Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out (service_start_timeout=25000ms)
$ fwupdmgr get-devices
Error calling StartServiceByName for org.freedesktop.fwupd: Timeout was reached

Please answer the following questions:

  • Operating system and version: Archlinux
  • How did you install fwupd: pacman
  • Have you tried rebooting? Yes
  • Are you using an NVMe disk? Yes

fwupd.service failed to start for following error:

Jan 02 10:00:02 thinkpad-x1-carbon systemd[1]: Starting Firmware update daemon...
Jan 02 10:00:02 thinkpad-x1-carbon fwupd[16536]: Failed to get PCR0s: missing executable tpm2_pcrlist in PATH
Jan 02 10:00:02 thinkpad-x1-carbon fwupd[16536]: Failed to load engine: Failed to prepare SQL: no such column: protocol
Jan 02 10:00:03 thinkpad-x1-carbon systemd[1]: fwupd.service: Main process exited, code=exited, status=1/FAILURE
Jan 02 10:00:03 thinkpad-x1-carbon systemd[1]: fwupd.service: Failed with result 'exit-code'.
Jan 02 10:00:03 thinkpad-x1-carbon systemd[1]: Failed to start Firmware update daemon.

Related commit: 4e886a4#diff-d3db11804d01503f4629bf8ae4ed31bbR177

@hughsie

This comment has been minimized.

Copy link
Owner

hughsie commented Jan 2, 2019

Can you upload /var/lib/fwupd/pending.db to this issue please.

@Xuanwo

This comment has been minimized.

Copy link

Xuanwo commented Jan 2, 2019

pending.db.gz

This is the pending.db with gzip ( github do not allow *.db attchment. )

@kaihendry

This comment has been minimized.

@Nikki1993

This comment has been minimized.

Copy link

Nikki1993 commented Jan 2, 2019

@gardar

This comment has been minimized.

Copy link

gardar commented Jan 2, 2019

Same issue for me on Arch, removing the /var/lib/fwupd/pending.db seems to solve the issue.

@joakim-tjernlund

This comment has been minimized.

Copy link

joakim-tjernlund commented Jan 2, 2019

same here:
13:13:56:0940 FuEngine no plugin specified for udev device /sys/devices/pci0000:00/0000:00:1f.6
13:13:56:0940 FuPlugin performing udev_device_added() on udev
13:13:56:0940 FuHistory trying to open database '/var/lib/fwupd/pending.db'
13:13:56:0941 FuHistory got schema version of 3
Failed to load engine: Failed to prepare SQL: no such column: protocol
13:13:56:0941 FuPlugin performing destroy() on upower

Removing pending fixed it, lost my history though.

hughsie added a commit that referenced this issue Jan 2, 2019

Correctly migrate the history database
I forgot to include the protocol column when migrating to v3, so create a v4
which ignores the sqlite error if the column already exists.

Fixes #909
@hughsie

This comment has been minimized.

Copy link
Owner

hughsie commented Jan 2, 2019

Can you try with that commit please? If that works, I'll roll a new release with that included.

@joakim-tjernlund

This comment has been minimized.

Copy link

joakim-tjernlund commented Jan 2, 2019

I didn't save a copy of pending.db, sorry.

@philmmanjaro

This comment has been minimized.

Copy link

philmmanjaro commented Jan 2, 2019

@hughsie: your commit seems to fix the issue. https://forum.manjaro.org/t/70565/5

@Xuanwo

This comment has been minimized.

Copy link

Xuanwo commented Jan 3, 2019

@hughsie I'm sure your commit fix the issue, tested on my PC.

@hughsie hughsie closed this in #911 Jan 4, 2019

hughsie added a commit that referenced this issue Jan 4, 2019

Correctly migrate the history database
I forgot to include the protocol column when migrating to v3, so create a v4
which ignores the sqlite error if the column already exists.

Fixes #909
@swidz

This comment has been minimized.

Copy link

swidz commented Jan 5, 2019

$ fwupdmgr --version
client version:	1.2.3
compile-time dependency versions
	gusb:	0.2.9
	efivar:	34
Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out
fwupdmgr get-devices
Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out

after deleting the pending.db file which in my case was not located in /var/lib/fwupd but in /var/local/lib/fwupd

$ fwupdmgr --version
client version:	1.2.3
compile-time dependency versions
	gusb:	0.2.9
	efivar:	34
Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: Timeout was reached

But the file pending.db is getting recreated in /var/local/lib/fwupd

Please answer the following questions:

Operating system and version: Debian 9.6 
How did you install fwupd: build with meson and ninja
Have you tried rebooting? Yes
Are you using an NVMe disk? Yes

pending.db.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment