on update, notification in software center that fwupd failed to activate

Bug #1744782 reported by Ian Corne
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fwupd (Ubuntu)
Invalid
Undecided
Unassigned
libsmbios (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Error occurs every time I update.

{ ~ } » sudo systemctl status fwupd.service ~ 1
● fwupd.service - Firmware update daemon
   Loaded: loaded (/lib/systemd/system/fwupd.service; static; vendor preset: enabled)
   Active: failed (Result: core-dump) since Mon 2018-01-22 20:08:08 CET; 18s ago
     Docs: http://www.fwupd.org/
  Process: 6553 ExecStart=/usr/lib/fwupd/fwupd (code=dumped, signal=SEGV)
 Main PID: 6553 (code=dumped, signal=SEGV)

Jan 22 20:08:08 laptopian systemd[1]: Starting Firmware update daemon...
Jan 22 20:08:08 laptopian systemd[1]: fwupd.service: Main process exited, code=dumped, status=11/SEGV
Jan 22 20:08:08 laptopian systemd[1]: fwupd.service: Failed with result 'core-dump'.
Jan 22 20:08:08 laptopian systemd[1]: Failed to start Firmware update daemon.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: fwupd 1.0.2-1
ProcVersionSignature: Ubuntu 4.13.0-25.29-generic 4.13.13
Uname: Linux 4.13.0-25-generic x86_64
ApportVersion: 2.20.8-0ubuntu6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Jan 22 20:08:48 2018
InstallationDate: Installed on 2017-10-23 (91 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
SourcePackage: fwupd
UpgradeStatus: Upgraded to bionic on 2018-01-10 (11 days ago)

Revision history for this message
Ian Corne (icorne) wrote :
Revision history for this message
Mario Limonciello (superm1) wrote :

Hi @ian, thanks for filing.

Do you have a core dump in /var/crash that you can share to this bug?

If not, can you please see if you can reproduce it by manually trying to launch fwupd like this:

# sudo /usr/lib/fwupd/fwupd -v

Revision history for this message
Ian Corne (icorne) wrote :

Hello,

So I checked /var/crash, nothing there.
I tried starting it with your command, that seemed to work, ctrl+c to stop
Tried again with sudo service, crashed
tried again with your command, crashed
Checked again, now I have a a file in /var/crash

https://paste.ubuntu.com/26442184/

Revision history for this message
Ian Corne (icorne) wrote :
Revision history for this message
Mario Limonciello (superm1) wrote :

Thanks for sharing. I'm suspecting memory corruption related to a problem in libsmbios (used by Dell plugin). Can you please try an experiment and see if this resolves it:

1) Edit /etc/fwupd/daemon.conf
2) Change BlacklistPlugins=test to BlacklistPlugins=test;dell

That will disable the Dell plugin from loading.
Try to restart fwupd a few times and see if it works properly.

Revision history for this message
Ian Corne (icorne) wrote : Re: [Bug 1744782] Re: on update, notification in software center that fwupd failed to activate

Hello,

It still crashes sometimes.

Do you need the crash file?

On 23 January 2018 at 17:14, Mario Limonciello <email address hidden> wrote:

