Skip to content
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

fwupd segfaults at start #259

Closed
bigon opened this issue Sep 17, 2017 · 10 comments
Closed

fwupd segfaults at start #259

bigon opened this issue Sep 17, 2017 · 10 comments

Comments

@bigon
Copy link
Contributor

bigon commented Sep 17, 2017

To help us pinpoint your issue, please insert the output of the
following commands when ran on the system with the issue:

$ fwupdgmr --version
client version:	0.9.7
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
Unifying Receiver
  DeviceID:             /sys/devices/pci0000:00/0000:00:1d.2/usb8/8-2
  Guid:                 77d843f7-682c-57e8-8e29-584f5b4f52a1
  Guid:                 9d131a0c-a606-580f-8eda-80587250b8d6
  Plugin:               unifying
  Flags:                updatable
  DeviceVendor:         Logitech
  DeviceVendorId:       USB:0x046D
  Version:              RQR12.07_B0029
  VersionBootloader:    BOT01.02_B0014
  Created:              2017-09-17

Ellesmere [Radeon RX 470/480/570/580] (Radeon RX 470/480)
  DeviceID:             ro__sys_devices_pci0000_00_0000_00_03_0_0000_02_00_0
  Guid:                 dc1e8525-b30e-5d1b-8790-b2aa3c9d454b
  Plugin:               udev
  Flags:                internal|registered
  DeviceVendor:         Advanced Micro Devices, Inc. [AMD/ATI]
  DeviceVendorId:       PCI:0x1002
  Created:              2017-09-17

88E8056 PCI-E Gigabit Ethernet Controller (Motherboard)
  DeviceID:             ro__sys_devices_pci0000_00_0000_00_1c_2_0000_05_00_0
  Guid:                 75b357e0-a06a-50bf-8152-95a7d106aff6
  Plugin:               udev
  Flags:                internal|registered
  DeviceVendor:         Marvell Technology Group Ltd.
  DeviceVendorId:       PCI:0x11AB
  Created:              2017-09-17

88E8056 PCI-E Gigabit Ethernet Controller (Motherboard)
  DeviceID:             ro__sys_devices_pci0000_00_0000_00_1c_5_0000_04_00_0
  Guid:                 75b357e0-a06a-50bf-8152-95a7d106aff6
  Plugin:               udev
  Flags:                internal|registered
  DeviceVendor:         Marvell Technology Group Ltd.
  DeviceVendorId:       PCI:0x11AB
  Created:              2017-09-17

Performance MX
  DeviceID:             /sys/devices/pci0000:00/0000:00:1d.2/usb8/8-2/8-2:1.2/0003:046D:C52B.000C/0003:046D:101A.000E/hidraw/hidraw5
  Guid:                 b8323c4e-dd17-57b2-b466-26ec919e3a33
  Plugin:               unifying
  Flags:                registered
  DeviceVendor:         Logitech
  DeviceVendorId:       USB:0x046D
  Created:              2017-09-17

The system is not using EFI

Please answer the following questions:

  • Operating system and version: Debian unstable
  • How did you install fwupd (ex: from source, pacman, apt-get, etc): apt-get
  • Have you tried rebooting? yes
  • Are you using an NVMe disk? no
  • Is secure boot enabled (only for the UEFI plugin)? no

fwupd segfaults at start with the following trace:

#0  0x0000556f337e7dd2 in FU_IS_DEVICE (ptr=0x556f34bdc170) at ../src/fu-device.h:31
#1  0x0000556f337e7dd2 in fu_plugin_device_add (plugin=0x556f34bab840 [FuPlugin], device=0x556f34bdc170) at ../src/fu-plugin.c:317
#2  0x0000556f337e7eed in fu_plugin_device_add_delay_cb (user_data=0x556f34bdedf0, user_data@entry=<error reading variable: value has been optimized out>) at ../src/fu-plugin.c:374
#3  0x00007fe839841853 in g_timeout_dispatch (source=source@entry=0x556f34bde830, callback=<optimized out>, user_data=<optimized out>) at ../../../../glib/gmain.c:4633
#4  0x00007fe839840dd5 in g_main_dispatch (context=0x556f34b6c800) at ../../../../glib/gmain.c:3148
#5  0x00007fe839840dd5 in g_main_context_dispatch (context=context@entry=0x556f34b6c800) at ../../../../glib/gmain.c:3813
#6  0x00007fe8398411a0 in g_main_context_iterate (context=0x556f34b6c800, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3886
#7  0x00007fe8398414b2 in g_main_loop_run (loop=0x556f34b4edf0) at ../../../../glib/gmain.c:4082
#8  0x0000556f337d9dca in main (argc=<optimized out>, argv=<optimized out>) at ../src/fu-main.c:947

