Bug 1297864

Summary: remote-viewer process remains active after closing rv window. coolkey case.
Product: Red Hat Enterprise Virtualization Manager Reporter: Andrei Stepanov <astepano>
Component: mingw-virt-viewerAssignee: Default Assignee for SPICE Bugs <rh-spice-bugs>
Status: CLOSED WONTFIX QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 3.6.2CC: astepano, cfergeau, dblechte, lsurette, mkalinin, mtessun, rbalakri, rh-spice-bugs, srevivo, tpelka, uril
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-02 13:36:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Spice RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
printscreen
none
remote-viewer log none

Description Andrei Stepanov 2016-01-12 16:32:09 UTC
Created attachment 1113995 [details]
printscreen

remote-viewer process remains active after closing remote-viewer window.

Notice 1: The bug exists only with active coolkey module.
Notice 2: To reproduce the bug it is _not_ necessary to have a smartcard reader.

Coolkey is essential layer for using SmartCards in pass through mode.

versions:
RHEV-M: Red Hat Enterprise Virtualization Manager Version: 3.6.2-0.1.el6
Host: vdsm-4.17.15-0.el7ev.noarch
Client: Windows 7 32 bit SP1 + latest updates 
mingw-remote-viewer: v2.0-128 from rhevm-spice-client-x86-msi-3.6-6.el6.noarch

The bug is independent from the Internet browser: could be: IE, Chrome, Firefox, cmdline.

The bug is independent from VM.

How reproducible: always

Steps to Reproduce on Win7-32 client:
1. install from https://access.redhat.com/downloads/content/216/ver=8/rhel---5/8.0/x86_64/product-software next packages: SmartCardManagerSetup-1.1.0-13.win32.i386.exe

2. open powershell

mkdir c:\ProgramData\pki\nssdb
cd C:\Program Files\VirtViewer v2.0-128\bin\'
.\certutils.exe -d 'c:\ProgramData\pki\nssdb' -N
.\modutil.exe -dbdir 'c:\ProbgramData\nssdb' -list
.\modutil.exe -dbdir 'c:\ProbgramData\nssdb' -add GemaltoSpice -libfile 'c:\Windows\System32\coolkeypk11.dll'


3. Connect to VM and close remote-viewer.

4. Open Windows Task Manager (Ctrl-Shift-Esc): make sure that remote-viewer.exe listed in Processes.

Additional info:

Qemu on host system reports no connections to VM.
virsh # qemu-monitor-command RHEL-7 --hmp --cmd info spice
Server:
     address: 10.34.73.138:5904
     address: 10.34.73.138:5905 [tls]
    migrated: false
        auth: spice
    compiled: 0.12.4
  mouse-mode: client
Channels: none
virsh # 

Un-registering coolkeypk11.dll (modutil.exe with -delete flag) helps solve this issue. But coolkeypk11.dll is only the way to passthrough smartcard device.

Comment 1 Andrei Stepanov 2016-01-12 16:38:23 UTC
Created attachment 1114025 [details]
remote-viewer log

Comment 2 Marina Kalinin 2016-01-19 18:19:31 UTC
Hi Andrei,
What are the implication of this bug? Does it mean the end user would not be able to reopen the remote-viewer and will have to kill the first process first, in order to start a new one?

Also, is this true when you open the remote-viewer from RHEV portals or only when you run it manually?

Comment 3 Andrei Stepanov 2016-01-20 09:55:03 UTC
There are two cases.

The first one. In "console options" "Native client" is selected. In this case remote-viewer.exe process remains running after I close it. I can re-open connections to the same VM as much as I wish. But, at some point client's OS can go out of memory.

The second one. In "console options" "Browser plugin" is selected. This case is much worse than the first one. It doesn't allow to re-open connection to the same VM. As I close remote remote-viewer Internet Explorer thinks that RV is still running and IE doesn't allow to open new connection. Summarizing up, I can connect only once to the same VM.

Comment 4 Uri Lublin 2016-01-21 16:54:10 UTC
Works for me on a Win7 x64.