> Thanks for sharing. I'm suspecting memory corruption related to a
> problem in libsmbios (used by Dell plugin). Can you please try an
> experiment and see if this resolves it:
>
> 1) Edit /etc/fwupd/daemon.conf
> 2) Change BlacklistPlugins=test to BlacklistPlugins=test;dell
>
> That will disable the Dell plugin from loading.
> Try to restart fwupd a few times and see if it works properly.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1744782
>
> Title:
> on update, notification in software center that fwupd failed to
> activate
>
> Status in fwupd package in Ubuntu:
> New
>
> Bug description:
> Error occurs every time I update.
>
> { ~ } » sudo systemctl status fwupd.service
>
> ~ 1
> ● fwupd.service - Firmware update daemon
> Loaded: loaded (/lib/systemd/system/fwupd.service; static; vendor
> preset: enabled)
> Active: failed (Result: core-dump) since Mon 2018-01-22 20:08:08 CET;
> 18s ago
> Docs: http://www.fwupd.org/
> Process: 6553 ExecStart=/usr/lib/fwupd/fwupd (code=dumped, signal=SEGV)
> Main PID: 6553 (code=dumped, signal=SEGV)
>
> Jan 22 20:08:08 laptopian systemd[1]: Starting Firmware update daemon...
> Jan 22 20:08:08 laptopian systemd[1]: fwupd.service: Main process
> exited, code=dumped, status=11/SEGV
> Jan 22 20:08:08 laptopian systemd[1]: fwupd.service: Failed with result
> 'core-dump'.
> Jan 22 20:08:08 laptopian systemd[1]: Failed to start Firmware update
> daemon.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: fwupd 1.0.2-1
> ProcVersionSignature: Ubuntu 4.13.0-25.29-generic 4.13.13
> Uname: Linux 4.13.0-25-generic x86_64
> ApportVersion: 2.20.8-0ubuntu6
> Architecture: amd64
> CurrentDesktop: ubuntu:GNOME
> Date: Mon Jan 22 20:08:48 2018
> InstallationDate: Installed on 2017-10-23 (91 days ago)
> InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64
> (20171018)
> SourcePackage: fwupd
> UpgradeStatus: Upgraded to bionic on 2018-01-10 (11 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/
> 1744782/+subscriptions
>

Revision history for this message
Mario Limonciello (superm1) wrote :

Yeah if you can share the output and updated crash report that would be great.

Revision history for this message
Ian Corne (icorne) wrote :

Okay, find the stuff attached here. I noticed more info in dmesg as well.

Revision history for this message
Ian Corne (icorne) wrote :
Revision history for this message
Ian Corne (icorne) wrote :
Revision history for this message
Mario Limonciello (superm1) wrote :

That crash still looks like it's the one that happens from a bad libsmbios initialization. Can you disable the Dell plugin harder?

Like this:

# sudo mv /usr/lib/x86_64-linux-gnu/fwupd-plugins-3/libfu_plugin_dell.so /usr/lib/x86_64-linux-gnu/fwupd-plugins-3/libfu_plugin_dell.so.old

That will prevent it from even running it's init method (usually blacklist makes it abort after init).

Thanks in advance.

Revision history for this message
Ian Corne (icorne) wrote :

That makes it run reliable

Revision history for this message
Mario Limonciello (superm1) wrote :

OK, there have been a bunch of fixes from libsmbios upstream that aren't yet in a release. I'm going to make a few more changes and then I'll make a package for you to test.

Changed in libsmbios (Ubuntu):
status: New → Confirmed
Changed in fwupd (Ubuntu):
status: New → Confirmed
Changed in libsmbios (Ubuntu):
importance: Undecided → High
Revision history for this message
Mario Limonciello (superm1) wrote :

OK, so I think the upstream fixes committed in libsmbios can fix this. Would you mind to help verify:

1) Move that library back in place
2) Undo the blacklist of the plugin
3) git clone https://github.com/dell/libsmbios
4) cd libsmbios
5) apt build-dep libsmbios (you might need to turn on the deb-src source in /etc/apt/sources.list)
6) ./pkg/mk-rel-deb.sh
7) dpkg -i dist/bionic/libsmbios2*.deb
8) Restart fwupd with verbose

Do step 8 a few times.

Assuming that works, I'm intending to get a new libsmbios release out soon (still need to fix one more bug).

If it doesn't work still:
1) please upload a new crash report with that library in place.
2) You can rename the plugin again to prevent fwupd crashes until I have another test for you ready to go.

Revision history for this message
Ian Corne (icorne) wrote :

fwupd isn't crashing anymore, but the plugin is still crashing according to the log attached.

Revision history for this message
Mario Limonciello (superm1) wrote :

That's good news, it confirms memory leak in libsmbios causing the fwupd crash is fixed.

The reason for the memory leak however the error string related to libsmbios failing to initialize.
So I'm pretty sure that remaining problem with the dell plugin is this: https://github.com/dell/libsmbios/issues/24
That's the last blocking issue for a new libsmbios release.

