Community
Participate
Working Groups
On HP exiting Eclipse session during which help was launched, never returns to the command prompt, UI shuts down, but the VM does not exit. When browser adapter is removed, such that launching help does not open a browser the problem still exist.
The problem is probably Tomcat no closing completely. I tried to debug but the Eclipse debugger does not work on HP. I get the following error while launching second Eclipse with debugger: An exception occured while launching Reason jdwp gethostbyname() for [localhost] set error to [1] Socket transport failed to init. Transport dt_socket failed to initialize, rc = -1. It points into some wider problem on HP OS or on the machine. Both debugger and tomcat server need network and socket for thier operation.
I got our HP machine fixed to resolve the local host, so I could debug the problem. What is happening is that the main thread is blocked then doing java.net.PlainSockeImpl.socketClose() native method call. See the screen shot of the stack.
Created attachment 1280 [details] debugger view
Some VMs using native threads used to have a bug that thread doing ServerSocket.close() if another thread is doing ServerSocket.accept(). The HP VM has this problem. I used version 1.3.1.02. This is the case here. To confirm I hit refresh in Netscape after closing the Workbench. This allowed the accept() method to proceed, and in turn unblocked the close(), and Eclipse exited. Reading relase notes of vm on HP at http://www.hp.com/products1/unix/java/java2/sdkrte1_3/infolibrary/sdk_rnotes_1- 3-1-02.html#Closing%20a%20Socket%20When%20Accept%20or%20Read%20is%20Pending reveals that there is a VM option that will cause the close not to block. The option is -XdoCloseWithReadPending I tested, and it allows Eclipse to exit after launching help. So the fix is to pass this option to VM when launching eclipse. For example, I used the following to start Eclipse: ./eclipse -vm /opt/java1.3/jre/bin/java -vmargs XdoCloseWithReadPending
Sorry, the launching line is (inlcludes "-" before the switch): ./eclipse -vm /opt/java1.3/jre/bin/java -vmargs -XdoCloseWithReadPending
We've been burned lately by adding VM arguments for particular VMs to eclipse.exe (the "J9 vmargs changing" bug). Every time we do this, it potentially forces a dependency between us and a particular VM version, since the next version of the VM may have different arguments. If we really do decide to make eclipse specify the argument, then I need to know about it immediately. ugh!
A decision was made to write readme about the need for the extra command line argument on HP-UX. Anyone building a product on HP-UX can add the extra arg into their own launcher, and that way we do not build dependencies on any one particular VM into the generic launcher. Can you add paragraph about need to pass -XdoCloseWithReadPending VM option on HP-UX. Thanks.
I will physically add the paragraph but I need somebody to write the words please.
Dean, here is the paragraph with the title: Eclipse process does not exit when running on HP-UX. On HP-UX, the JVM process that runs the Eclipse Workbench does not terminate upon closing the workbench. This can be fixed by passing the - XdoCloseWithReadPending VM option to the Eclipse launcher. For example, you could launch eclipse as follows: "eclipse -vmargs -XdoCloseWithReadPending".
This has been added to the clickthrough for HPUX. It should appear in the next build.
Verified as included in 20020627 (GM6) build.
Created attachment 4301 [details] patch.txt It is possible to unblock closing Tomcat server when Eclipse is run without -XdoCloseWithReadPending option by creating a connection to the server after a ServerSocket.close() has been called. It unblocks ServerSocket.accept(), eliminates deadlock between ServerSocket.accept() and ServerSocket.close(), thus the main thread is allowed to continue and exit Eclipse. The attached patch creates a thread before trying to shutdown Tomcat, the thread connects to Tomcat periodicaly until it closes and the main thread can continue. The patch also fixes Eclipse not exiting on windows when users have SINE version 3 installed (that modifies TCP/IP behavior on Windows). I think it is worth incorporating the patch into Tomcat code after 2.1 release. If other teams have not started depending on the -XdoCloseWithReadPending option then it would be possible to not require this option when Eclipse is launched on HPUX. If other teams do require the option, may be they could incorporate a fix similar to fix to org.eclipse.tomcat plug-in in this patch.
Opened bug 68248 to keep track that the problem needs a fix in the code, (not jut the readme).