XWin 100% CPU usage for Java applications on Vista
Sat Mar 24 11:36:00 GMT 2007
I'm using Windows Vista Business 32 bit, and this happens after
locking and unlocking the Vista computer while the application is
I use Cygwin/X mostly for maintenance/administrative tasks on our
First, since we have many Java virtual machines on our servers, I use
jconsole (a tool that comes with the JDK), to get performance and
status information about a particular JVM.
Second, for our Oracle servers, I use the OUI (Oracle Universal
Installer), and DBUA (Database Upgrade Assistant), to install Oracle
software and apply patches and upgrades.
All this tools are GUIs, based on Java AWT (Abstract Windowing
Toolkit). AWT requires a X Server to run on Linux.
Needless to say, I was very annoyed to see an upgrade to an important
Oracle database fail at 50%, because the X Server was frozen and used
It seems the problem is dependent on the JDK and/or linux
distribution, because I can always reproduce the problem on some
machines, and never on others.
For example I can always reproduce it with jconsole on one machine
with JDK 1.5.0_08-b03 on Ubuntu 2.6.17-10-generic i686, but never on
another machine with JDK 1.5.0_10-b03 on 2.6.13-1.1526_FC4smp x86_64.
I can always reproduce it with the JREs/JDKs packaged with Oracle
10.2.0.3 (1.4.2_08-b03), and DBUA. I tested on 2.6.13-gentoo-r5 and
Ubuntu 22.214.171.124-xen-r2 x86_64
Steps to reproduce:
1. Start the X Server, using the desktop shorcut created by the installer;
2. Start a cygwin command prompt, using the desktop shorcut created
by the installer, and type this:
3. On a linux machine, run this command:
4. Start a Java GUI application, on the linux machine. For example,
use the jconsole command, from the Java JDK.
5. After the GUI is displayed on the Vista machine, lock the
computer, then unlock it. The GUI window will become white and
unresponsive, and one CPU core will be used up to 100%.
The workaround is not to lock the computer, and disable any screen
savers that could lock the computer while the X Server is running.
Actually, I try not to use any other applications on that machine,
while the X application is running.
I can also reproduce the "100% CPU on exit" problem every time.
Also, xterm refuses to run on Vista, with a "fork() failed"
message. I solved the fork issue with rebaseall -b 0x65000000, as
suggested on a different thread, but the CPU problems persist.
Below you can find two stack trace samples, taken with Process
Explorer, while the X Server was frozen.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin-xfree