** Description changed:

  Start software-properties-gtk, switch to additional drivers tab. The
  program will start consuming 100% CPU for quite some time (many seconds
  or minutes depending on the machine).
  
  There is however no way to cancel the operation other than killing
  software-properties. Trying to close the window or clicking Close button
  hangs.
  
  Test plans
  ----------
  
  1. Start software-properties-gtk
  1.1. Go to additional drivers tab.
  1.2. Click close at the south-east corner or close the window via your window 
manager.
  Expected. Window closes immediately.
  
  4. Start software-properties-gtk
  4.1. Go to additional drivers tab and wait.
  Expected: The viewport will at the end say that either no drivers are 
available or show a list of drivers such as in the drivers-list.png attachment. 
The cancel and retry buttons are gone in the latter case.
  
  2. Start software-properties-gtk and 'top' in a terminal
  2.1. Go to additional drivers tab.
  Expected: The 'python3' command starts consuming 100% CPU.
  2.2. Click cancel.
  Expected: The aforementioned process is no longer hogging the CPU, indicating 
that the driver scan really stopped. The retry button is clickable but cancel 
is not.
  2.3. Click retry.
  Expected: The 'python3' command starts consuming 100% CPU. The retry button 
is not clickable but cancel ist.
  
  3. Start software-properties-gtk and 'top' in a terminal
  3.1. Go to additional drivers tab.
  3.2. Get the PID of the 'python3' process consuming 100% CPU and kill it with 
kill -29 PID
  Expected: The viewport says "An error blabla. Exit status: -29." Retry is 
clickable but cancel is not.
  
  5. Start software-properties-gtk
  5.1. Introduce a unconditional exception in 
/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py:system_device_drivers, 
e.g.:
  --->
  --- /usr/lib/python3/dist-packages/UbuntuDrivers/detect.py
  +++ /usr/lib/python3/dist-packages/UbuntuDrivers/detect.py
  @@ -866,4 +866,5 @@
  
-  def system_device_drivers(apt_cache=None, sys_path=None, freeonly=False):
+  def system_device_drivers(apt_cache=None, sys_path=None, freeonly=False):
  +print(fooo)
-      '''Get by-device driver packages that are available for the system.
+      '''Get by-device driver packages that are available for the system.
  
  <---
  5.2. Go to additional drivers tab.
- Expected: "An error occurred while searching for drivers."
+ Expected: "An error occurred while searching for drivers."; In the terminal, 
the backtrace is shown:
+ --->
+ Traceback (most recent call last):
+   File 
"/home/nteodosio/canonical/ubuntu-pro/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py",
 line 1456, in detect_drivers
+     raise(self.p.exception)
+ Exception: Traceback (most recent call last):
+   File 
"/home/nteodosio/canonical/ubuntu-pro/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py",
 line 121, in run
+     multiprocessing.Process.run(self)
+   File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
+     self._target(*self._args, **self._kwargs)
+   File 
"/home/nteodosio/canonical/ubuntu-pro/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py",
 line 1437, in wrapper_system_device_drivers
+     devices = detect.system_device_drivers(cache)
+               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 919, in 
system_device_drivers
+     print(fooooo)
+           ^^^^^^
+ NameError: name 'fooooo' is not defined
+ <---

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to software-properties in
Ubuntu.
https://bugs.launchpad.net/bugs/2076084

Title:
  Additional drivers tab cause uncancellable operation that prevents the
  program from closing

Status in software-properties package in Ubuntu:
  In Progress

Bug description:
  Start software-properties-gtk, switch to additional drivers tab. The
  program will start consuming 100% CPU for quite some time (many
  seconds or minutes depending on the machine).

  There is however no way to cancel the operation other than killing
  software-properties. Trying to close the window or clicking Close
  button hangs.

  Test plans
  ----------

  1. Start software-properties-gtk
  1.1. Go to additional drivers tab.
  1.2. Click close at the south-east corner or close the window via your window 
manager.
  Expected. Window closes immediately.

  4. Start software-properties-gtk
  4.1. Go to additional drivers tab and wait.
  Expected: The viewport will at the end say that either no drivers are 
available or show a list of drivers such as in the drivers-list.png attachment. 
The cancel and retry buttons are gone in the latter case.

  2. Start software-properties-gtk and 'top' in a terminal
  2.1. Go to additional drivers tab.
  Expected: The 'python3' command starts consuming 100% CPU.
  2.2. Click cancel.
  Expected: The aforementioned process is no longer hogging the CPU, indicating 
that the driver scan really stopped. The retry button is clickable but cancel 
is not.
  2.3. Click retry.
  Expected: The 'python3' command starts consuming 100% CPU. The retry button 
is not clickable but cancel ist.

  3. Start software-properties-gtk and 'top' in a terminal
  3.1. Go to additional drivers tab.
  3.2. Get the PID of the 'python3' process consuming 100% CPU and kill it with 
kill -29 PID
  Expected: The viewport says "An error blabla. Exit status: -29." Retry is 
clickable but cancel is not.

  5. Start software-properties-gtk
  5.1. Introduce a unconditional exception in 
/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py:system_device_drivers, 
e.g.:
  --->
  --- /usr/lib/python3/dist-packages/UbuntuDrivers/detect.py
  +++ /usr/lib/python3/dist-packages/UbuntuDrivers/detect.py
  @@ -866,4 +866,5 @@

   def system_device_drivers(apt_cache=None, sys_path=None, freeonly=False):
  +print(fooo)
       '''Get by-device driver packages that are available for the system.

  <---
  5.2. Go to additional drivers tab.
  Expected: "An error occurred while searching for drivers."; In the terminal, 
the backtrace is shown:
  --->
  Traceback (most recent call last):
    File 
"/home/nteodosio/canonical/ubuntu-pro/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py",
 line 1456, in detect_drivers
      raise(self.p.exception)
  Exception: Traceback (most recent call last):
    File 
"/home/nteodosio/canonical/ubuntu-pro/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py",
 line 121, in run
      multiprocessing.Process.run(self)
    File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
      self._target(*self._args, **self._kwargs)
    File 
"/home/nteodosio/canonical/ubuntu-pro/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py",
 line 1437, in wrapper_system_device_drivers
      devices = detect.system_device_drivers(cache)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 919, in 
system_device_drivers
      print(fooooo)
            ^^^^^^
  NameError: name 'fooooo' is not defined
  <---

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2076084/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to