Bug 1297864 - remote-viewer process remains active after closing rv window. coolkey case.
remote-viewer process remains active after closing rv window. coolkey case.
Status: NEW
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: mingw-virt-viewer (Show other bugs)
3.6.2
Unspecified Linux
unspecified Severity medium
: ovirt-4.2.0
: ---
Assigned To: Default Assignee for SPICE Bugs
SPICE QE bug list
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-12 11:32 EST by Andrei Stepanov
Modified: 2017-09-28 05:05 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Spice
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
printscreen (149.40 KB, image/png)
2016-01-12 11:32 EST, Andrei Stepanov
no flags Details
remote-viewer log (66.60 KB, text/plain)
2016-01-12 11:38 EST, Andrei Stepanov
no flags Details

  None (edit)
Description Andrei Stepanov 2016-01-12 11:32:09 EST
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 11:38 EST
Created attachment 1114025 [details]
remote-viewer log
Comment 2 Marina 2016-01-19 13:19:31 EST
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 04:55:03 EST
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 11:54:10 EST
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 12:37:46 EST
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 13:46:56 EST
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 12:23:12 EST
(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 12:28:52 EST
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 (Dary) 2016-05-09 07:05:26 EDT
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.
Comment 15 Uri Lublin 2016-06-28 07:36:18 EDT
Andrei, can you please try to reproduce on 4.0 ?
Comment 16 Andrei Stepanov 2016-06-28 09:27:45 EDT
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 06:16:30 EDT
I managed to reproduce this bug on Win 64bit client

Note You need to log in before you can comment on or make changes to this bug.