I am running glassfish v3.1.1 build 12 using java build 1.6.0_29-b11 on linux debian squeez (6.0.4). I am running a webapp that calls an external soap web service.
From time to time jvm crashes. I can reproduce this failure by doing 20 threads simultaneously.
The hs_err_pid emergency dump file indicates that libdbus is a problematic library. Here is an interesting part of the crash dump.
Stack: [0x00007f3fef0ff000,0x00007f3fef200000], sp=0x00007f3fef1f7058, free space=992k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libdbus-1.so.3+0x28de0] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j sun.net.spi.DefaultProxySelector.getSystemProxy(Ljava/lang/String;Ljava/lang/String;)Ljava/net/Proxy;+0 j sun.net.spi.DefaultProxySelector.access$100(Lsun/net/spi/DefaultProxySelector;Ljava/lang/String;Ljava/lang/String;)Ljava/net/Proxy;+3 j sun.net.spi.DefaultProxySelector$2.run()Ljava/lang/Object;+151 v ~StubRoutines::call_stub J java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object; j sun.net.spi.DefaultProxySelector.select(Ljava/net/URI;)Ljava/util/List;+273 j sun.net.www.protocol.http.HttpURLConnection.plainConnect()V+187 j sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect()V+9 j sun.net.www.protocol.http.HttpURLConnection.getOutputStream()Ljava/io/OutputStream;+134 j sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream()Ljava/io/OutputStream;+4 j com.sun.xml.ws.mex.client.HttpPoster.post(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/io/InputStream;+60
as you can see how the actual HttpPoster.post is called, after which the crash occurs. Sun.net.spi.DefaultProxySelector is part of rt.jar, so this is part of the default jvm installation.
I tried jdk7, but it crashed here too.
Then I installed openjdk, which also crashed.
Then I installed dbus-java, which is a java implementation of dbus (using apt-get). Usually this library is used only when certain jar files are placed explicitly in the path. But after installing this library, crashes no longer occur. So it seems openjdk is using this library (assumption)
I talked with the dbus-java maintainer, and he is also not aware that sun jdk or openjdk uses dbus. Therefore, we are both very confused.
Crash no longer occurs, but now the glass fish admin interface stops working. Googling shows that this is a known issue, and the solution is to start using sun jdk. Aaargh.
Have you seen this problem before? Is there a solution?
UPDATE:
The DefaultProxySelector.getSystemProperty method is the last method that is called before the native method is called. Looking at the DefaultProxySelector code, I found that this method should only be called if java.net.useSystemProxies = true. But this property is not set (the no -D parameter in jvm settings), and this is not true in the $ JAVA_HOME / jre / lib / net.properties file. But after debugging, it shows that this logical value of IS is true.
So now the big question is: why is this logical value true?
UPDATE 2:
The problem was caused by updatetool configuration. For more information, see the GLASSFISH-18360 error report .