-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.2_08, 5.0u5
-
x86
-
windows_xp
A set of 3 IIOP ReaderThreads will be created for every new class loader in the test program that loads classes for RMI communication. These threads won't be disposed once the class loader is GC'd. Eventually (after 360 threads have been created), a request to create a new IIOP thread will fail.
A detailed description is provided in the attached document. There is also a test program to reproduce the problem.
Steps to run the test :
(Extensions have been changed to avoid problems with e-mail filters in Zip file) :
Please refer the Outlook.bmp attachment also.
1. Run startORB.bat
2. Run runServer.bat
3. Start the client application (startup command line available in runClient.bat)
The application consists of a window that allows you to create three namespaces (3 different class loaders), named A, B and C. A new class loader is created when you login (see com.nortel.cdma.guicmnspc.CAD and com.nortel.cdma.guicmnspc.BackendInventory).
B and C classes do nothing but print a String. A is more evolved, in that it does an RMI invocation and prints the response. This program was created to demonstrate another problem: ObjectStreamClass would keep reference to loaded Serializable classes, preventing the class loader from being garbage collected. Since B and C do not use RMI, once you logout, their class loaders are GC'd. However, after you logout A, the class loader would not be GC'd. This problem was mostly fixed in call id 829746 (contact is BHANUTella [###@###.###).
The attached document contains an analysis of the original problem and the fix provided. During such investigation, a new problem was spotted (see pages 7 to 9 of the document): repeating the procedure Login à Start à Logout (to namespace A)120 times will result in the accumulation of 360 instances of the class com.sun.corba.se.internal.iiop.IIOPConnection and 360 associated Reader threads:
"JavaIDL Reader for localhost:1050" daemon prio=7 tid=0x050e3990 nid=0x11d4 runnable [2076f000..2076fd8c]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.corba.se.internal.iiop.messages.MessageBase.readFully(MessageBase.java:518)
at com.sun.corba.se.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:55)
at com.sun.corba.se.internal.iiop.MessageMediator.processRequest(MessageMediator.java:107)
at com.sun.corba.se.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:336)
at com.sun.corba.se.internal.iiop.ReaderThread.run(ReaderThread.java:60)
"JavaIDL Reader for 200.213.106.133:3815" daemon prio=7 tid=0x00e66100 nid=0x1db8 runnable [4abf000..4abfd8c]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.corba.se.internal.iiop.messages.MessageBase.readFully(MessageBase.java:518)
at com.sun.corba.se.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:55)
at com.sun.corba.se.internal.iiop.MessageMediator.processRequest(MessageMediator.java:107)
at com.sun.corba.se.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:336)
at com.sun.corba.se.internal.iiop.ReaderThread.run(ReaderThread.java:60)
"JavaIDL Reader for 200.213.106.133:1049" daemon prio=7 tid=0x051434d0 nid=0x1894 runnable [2072f000..2072fd8c]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.corba.se.internal.iiop.messages.MessageBase.readFully(MessageBase.java:518)
at com.sun.corba.se.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:55)
at com.sun.corba.se.internal.iiop.MessageMediator.processRequest(MessageMediator.java:107)
at com.sun.corba.se.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:336)
at com.sun.corba.se.internal.iiop.ReaderThread.run(ReaderThread.java:60)
The next attempt to invoke an RMI method from the next class loader will fail. The following exception will be reported in the orbd process:
java.lang.Exception
at com.sun.corba.se.internal.iiop.IIOPConnection.cleanUp(IIOPConnection.java:903)
at com.sun.corba.se.internal.iiop.ConnectionTable.cleanUp(ConnectionTable.java:303)
at com.sun.corba.se.internal.iiop.ConnectionTable.checkConnectionTable(ConnectionTable.java:320)
at com.sun.corba.se.internal.iiop.ListenerThread.run(ListenerThread.java:75)
And the application thread will be hung forever waiting for an IIOPConnection (I would guess there is some kind of connections pool that has run out of available connections for the new class loader). After this happens, one has to restart the ORB to allow a new app to connect.
With Java 1.5.0_05 also, still the problem is seen (always after the 120 attempt).
This is the exception reported in the ORBD console:
D:\Java\jdk1.5.0_05\jre\bin>orbd -ORBInitialPort 1050
Nov 4, 2005 10:16:46 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl close
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.close(SocketOrChannelConnectionImpl.java:777)
at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.reclaim(CorbaConnectionCacheBase.java:166)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.accept(SocketOrChannelAcceptorImpl.java:259)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl$1.run(SocketOrChannelAcceptorImpl.java:429)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.doWork(SocketOrChannelAcceptorImpl.java:427)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl close
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.close(SocketOrChannelConnectionImpl.java:777)
at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.reclaim(CorbaConnectionCacheBase.java:166)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.accept(SocketOrChannelAcceptorImpl.java:259)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl$1.run(SocketOrChannelAcceptorImpl.java:429)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.doWork(SocketOrChannelAcceptorImpl.java:427)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
And this was reported on the client application console:
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl handleInput
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:826)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl handleInput
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:826)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl handleInput
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:826)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
A detailed description is provided in the attached document. There is also a test program to reproduce the problem.
Steps to run the test :
(Extensions have been changed to avoid problems with e-mail filters in Zip file) :
Please refer the Outlook.bmp attachment also.
1. Run startORB.bat
2. Run runServer.bat
3. Start the client application (startup command line available in runClient.bat)
The application consists of a window that allows you to create three namespaces (3 different class loaders), named A, B and C. A new class loader is created when you login (see com.nortel.cdma.guicmnspc.CAD and com.nortel.cdma.guicmnspc.BackendInventory).
B and C classes do nothing but print a String. A is more evolved, in that it does an RMI invocation and prints the response. This program was created to demonstrate another problem: ObjectStreamClass would keep reference to loaded Serializable classes, preventing the class loader from being garbage collected. Since B and C do not use RMI, once you logout, their class loaders are GC'd. However, after you logout A, the class loader would not be GC'd. This problem was mostly fixed in call id 829746 (contact is BHANUTella [###@###.###).
The attached document contains an analysis of the original problem and the fix provided. During such investigation, a new problem was spotted (see pages 7 to 9 of the document): repeating the procedure Login à Start à Logout (to namespace A)120 times will result in the accumulation of 360 instances of the class com.sun.corba.se.internal.iiop.IIOPConnection and 360 associated Reader threads:
"JavaIDL Reader for localhost:1050" daemon prio=7 tid=0x050e3990 nid=0x11d4 runnable [2076f000..2076fd8c]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.corba.se.internal.iiop.messages.MessageBase.readFully(MessageBase.java:518)
at com.sun.corba.se.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:55)
at com.sun.corba.se.internal.iiop.MessageMediator.processRequest(MessageMediator.java:107)
at com.sun.corba.se.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:336)
at com.sun.corba.se.internal.iiop.ReaderThread.run(ReaderThread.java:60)
"JavaIDL Reader for 200.213.106.133:3815" daemon prio=7 tid=0x00e66100 nid=0x1db8 runnable [4abf000..4abfd8c]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.corba.se.internal.iiop.messages.MessageBase.readFully(MessageBase.java:518)
at com.sun.corba.se.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:55)
at com.sun.corba.se.internal.iiop.MessageMediator.processRequest(MessageMediator.java:107)
at com.sun.corba.se.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:336)
at com.sun.corba.se.internal.iiop.ReaderThread.run(ReaderThread.java:60)
"JavaIDL Reader for 200.213.106.133:1049" daemon prio=7 tid=0x051434d0 nid=0x1894 runnable [2072f000..2072fd8c]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.corba.se.internal.iiop.messages.MessageBase.readFully(MessageBase.java:518)
at com.sun.corba.se.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:55)
at com.sun.corba.se.internal.iiop.MessageMediator.processRequest(MessageMediator.java:107)
at com.sun.corba.se.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:336)
at com.sun.corba.se.internal.iiop.ReaderThread.run(ReaderThread.java:60)
The next attempt to invoke an RMI method from the next class loader will fail. The following exception will be reported in the orbd process:
java.lang.Exception
at com.sun.corba.se.internal.iiop.IIOPConnection.cleanUp(IIOPConnection.java:903)
at com.sun.corba.se.internal.iiop.ConnectionTable.cleanUp(ConnectionTable.java:303)
at com.sun.corba.se.internal.iiop.ConnectionTable.checkConnectionTable(ConnectionTable.java:320)
at com.sun.corba.se.internal.iiop.ListenerThread.run(ListenerThread.java:75)
And the application thread will be hung forever waiting for an IIOPConnection (I would guess there is some kind of connections pool that has run out of available connections for the new class loader). After this happens, one has to restart the ORB to allow a new app to connect.
With Java 1.5.0_05 also, still the problem is seen (always after the 120 attempt).
This is the exception reported in the ORBD console:
D:\Java\jdk1.5.0_05\jre\bin>orbd -ORBInitialPort 1050
Nov 4, 2005 10:16:46 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl close
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.close(SocketOrChannelConnectionImpl.java:777)
at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.reclaim(CorbaConnectionCacheBase.java:166)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.accept(SocketOrChannelAcceptorImpl.java:259)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl$1.run(SocketOrChannelAcceptorImpl.java:429)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.doWork(SocketOrChannelAcceptorImpl.java:427)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl close
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.close(SocketOrChannelConnectionImpl.java:777)
at com.sun.corba.se.impl.transport.CorbaConnectionCacheBase.reclaim(CorbaConnectionCacheBase.java:166)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.accept(SocketOrChannelAcceptorImpl.java:259)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl$1.run(SocketOrChannelAcceptorImpl.java:429)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl.doWork(SocketOrChannelAcceptorImpl.java:427)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
And this was reported on the client application console:
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl handleInput
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:826)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl handleInput
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:826)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
Nov 4, 2005 10:16:47 AM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl handleInput
WARNING: "IOP00410209: (COMM_FAILURE) Connection rebind"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2400)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectionRebind(ORBUtilSystemException.java:2422)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:826)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1187)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:417)
- duplicates
-
JDK-4925258 CORBA provider Context doen't release resources.
- Resolved