Installed:
  SmartCardManagerSetup-1.1.0-13.win32.i386.exe
  CoolkeySetup-1.0.0-2.win64.x64.exe
  virt-viewer-x64-2.0-8.msi ("VirtViewer v2.0-128" directory)

Followed steps in comment #0 (using a regular cmd shell)
Tried connecting both from command line to a "local" VM and using
RHEV-M with a vv-file (Native Client)

Comment 5 Andrei Stepanov 2016-01-21 17:37:46 UTC
Uri, do you see a registered coolkey module?

.\modutil.exe -dbdir 'c:\ProbgramData\nssdb' -list

Does your Win7 have latest updates from Microsoft?

What version of coolkeypk11.dll do you use? 32 or 64 bit?

Comment 6 David Blechter 2016-01-22 18:46:56 UTC
n
 (In reply to Andrei Stepanov from comment #5)
> Uri, do you see a registered coolkey module?
> 
> .\modutil.exe -dbdir 'c:\ProbgramData\nssdb' -list
> 
> Does your Win7 have latest updates from Microsoft?
> 
> What version of coolkeypk11.dll do you use? 32 or 64 bit?

Andrei, can you confirm that before update it worked properly?


In any case it it is not a blocker for 3.6.

Comment 7 Uri Lublin 2016-01-26 17:23:12 UTC
(In reply to Andrei Stepanov from comment #5)
> Uri, do you see a registered coolkey module?
> 
> .\modutil.exe -dbdir 'c:\ProbgramData\nssdb' -list

C:\Program Files\VirtViewer v2.0-128\bin>modutil.exe -dbdir "\ProgramData\pki\ns
sdb" -list

Listing of PKCS #11 Modules
-----------------------------------------------------------
  1. NSS Internal PKCS #11 Module
         slots: 2 slots attached
        status: loaded

         slot: NSS Internal Cryptographic Services
        token: NSS Generic Crypto Services

         slot: NSS User Private Key and Certificate Services
        token: NSS Certificate DB

  2. SpiceGemalto
        library name: \windows\system32\coolkeypk11.dll
         slots: 1 slot attached
        status: loaded

         slot: QEMU QEMU USB CCID 0
        token:
-----------------------------------------------------------


> 
> Does your Win7 have latest updates from Microsoft?
> What version of coolkeypk11.dll do you use? 32 or 64 bit?

I tested on both 32 and 64 bit Windows 7.
The 64 bit Windows 7 is updated.
The 32 bit Windows 7 is freshly installed.

The coolkey version is 
SmartCardManagerSetup-1.1.0-13.win32.i386.exe

Comment 8 Uri Lublin 2016-01-26 17:28:52 UTC
To make it clear: "Works for me" means that I can run remote-viewer and
connect to a remote VM, and when I close remote-viewer (tried both using
menu File -> Quit and clicking on right-most corner x (close) button),
Windows Task Manager has no entry for remote-viewer.exe

An MSI installer was used to install virt-viewer

Comment 9 Yaniv Lavi 2016-05-09 11:05:26 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 15 Uri Lublin 2016-06-28 11:36:18 UTC
Andrei, can you please try to reproduce on 4.0 ?

Comment 16 Andrei Stepanov 2016-06-28 13:27:45 UTC
I can reproduce it with rhevm-spice-client-x64-msi-4.0-2.el7ev.noarch

/usr/share/spice/virt-viewer-x64.msi

installed on Windows 7 64 (with recent updates)

Comment 17 Radek Duda 2016-06-29 10:16:30 UTC
I managed to reproduce this bug on Win 64bit client

Comment 18 Sandro Bonazzola 2017-12-20 13:59:20 UTC
oVirt 4.2.0 has been released on Dec 20th 2017. Please consider re-targeting this bug to next milestone

Comment 19 Martin Tessun 2018-07-02 13:36:28 UTC
As there is no real reproducer and the effects are not very serious, closing this as WONTFIX.