Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 949

Summary: Memory issue if size of Message exceed maximum Size
Product: JacORB Reporter: alka singh <alka.singh>
Component: ORBAssignee: Mailinglist to track bugs <jacorb-bugs>
Status: RESOLVED FIXED    
Severity: critical CC: alka.singh, jacorb, Martin.Langwieder
Priority: P2    
Version: 2.3.0   
Hardware: Other   
OS: Linux   

Description alka singh 2013-05-14 13:04:19 UTC
We have a system where java component interfaces with c++ component using Corba.
On java we use jacorb library whereas on the c++ side we use omni-orb.

We have maximum size of 8m set on the c++ side and in java side we have jacorb.connection.client.retry_on_failure flag set to on.

For one of the cases C++ component attempted to send a Message where size was more than 8m. Due to this there was a warning message generated on java code:
04-30-2013 00:49:37.789 ClientMe jacorb.giop.c W Abnormal connection termination. Lost 1 outstanding replie(s)!

This warning goes on for while, and then java process gets into OutOfMemory Error. On the heap analysis, it was found that ClientGIOPConnection  was maximum consumer.

Has this issue been reported before? I tried with version 3.2 of jacorb, but problem persist.

I have made following changes to jacorb code, and the fix works for me. Let me know if the fix is correct. Look for "// fix" to see the new code

1) org.jacorb.orb.giop.ClientConnection.streamClosed
else
{
    if (logger.isWarnEnabled())
    {
        logger.warn("Abnormal connection termination. Lost " +
                    replies.size() + " outstanding replie(s)!");
    }
    // fix start
    connection.clearMessage();
    // fix end
}

2) org.jacorb.orb.giop.GIOPConnection
// fix start
public void clearMessage(){
        fragments.clear();
}
// fix start
Comment 1 Nick Cross 2013-05-15 12:38:27 UTC
Thanks for the bug report.

Are you able to supply a test case and/or wireshark trace?

It would be helpful to understand the sequence of calls from client and server replies.
Comment 2 Nick Cross 2013-10-24 06:18:18 UTC
Fixed by 5694e66c5fb2c1954763b82417fbbd998fdde797