Bug 1833186

Summary: gvim consums 100% cpu under certain condition
Product: Red Hat Enterprise Linux 7 Reporter: Seunghwan Jung <jseunghw>
Component: vimAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Patrik Moško <pmosko>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.7CC: ashankar, codonell, dj, fkrska, fweimer, jaeshin, mnewsome, pfrankli, pmosko, psklenar, rstrode, sbarcomb, zdohnal
Target Milestone: rcKeywords: OtherQA, Patch, TestCaseNotNeeded, Triaged, ZStream
Target Release: ---Flags: thozza: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vim-7.4.629-8.el7_9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 11:09:37 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:
Bug Depends On:    
Bug Blocks: 1780662    

Description Seunghwan Jung 2020-05-08 01:55:09 UTC
Description of problem:

When 'Exceed on Demand' application is used to connect RHEL7 server and run gvim, gvim processes were monitored to be using CPU up to 100%.

I was able to reproduce that phenomenon which is described below. 



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

libX11-1.6.7-2.el7.x86_64
libX11-common-1.6.7-2.el7.noarch
vim-X11-7.4.629-6.el7.x86_64                                                                                              
vim-common-7.4.629-6.el7.x86_64                             
vim-enhanced-7.4.629-6.el7.x86_64                          


How reproducible:

always under certain condition



Steps to Reproduce:

1. setup XDMCP server as described at https://access.redhat.com/solutions/2736

2. run gvim from a remote client 
 
 # ssh -X xdemcp_server -l yourid gvim 

3. check file descriptor information of the running gvim process and take a note on the fd of anon_inode:[eventfd]

 # ls -al /proc/`pidof gvim`/fd

 dr-x------. 2 hwanii hwanii  0  5ì  4 16:03 .
 dr-xr-xr-x. 9 hwanii hwanii  0  5ì  4 16:03 ..
 lrwx------. 1 hwanii hwanii 64  5ì  4 16:03 0 -> /dev/pts/1
 lrwx------. 1 hwanii hwanii 64  5ì  4 16:03 1 -> /dev/pts/1
 lrwx------. 1 hwanii hwanii 64  5ì  4 16:03 2 -> /dev/pts/1
 lrwx------. 1 hwanii hwanii 64  5ì  4 16:03 4 -> /home/hwanii/.test.swp
 lrwx------. 1 hwanii hwanii 64  5ì  4 16:03 5 -> socket:[42592]
 lrwx------. 1 hwanii hwanii 64  5ì  4 16:03 6 -> anon_inode:[eventfd]        <==========


4. closed the anon_inode which was fd 6.

 # gdb  -batch -p $(pidof gvim) -ex "call close(6)" -ex cont -ex quit


Actual results:

  the gvim process starts using 100% CPU. 


Expected results:

  gvim process should not use high CPU utilization.


Additional info:

I am not sure if the condition will never be met when users only run software shipped by Red Hat as there was XDMCP of lightdm running in the customer environment.

Comment 8 Seunghwan Jung 2020-06-07 23:09:08 UTC
Is there any update on this please?

Comment 9 Seunghwan Jung 2020-06-24 00:06:19 UTC
Hi,

The customer (Hyundai Autron Co., Ltd.) mentioned that more companies are upgrading their OS from RHEL5 or 6 to RHEL7 to run applications for semi-conduct design in semi-conduct industry, hoping this bug to be addressed.

Comment 52 Seunghwan Jung 2020-07-24 04:56:47 UTC
Created attachment 1702297 [details]
Core from the customer

Core from the customer

Comment 114 errata-xmlrpc 2020-12-15 11:09:37 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 (vim bug fix and enhancement update), 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/RHBA-2020:5432