I'm pretty sure this was not the case with 0.8.2

If I'm unplugging the Logitech unifying dongle, fwupd starts properly

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874521

@bigon
Copy link
Contributor Author

bigon commented Sep 17, 2017

fwupd.txt

@bigon
Copy link
Contributor Author

bigon commented Sep 17, 2017

These are the logs after unpluging the unifying dongle starting fwupd and then plugging the dongle again

fwupd2.txt

@hughsie
Copy link
Member

hughsie commented Sep 17, 2017

So, we're loading the daemon, waiting for the 200ms callback to register the daemon, when we then find out the udev plugin has a pending device-add, then the udev delayed device happens and we explode.

@hughsie
Copy link
Member

hughsie commented Sep 17, 2017

Does valgrind on the daemon in the crashing set up show anything crazy? Thanks.

@bigon
Copy link
Contributor Author

bigon commented Sep 18, 2017

Seems to complain about Invalid read of size 8:

valgrind output

@hughsie
Copy link
Member

hughsie commented Sep 18, 2017

Fixed in 0dec274 -- thanks for all the logs!

hughsie added a commit that referenced this issue Sep 18, 2017
By removing the device from the hash table before we add it to the devices
array we could inadvertently drop the last object reference if the plugin is
not using the (optional) cache.

Just re-arrange things to fix #259
@bigon
Copy link
Contributor Author

bigon commented Oct 8, 2017

Are you sure this is fixed?

I rebuilt 0.9.7 with that patch and I still get:

#0  0x000055ea6d0e4c7f in FU_IS_DEVICE (ptr=0x55ea6d48e170) at ../src/fu-device.h:31
#1  0x000055ea6d0e4c7f in fu_plugin_device_add (plugin=0x55ea6d463840 [FuPlugin], device=0x55ea6d48e170) at ../src/fu-plugin.c:317
#2  0x000055ea6d0e4db0 in fu_plugin_device_add_delay_cb (user_data=0x55ea6d490990, user_data@entry=<error reading variable: value has been optimized out>) at ../src/fu-plugin.c:373
#3  0x00007fc16d082853 in g_timeout_dispatch (source=source@entry=0x55ea6d492160, callback=<optimized out>, user_data=<optimized out>) at ../../../../glib/gmain.c:4633
#4  0x00007fc16d081dd5 in g_main_dispatch (context=0x55ea6d41e800) at ../../../../glib/gmain.c:3148
#5  0x00007fc16d081dd5 in g_main_context_dispatch (context=context@entry=0x55ea6d41e800) at ../../../../glib/gmain.c:3813
#6  0x00007fc16d0821a0 in g_main_context_iterate (context=0x55ea6d41e800, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3886
#7  0x00007fc16d0824b2 in g_main_loop_run (loop=0x55ea6d400df0) at ../../../../glib/gmain.c:4082
#8  0x000055ea6d0d68b2 in main (argc=<optimized out>, argv=<optimized out>) at ../src/fu-main.c:947

@superm1 superm1 reopened this Oct 8, 2017
@superm1
Copy link
Member

superm1 commented Oct 9, 2017

@bigon Well that's too bad to hear.
Since there was a bunch of other large changes (like FuDeviceLocker stuff), would you mind to try with the recently 1.0.0 release? Keep in mind it's ABI incompatible, so please use the helper scripts for generating packages to use to test.

@superm1
Copy link
Member

superm1 commented Oct 18, 2017

I've put 1.0.0 into unstable. Please test with that and let us know if that's fixed for you.

@superm1
Copy link
Member

superm1 commented Oct 18, 2017

@superm1 superm1 closed this as completed Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants