[Bug 1642812] Re: USB devices are not closed when error occurs

Robert Liu 1642812 at bugs.launchpad.net
Mon Feb 12 07:33:29 UTC 2018


Hi @Brian,
I have updated the bug description. If there is something missing, please let me know. Thanks.

** Description changed:

- 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.
+ [Impact]
  
- I proposed a upstream PR, and also put the link here.
- https://github.com/hughsie/fwupd/pull/73
+  * 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

-- 
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