Bug 97561 - xmodmap freezes system with high CPU load for more than one minute
Summary: xmodmap freezes system with high CPU load for more than one minute
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Keyboard (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-01 15:47 UTC by nachoparker
Modified: 2018-08-10 20:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
my modmap (14.14 KB, text/plain)
2016-09-01 15:47 UTC, nachoparker
no flags Details

Description nachoparker 2016-09-01 15:47:41 UTC
Created attachment 126163 [details]
my modmap

Issuing 'xmodmap mymodmap' causes the x system to freeze for minutes on a high CPU load, or rather, become unresponsive to keyboard or mouse input.

This issue has been reported elsewhere for years, for instance in 

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/998310
https://bugs.launchpad.net/ubuntu/+source/openbox/+bug/1391679
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550533
http://www.archivum.info/ubuntu-bugs@lists.ubuntu.com/2014-11/10065/(Bug-1391679)-Re-xmodmap-freezes-openbox-in-lubuntu-14.10.html

I use openbox Openbox 3.6.1 in Arch Linux. Right now I use xserver 1.18.4-1, but this has been happening to me for years ( and the people on the links above ).

Steps to reproduce

- xmodmap mymodmap

Find mymodmap attached to this bug report.

Some observations:

- The bigger mymodmap file is ( the more lines ) the longer it takes for the system to come back to responsiveness.

- I anaylised the Xorg process using perf, and it seems to me that the culprits are ResourceClientBits, GrabMatchesSecond,DeletePassiveGrabFromList and so on, as you can see on this output:

14,63%  Xorg     Xorg                   [.] ResourceClientBits        
11,83%  Xorg     Xorg                   [.] GrabMatchesSecond         
5,17%   Xorg     Xorg                   [.] DeletePassiveGrabFromList 
5,08%   Xorg     Xorg                   [.] AddPassiveGrabToList      
2,44%   Xorg     Xorg                   [.] 0x000000000004fb70       
1,80%   Xorg     [kernel.vmlinux]       [k] do_select               
1,49%   Xorg     [kernel.vmlinux]       [k] unix_poll              
1,33%   Xorg     Xorg                   [.] 0x000000000004fb85    
1,31%   Xorg     Xorg                   [.] 0x000000000004fbd1   
1,21%   Xorg     Xorg                   [.] 0x000000000004fbde  
1,14%   Xorg     Xorg                   [.] 0x000000000004fbc0

- My system tops at around 23% CPU on all 6 CPUs while irresponsive.
Comment 1 GitLab Migration User 2018-08-10 20:55:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/issues/22.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.