** Description changed:

+ [Impact]
+ 
+  * There is a potential race why the async availability of an Object might 
+    lead to an access of a None object and fail virt-manager.
+ 
+  * The fix just makes sure this cases is avoided by checking the type 
+    upfront.
+ 
+  * Slow remote connections are assumed to increase the window for this 
+    race, but so far it seems rare and barely reproducible.
+ 
+ [Test Case]
+ 
+  * This is hard - sorry. While in theory it seems clear what happens 
+    (self._hostinfo is None) it is hard to provike that. But OTOH people 
+    have hit it in the field, so we want to fix it.
+    Given the very small change I'd ask you to review it on the code level 
+    instead of testing.
+ 
+   * If one insists on testing create a bunch of slow conenctions to remote 
+     ssh libvirtd. And iterate connecting to those remotes. But so far I 
+     wan't able to trigger it that way (more tests, slower connection, more 
+     bad luck needed).
+ 
+ [Regression Potential]
+ 
+  * Just adding an extra sanity check before accessing an (otherwise) 
+    potentially None Object IMHO poses no extra regression risk.
+ 
+ [Other Info]
+  
+  * n/a
+ 
+ ---
+ 
  I launched virt-manager and connected to libvirtd running on a local
  server via an SSH connection.  I got an unexpected error dialog
  
-     Error launching host dialog: 'NoneType' object has no attribute
+     Error launching host dialog: 'NoneType' object has no attribute
  '__getitem__'
  
  I have a screenshot of the last part of the traceback (attached), but
  unfortunately I didn't think to copy it as text, and I can no longer
  reproduce the error.  I'll retype the last frame a least:
  
-       File "/usr/share/virt-manager/virtManager/connection.py", line 349, in 
host_memory_size
-         return self._hostinfo[1] * 1024
-     TypeError: 'NoneType' object has no attribute '__getitem__'
+       File "/usr/share/virt-manager/virtManager/connection.py", line 349, in 
host_memory_size
+         return self._hostinfo[1] * 1024
+     TypeError: 'NoneType' object has no attribute '__getitem__'
  
  After I dismissed the error dialog, everything seemed to be working just
  fine -- I could see the VMs and connect to them.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: virt-manager 1:1.5.1-0ubuntu1
  ProcVersionSignature: Ubuntu 4.15.0-34.37-generic 4.15.18
  Uname: Linux 4.15.0-34-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.9-0ubuntu7.3
  Architecture: amd64
  CurrentDesktop: GNOME
  Date: Tue Sep 25 18:20:39 2018
  InstallationDate: Installed on 2016-09-10 (745 days ago)
  InstallationMedia: Ubuntu-GNOME 16.04.1 LTS "Xenial Xerus" - Release amd64 
(20160720)
  PackageArchitecture: all
  SourcePackage: virt-manager
  UpgradeStatus: Upgraded to bionic on 2018-04-27 (151 days ago)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1794315

Title:
  Error launching host dialog: 'NoneType' object has no attribute
  '__getitem__'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/1794315/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to