XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Vladimir Nicolici

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 0x6500, 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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Holger Krull
   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%.

I had similar problems and found that starting the X Server with
 -engine 1 will help. Give it a try.



--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Vladimir Nicolici

On 3/24/07, Holger Krull [EMAIL PROTECTED] wrote:

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

I had similar problems and found that starting the X Server with
 -engine 1 will help. Give it a try.



I tested, unfortunately, it doesn't work. And I just discovered that
opening and closing the About window from the tray icon causes the
same problem.

A concern is that I performed the tests using Remote Desktop. And I
just found another cygwin-xfree thread named XWin 100% CPU usage
(Remote Desktop) (it was on Windows 2003 Server). So Remote Desktop
might also be a factor.

Next week I will try again using a local session, but I already had
some 100% CPU issues last week, without using Remote Desktop, so
most likely Remote Desktop is not the problem.

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Vladimir Nicolici

I had similar problems and found that starting the X Server with
 -engine 1 will help. Give it a try.


I was experimenting with other solutions, and I found Xming, another
open source project. Xming doesn't seem to have any of the problems of
Cygwin/X.

What's funny is that Xming has command line parameters very similar to
the cygwin version, including the -engine parameter, with the same 3
options. GDI, DD, DD no lock.

Even the tray icon context menu and the about window are the same.

I wonder why RedHat doesn't include this X server instead of Cygwin/X
in the cygwin distribution, especially since, according to the
Cygwin/X home page, the project lost its maintainer 2 years ago.

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Dr. Franz Fehringer

Hello,

