Bug 1650596

Summary: The spice-vdagent is not starting and spice is opening thousands of unix sockets.
Product: Red Hat Enterprise Linux 7 Reporter: Frank DeLorey <fdelorey>
Component: spice-vdagentAssignee: Default Assignee for SPICE Bugs <rh-spice-bugs>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.4CC: cfergeau, dblechte, fdelorey, gveitmic, lsurette, royoung, tburke, tpelka, victortoso
Target Milestone: pre-dev-freeze   
Target Release: 7.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-vdagent-0.14.0-17.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1660108 1687628 (view as bug list) Environment:
Last Closed: 2019-08-06 13:07:26 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:
Bug Depends On:    
Bug Blocks: 1660108, 1687628    
Attachments:
Description Flags
spice-vdagentd failing my lab VM
none
spice-vdagent starting too many sockets my lab VM none

Description Frank DeLorey 2018-11-16 15:28:04 UTC
Description of problem:

Customer reported over 32K of unix sockets spawned by the spice-vdagent. Noticed that the spice daemon was failing to start also.

Version-Release number of selected component (if applicable):

RHV 4.2.7
The guest is running RHEL 7.4
spice-glib-0.33-6.el7.x86_64
spice-gtk3-0.33-6.el7.x86_64
spice-server-0.12.8-2.el7.1.x86_64
spice-vdagent-0.14.0-14.el7.x86_64 

My lab system is running RHEL 7.5 with the latest spice rpms and is also seeing this issue.

How reproducible:

Every time. My lab system is exhibiting the same failures.

Steps to Reproduce:
1. Install a RHEL with spice enabled
2. Login and check the agent and sockets

Actual results:

The spice daemon failed to start and there are about 32K unix sockets belonging to spice-vdagent

Expected results:

Spice daemon should start and there should not be so many sockets.

Additional info:

# netstat -noap | grep spice-vdagent | wc -l
32762

# cat ps| grep spice
root     14801  0.0  0.0  40432   516 ?        Ss   Nov12   0:04 /usr/bin/spice-vdagent
gdm      28950  0.0  0.0  40432   512 ?        Ss   Nov12   0:05 /usr/bin/spice-vdagent


unix  2      [ ]         STREAM                   164308595 28950/spice-vdagent
unix  2      [ ]         STREAM                   164106007 28950/spice-vdagent
unix  2      [ ]         STREAM                   164064092 28950/spice-vdagent
unix  2      [ ]         STREAM                   163985673 28950/spice-vdagent
unix  2      [ ]         STREAM                   163354789 28950/spice-vdagent
unix  2      [ ]         STREAM                   163131966 28950/spice-vdagent
unix  2      [ ]         STREAM                   162613524 28950/spice-vdagent
Lots deleted...

Comment 1 Frank DeLorey 2018-11-16 15:47:23 UTC
Created attachment 1506458 [details]
spice-vdagentd failing my lab VM

Comment 2 Frank DeLorey 2018-11-16 15:48:12 UTC
Created attachment 1506459 [details]
spice-vdagent starting too many sockets my lab VM

Comment 3 Victor Toso 2018-11-16 16:14:24 UTC
Moving to spice-vdagent in RHEL7 and we might need to clone to RHEL8 too.
Patch that fixes the leak of sockets:

https://lists.freedesktop.org/archives/spice-devel/2018-November/046166.html

The main issue is spice-vdagentd failing to start with "systemd: Job spice-vdagentd.socket/start failed with result 'dependency'.

I wonder if this was fixed by bug 1340160, fix would be in RHEL 7.5 at spice-vdagent-0.14.0-15.el7.x86_64.

Frank, is it possible to test?

Comment 5 Victor Toso 2018-11-16 16:15:53 UTC
Ah, sorry Frank, I missed that you already tested latest spice-vdagent from comment #0

Comment 6 Frank DeLorey 2018-11-16 16:20:41 UTC
Yes I tested with spice-vdagent-0.14.0-16.el7.x86_64.

Comment 7 Frediano Ziglio 2018-12-03 15:09:53 UTC
Upstream patch at https://gitlab.freedesktop.org/spice/linux/vd_agent/commit/2d6d0d2acd3248e981361c2f3d8b253da8f04048. This fixes the file descriptor leak.

Comment 15 errata-xmlrpc 2019-08-06 13:07:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2229