This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XWin 100% CPU usage for Java applications on Vista


I'm using Windows Vista Business 32 bit, and this happens after
locking and unlocking the Vista computer while the application is
running.

I use Cygwin/X mostly for maintenance/administrative tasks on our
Linux servers.

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
100% CPU.

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 2.6.16.28-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:

  export DISPLAY=localhost:0.0
  xhost +
  exit

3. On a linux machine, run this command:

export DISPLAY=__VISTA_HOST__:0.0

  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.

ntdll.dll!RtlGetAce+0x1e6
ntdll.dll!RtlGetAce+0x190
ntdll.dll!RtlGetAce+0x125
ntdll.dll!KiUserExceptionDispatcher+0xf
USER32.dll!GetMessageW+0x19f
USER32.dll!GetMessageW+0x261
USER32.dll!OffsetRect+0x4d
ntdll.dll!KiUserCallbackDispatcher+0x2e
XWin.exe+0x4c2f6
USER32.dll!SendMessageW+0xa7
USER32.dll!EnumThreadWindows+0x18
XWin.exe+0x4c957
XWin.exe+0x2e4d68
XWin.exe+0x201fe
XWin.exe+0x30c2b
XWin.exe+0xece7
XWin.exe+0x192a
cygwin1.dll!dll_crt0__FP11per_process+0xd88
cygwin1.dll!toascii+0x2396

ntdll.dll!RtlAcquireSRWLockShared+0x2c
ntdll.dll!RtlGetAce+0x206
ntdll.dll!RtlGetAce+0x190
ntdll.dll!RtlGetAce+0x125
ntdll.dll!KiUserExceptionDispatcher+0xf
USER32.dll!GetMessageW+0x19f
USER32.dll!GetMessageW+0x261
USER32.dll!OffsetRect+0x4d
ntdll.dll!KiUserCallbackDispatcher+0x2e
USER32.dll!DispatchMessageA+0xf
XWin.exe+0x47930
XWin.exe+0x20333
XWin.exe+0x30cb8
XWin.exe+0xece7
XWin.exe+0x192a
cygwin1.dll!dll_crt0__FP11per_process+0xd88
cygwin1.dll!toascii+0x2396

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]