libsmbios itself has an extra debug output that it can activate though to confirm that's the problem.

Can you run this?
# sudo LIBSMBIOS_C_DEBUG_OUTPUT_ALL=1 /usr/lib/fwupd/fwupd -v

Revision history for this message
Ian Corne (icorne) wrote :

Here you go

Revision history for this message
Mario Limonciello (superm1) wrote :

Did you do anything on your system to explicitly confine access to /dev/mem ?

Revision history for this message
Ian Corne (icorne) wrote :

Hello,
as far as I know, I didn't do anything special. This is an upgraded system
from 17.10

Revision history for this message
Mario Limonciello (superm1) wrote :

Ive made some changes I'd like to merge to master that may help.

Can you please try to rebuild with the "smbios3" branch and try again? Same
test with same verbose output if it's not working in fwupd properly now.

On Sat, Jan 27, 2018, 02:35 Ian Corne <email address hidden> wrote:

> Hello,
> as far as I know, I didn't do anything special. This is an upgraded system
> from 17.10
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1744782
>
> Title:
> on update, notification in software center that fwupd failed to
> activate
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1744782/+subscriptions
>

Revision history for this message
Mario Limonciello (superm1) wrote :

Actually merged it to master. Update your master branch ("# git pull" if you're not familiar with git) and try to test again.

Changed in fwupd (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Mario Limonciello (superm1) wrote :

@Ian,

Unless something comes up, planning to release the new libsmbios by next week.

Would you mind to check with master soon to see if everything is working properly?

If there's still a problem I'd like to try to fix it for the new release if possible.

Revision history for this message
Ian Corne (icorne) wrote :

run.log from executing sudo LIBSMBIOS_C_DEBUG_OUTPUT_ALL=1 /usr/lib/fwupd/fwupd -v > run.log 2>&1

Revision history for this message
Mario Limonciello (superm1) wrote :

OK, great! That confirms that the SMBIOS 3.0 fix I did upstream fixes the problem. This will be closed when the libsmbios 2.4.0 release is done.

Changed in libsmbios (Ubuntu):
status: Confirmed → Fix Committed
milestone: none → ubuntu-18.04
Revision history for this message
Mario Limonciello (superm1) wrote :

I've tagged 2.4.0 upstream(https://github.com/dell/libsmbios/releases/tag/v2.4.0), working on getting it into Debian (https://salsa.debian.org/efi-team/libsmbios).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libsmbios - 2.4.0-1

---------------
libsmbios (2.4.0-1) unstable; urgency=medium

  * New upstream version.
    - Fixes crashes in smbios-get-ut-data with inappropriate permissions
      (Closes: #777212)
    - Fixes crashes with SMBIOS 3.0 tables (LP: #1744782)
    - Fix location of cli.py installation (Closes: #701136)
    - No longer installs sh script with bashisms (Closes: #772330)
    - Drops unsupported RBU based flashing (Closes: #496546)
    - Fixes improper function definition (Closes: #748243)
    - Generate man pages with help2man (Closes: #748023)
  * No longer build deprecated C++ library.
    - No longer installs broken dellMediaDirectCtl (Closes: #715812)
  * debian/control:
    - Drop ia64 (Closes: #554582)
    - Update VCS
    - Add Debian EFI as team owner
    - Add Mario to uploaders list (Closes: #838078)
    - Add python3 packages
    - Drop python2 packages
    - Add python3 build-depends
    - Drop cppunit build-depends
    - Depend on libjs-jquery for libsmbios-doc
    - Rename libsmbios2 -> libsmbios-c2
      Provides/Conflicts/Replaces to make a good transition both for
      Debian & Ubuntu.
    - Build depends on help2man.
  * debian/copyright:
    - Fix long lines (Closes: #803607, #803608, #803609)
    - Remove references to C++ stuff
  * debian/rules:
    - Switch to new debhelper format
    - Enable hardening flags
  * debian/smbios-utils.links:
    - Drop reference to old rbu flash tool.

 -- Mario Limonciello <email address hidden> Tue, 06 Feb 2018 12:40:46 -0600

Changed in libsmbios (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.