This 100% issue is a known problem with XWin on 2003 and Vista; it  gets 
continually posted on this list.
And no, -engine 1 is not the cure, i think the problem has to be analysed 
and remedied by the cygwin/cygwin-xfree developers.
Xming (same code base?!) btw does not suffer from this problem (at least not 
on 2003R2; haven`t tried with Vista).


Cheers

Franz


- Original Message - 
From: Vladimir Nicolici [EMAIL PROTECTED]

To: cygwin-xfree@cygwin.com
Sent: Saturday, March 24, 2007 2:42 PM
Subject: Re: XWin 100% CPU usage for Java applications on Vista



On 3/24/07, Holger Krull [EMAIL PROTECTED] wrote:

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

I had similar problems and found that starting the X Server with
 -engine 1 will help. Give it a try.



I tested, unfortunately, it doesn't work. And I just discovered that
opening and closing the About window from the tray icon causes the
same problem.

A concern is that I performed the tests using Remote Desktop. And I
just found another cygwin-xfree thread named XWin 100% CPU usage
(Remote Desktop) (it was on Windows 2003 Server). So Remote Desktop
might also be a factor.

Next week I will try again using a local session, but I already had
some 100% CPU issues last week, without using Remote Desktop, so
most likely Remote Desktop is not the problem.

--
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/




--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Dr. Franz Fehringer

Hello,

I can confirm the statement on Xming (i use 2003R2).
There is a slight drawback pertaining to the fact, that the Xming 
distribution contains less fonts than cygwin-xfree.

But perhaps the cygwin-xfree fonts simply can be reused for Xming?

Cheers

Franz


- Original Message - 
From: Vladimir Nicolici [EMAIL PROTECTED]

To: cygwin-xfree@cygwin.com
Sent: Saturday, March 24, 2007 3:14 PM
Subject: Re: XWin 100% CPU usage for Java applications on Vista



I had similar problems and found that starting the X Server with
 -engine 1 will help. Give it a try.


I was experimenting with other solutions, and I found Xming, another
open source project. Xming doesn't seem to have any of the problems of
Cygwin/X.

What's funny is that Xming has command line parameters very similar to
the cygwin version, including the -engine parameter, with the same 3
options. GDI, DD, DD no lock.

Even the tray icon context menu and the about window are the same.

I wonder why RedHat doesn't include this X server instead of Cygwin/X
in the cygwin distribution, especially since, according to the
Cygwin/X home page, the project lost its maintainer 2 years ago.

--
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/




--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Holger Krull
Vladimir Nicolici schrieb:
 On 3/24/07, Holger Krull [EMAIL PROTECTED] wrote:
 I had similar problems and found that starting the X Server with
  -engine 1 will help. Give it a try.

 
 I tested, unfortunately, it doesn't work. And I just discovered that
 opening and closing the About window from the tray icon causes the
 same problem.
 
 A concern is that I performed the tests using Remote Desktop. And I

Maybe a ssh tunnel instead of remote desktop will change the situation.


--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Christopher Faylor
On Sat, Mar 24, 2007 at 04:14:51PM +0200, Vladimir Nicolici wrote:
I had similar problems and found that starting the X Server with
 -engine 1 will help. Give it a try.

I was experimenting with other solutions, and I found Xming, another
open source project. Xming doesn't seem to have any of the problems of
Cygwin/X.

What's funny is that Xming has command line parameters very similar to
the cygwin version, including the -engine parameter, with the same 3
options. GDI, DD, DD no lock.

Even the tray icon context menu and the about window are the same.

I wonder why RedHat doesn't include this X server instead of Cygwin/X
in the cygwin distribution, especially since, according to the
Cygwin/X home page, the project lost its maintainer 2 years ago.

Red Hat?  This is a community project.  Don't know where you got the
idea that Cygwin/X was somehow supported by Red Hat.

We have been missing a Cygwin/X maintainer for quite some time now.  So,
any problems which require code changes are not going to happen.  Sorry.

cgf

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Vladimir Nicolici

 A concern is that I performed the tests using Remote Desktop. And I

Maybe a ssh tunnel instead of remote desktop will change the situation.


I need to run the X Server on my Windows Vista computer at work. X
clients will connect to it from the Linux servers at work. In the
weekends, I need to access my Vista computer at work from the XP (soon
to be Vista) computer at home, over my existing encrypted VPN
connection, authenticated by RSA rolling codes tokens. Why would I
need ssh?

If you're asking why I don't run the X server on my home computer, and
have the X clients from the servers at work connect directly to it,
the problem is that the connection between home and work is wireless
dial-up over CDMA EVDO, not very stable, and if I loose the connection
the X client will lose the connection with the X server, and crash.
With remote desktop, if I loose the connection with my work computer,
nothing bad happens, I just reconnect after reestablishing the
connection. And remote desktop uses far less bandwidth than X
protocol.

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Vladimir Nicolici

Red Hat?  This is a community project.  Don't know where you got the
idea that Cygwin/X was somehow supported by Red Hat.



From www.cygwin.com:


For Cygwin licensing or commercial support, please visit the Red Hat
Cygwin Product site
...
Cygwin DLL and utilities are Copyright (c) 2000, 2001,2002, 2003,
2004, 2005, 2006, 2007 Red Hat, Inc


From whois:


Domain Name: CYGWIN.COM
Registrant:
  Red Hat, Inc.
  1801 Varsity Drive
  Raleigh, NC 27606
  US

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Christopher Faylor
On Sat, Mar 24, 2007 at 08:56:54PM +0200, Vladimir Nicolici wrote:
Red Hat?  This is a community project.  Don't know where you got the
idea that Cygwin/X was somehow supported by Red Hat.

From www.cygwin.com:

For Cygwin licensing or commercial support, please visit the Red Hat
Cygwin Product site
...
Cygwin DLL and utilities are Copyright (c) 2000, 2001,2002, 2003,
2004, 2005, 2006, 2007 Red Hat, Inc

From whois:

Domain Name: CYGWIN.COM
Registrant:
  Red Hat, Inc.
  1801 Varsity Drive
  Raleigh, NC 27606
  US

Circumstantial evidence aside, you don't see any official communications
from Red Hat in this mailing list and the words Red Hat do not show up
on the Cygwin/X project page except to reference the community-run
sources.redhat.com, which hosts x.cygwin.com.

Dig a little deeper in the web site and you'll see who supports Cygwin.

In any event, now you know.  There is not a staff of Red Hat engineers
backing this project.  It's an open source project similar to most other
open source projects.

cgf

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Holger Krull
Vladimir Nicolici schrieb:

 With remote desktop, if I loose the connection with my work computer,
 nothing bad happens, I just reconnect after reestablishing the
 connection. And remote desktop uses far less bandwidth than X
 protocol.

freenx can provide the same for linux.

--
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/



Re: XWin 100% CPU usage for Java applications on Vista

2007-03-24 Thread Larry Hall (Cygwin X)

Vladimir Nicolici wrote:

I wonder why RedHat doesn't include this X server instead of Cygwin/X
in the cygwin distribution, especially since, according to the
Cygwin/X home page, the project lost its maintainer 2 years ago.



Chris has already sufficiently responded to correct your misconception about
the relationship between Red Hat and Cygwin.  I'll only say that your
musings on why the Cygwin distribution doesn't include Xming starts with
one major roadblock - we'd need a maintainer to contribute and maintain
the package.  I can't say whether Xming would make it through the ITP
phase but if it won't have a maintainer, it would suffer the same fate as
Cygwin/X right now so there's little clear value to going that route.
Packages don't get into the distribution without someone willing to
maintain it.  Now, if you're suggesting that you would be willing to
become a maintainer for an Xming package in Cygwin, then consult
http://cygwin.com/contrib.html and send an ITP notice when you have
a package available.  You'd need to take into account an upgrade path
from the current Cygwin/X package if your intent would be to replace the
existing offering.  Then again, maybe this turns out to be the same
amount of work overall as maintaining the existing package so perhaps
it would be better to just take over maintainer-ship of the current
package.  In any case, if you've gathered from all this that the important
part of the equation here is the maintainer, I think you got the point. :-)


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

--
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/