Bug 1741550

Summary: tigervnc server fails to remove lock and unix domain socket files in /tmp if timers are used as they call exit(0) rhather than the destructor
Product: Red Hat Enterprise Linux 7 Reporter: amit yadav <ayadav>
Component: tigervncAssignee: Jan Grulich <jgrulich>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.7CC: jgrulich, mboisver, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-16 08:42:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description amit yadav 2019-08-15 12:27:15 UTC
Description of problem:
If Xvnc is launched with timers, it does not remove /tmp/.X<display>-lock file nor the unix domain socket in /tmp/.X11-unix/X<display>.

Version-Release number of selected component (if applicable):
tigervnc-server-minimal-1.8.0-17.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install the latest tigervnc server on RHEL7 (currently tigervnc-server-minimal-1.8.0-17.el7.x86_64)
2. Choose an unused X display number (15 for instance)
3. Make sure there is neither a /tmp/.X15-lock lock file nor /tmp/.X11-unix/X15 unix domain socket.
4. Launch the Xvnc with timers (60 seconds for maximum disconnection time, 90 seconds for maximum idle time):  

   $ Xvnc :15 -bs -nolisten tcp -verbose -localhost -MaxDisconnectionTime=60 -MaxIdleTime=90

5. Wait 60 second so that the Idle timer will be executed
6. Check whether /tmp/.X15-lock and /tmp/.X11-unix/X15 are still there.

Actual results:
There are leftover lock and unix domain socket files:

# ls -l /tmp/.X15-lock /tmp/.X11-unix/X15
srwxrwxrwx. 1 root root  0 Aug 15 09:17 /tmp/.X11-unix/X15
-r--r--r--. 1 root root 11 Aug 15 09:17 /tmp/.X15-lock

Expected results:
No /tmp/.X11-unix/X15 and /tmp/.X15-lock files.

Additional info:
It seems this has been fixed upstream in : https://github.com/TigerVNC/tigervnc/issues/727
I am able to reproduce the issue with tigervnc-server-minimal-1.9.0-3.fc29.x86_64 as well.

Comment 4 RHEL Program Management 2019-08-16 08:42:34 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.