Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 949 - Memory issue if size of Message exceed maximum Size
Summary: Memory issue if size of Message exceed maximum Size
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 2.3.0
Hardware: Other Linux
: P2 critical
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2013-05-14 13:04 UTC by alka singh
Modified: 2013-10-24 06:18 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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