[Bug 1642812] Re: USB devices are not closed when error occurs
Robert Liu
1642812 at bugs.launchpad.net
Tue Feb 13 01:47:19 UTC 2018
Hi @Brian,
The proposed version (0.8.3) has been verified. It does fix the bug as well.
SKU: Dell Thin client
Old version (0.7.0): fwupd has a open fd (/dev/bus/usb/001/007)
New version (0.8.3): fwupd doesn't have a open fd.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1642812
Title:
USB devices are not closed when error occurs
Status in fwupd package in Ubuntu:
Fix Released
Status in fwupd source package in Xenial:
Triaged
Status in fwupd source package in Yakkety:
Won't Fix
Status in fwupd source package in Zesty:
Fix Released
Bug description:
[Impact]
* fwupd (used in Xenial) does not close USB device nodes when it fails to process the
devices.
* The orphan (un-closed) device node will be kept until fwupd ends
* The behavior will avoid the system to set the USB device as
idle/suspend then the system cannot enter some power-saving mode (eg.
S0ix)
[Test Case]
* make sure fwupd is not running by executing 'fwupdmgr get-devices'
It will show devices information.
* list the fds opened by fwupd
$ sudo ls -l /proc/$(pgrep fwupd)/fd | grep usb
If a system is not affected, it will output nothing.
If the result shows one or more strings like /dev/bus/usb/[BUS]/[DEV]
(BUS and DEV are numeric variables), that means the issue is existing.
[Regression Potential]
* The fix only closes file descriptors of USB devices when errors
happen and should not have regression there.
[Original description]
In fwupd, a few of USB devices are not closed when there are some failures of
operations. This issue will cause fwupd has some orphan USB nodes inside during fwupd is
running. A orphan USB node might introduce memory leak and block some runtime power
features as well.
I proposed a upstream PR, and also put the link here.
https://github.com/hughsie/fwupd/pull/73
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1642812/+subscriptions
More information about the Ubuntu-sponsors
mailing list