Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If "Request Meaaage" is more than the number of threads in "thread-pool-1",all pooled threads become time-outs. #17

Open
glassfishrobot opened this issue Oct 6, 2016 · 5 comments

Comments

@glassfishrobot
Copy link

If "Request Meaaage" that is more than the number of threads in "thread-pool-1" is sent to the IJServer cluster,
all pooled threads wait for "Fragment Message" to be processed and become time-outs.

**LOG**javax.ejb.EJBException: java.rmi.MarshalException: CORBA COMM_FAILURE 1330446361 No; nested exception is: 
	org.omg.CORBA.COMM_FAILURE: WARNING: 00410025: Write of message exceeded TCP timeout : max wait time = 6,000 ms, total time spent blocked, waiting to write = 7,280 ms.  vmcid: OMG  minor code: 25  completed: No
javax.ejb.EJBException: java.rmi.MarshalException: CORBA COMM_FAILURE 1330446361 No; nested exception is: 
	org.omg.CORBA.COMM_FAILURE: WARNING: 00410025: Write of message exceeded TCP timeout : max wait time = 6,000 ms, total time spent blocked, waiting to write = 7,280 ms.  vmcid: OMG  minor code: 25  completed: No
	at com.fujitsu.test.ejb._DataTest_Wrapper.sendData(com/fujitsu/test/ejb/_DataTest_Wrapper.java)
	at datatestacc.InnerThread_loop1.run(Main.java:66)
Caused by: java.rmi.MarshalException: CORBA COMM_FAILURE 1330446361 No; nested exception is: 
	org.omg.CORBA.COMM_FAILURE: WARNING: 00410025: Write of message exceeded TCP timeout : max wait time = 6,000 ms, total time spent blocked, waiting to write = 7,280 ms.  vmcid: OMG  minor code: 25  completed: No
	at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:258)
	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:211)
	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
	at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226)
	at com.fujitsu.test.ejb.__DataTest_Remote_DynamicStub.sendData(com/fujitsu/test/ejb/__DataTest_Remote_DynamicStub.java)
	... 2 more
Caused by: org.omg.CORBA.COMM_FAILURE: WARNING: 00410025: Write of message exceeded TCP timeout : max wait time = 6,000 ms, total time spent blocked, waiting to write = 7,280 ms.  vmcid: OMG  minor code: 25  completed: No
	at com.sun.proxy.$Proxy36.transportWriteTimeoutExceeded(Unknown Source)
	at com.sun.corba.ee.impl.transport.NioBufferWriter.write(NioBufferWriter.java:62)
	at com.sun.corba.ee.impl.transport.ConnectionImpl.writeUsingNio(ConnectionImpl.java:508)
	at com.sun.corba.ee.impl.transport.ConnectionImpl.write(ConnectionImpl.java:480)
	at com.sun.corba.ee.impl.encoding.CDROutputObject.writeTo(CDROutputObject.java:225)
	at com.sun.corba.ee.impl.transport.ConnectionImpl.sendHelper(ConnectionImpl.java:1153)
	at com.sun.corba.ee.impl.transport.ConnectionImpl.sendCancelRequest(ConnectionImpl.java:1142)
	at com.sun.corba.ee.impl.transport.ConnectionImpl.sendCancelRequestWithLock(ConnectionImpl.java:1162)
	at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.sendCancelRequestIfFinalFragmentNotSent(MessageMediatorImpl.java:373)
	at com.sun.corba.ee.impl.protocol.ClientRequestDispatcherImpl.endRequest(ClientRequestDispatcherImpl.java:916)
	at com.sun.corba.ee.impl.protocol.ClientDelegateImpl.releaseReply(ClientDelegateImpl.java:279)
	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:208)
	... 5 more

To operate even in this case, I propose the following corrections.

(1) The thread pool for the thread that processes "Fragment Message" is prepared.
ex) "fragment-thread-pool"

(2) Received "Fragment Message" is processed by the thread pooled by (1).

**glassfish-corba/orbmain/src/main/java/com/sun/corba/ee/impl/protocol/giopmsgheaders/MessageBase.java**
    public static MessageBase parseGiopHeader(ORB orb,
              Connection connection,
              ByteBuffer buf,
              int startPosition) {
        ...

        //
        // Initialize the generic GIOP header instance variables.
        // 
        if ((it[4] == 0x01) && (it[5] == 0x00)) { // 1.0
            Message_1_0 msg10 = (Message_1_0) msg;
            msg10.magic = magic;
            msg10.GIOP_version = new GIOPVersion(it[4], it[5]);
            msg10.byte_order = (it[6] == LITTLE_ENDIAN_BIT);
            // 'request partitioning' not supported on GIOP version 1.0
            // so just use the default thread pool, 0.
            msg.threadPoolToUse = 0;
            msg10.message_type = it[7];
            msg10.message_size = readSize(it[8], it[9], it[10], it[11],
    msg10.isLittleEndian()) +
    GIOPMessageHeaderLength;
        } else { // 1.1 & 1.2
            Message_1_1 msg11 = (Message_1_1) msg;
            msg11.magic = magic;
            msg11.GIOP_version = new GIOPVersion(it[4], it[5]);
            msg11.flags = (byte) (it[6] & TRAILING_TWO_BIT_BYTE_MASK);
            // IMPORTANT: For 'request partitioning', the thread pool to use
            //            information is stored in the leading 6 bits of byte 6.
            //
            // IMPORTANT: Request partitioning is a PROPRIETARY EXTENSION !!!
            //
            // NOTE: Bitwise operators will promote a byte to an int before 
            //       performing a bitwise operation and bytes, ints, longs, etc
            //       are signed types in Java. Thus, the need for the 
            //       THREAD_POOL_TO_USE_MASK operation.
            if(it[7] == GIOPFragment){           // add
msg.threadPoolToUse = orb.getThreadPoolManager().getThreadPoolNumericId("fragment-thread-pool"); // add
            } else{
msg.threadPoolToUse = (it[6] >>> 2) & THREAD_POOL_TO_USE_MASK;
            }
            msg11.message_type = it[7];

        ...

We ask for your kind consideration.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by myokan

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
myokan said:
It does not become time-outs. It happened because of the proposed correction.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA GLASSFISH_CORBA-17

@glassfishrobot
Copy link
Author

@xbug42
Copy link

xbug42 commented Jan 24, 2019

Any plan to fix this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants