We are using JacORB for a very long time. (Version 1.1.4) With new project we implemented some new services that produces large amount of data (actually 6000 records * about 150 byte each) and in some cases we are getting the exception below: java.lang.OutOfMemoryError at org.jacorb.orb.BufferManager.getBuffer(BufferManager.java:188) at org.jacorb.orb.connection.TCP_IP_Transport.getMessage(TCP_IP_Transport.java:237) at org.jacorb.orb.connection.GIOPConnection.receiveMessages(GIOPConnection.java:164) at org.jacorb.orb.connection.MessageReceptor.doWork(MessageReceptor.java:53) at org.jacorb.util.threadpool.ConsumerTie.run(ConsumerTie.java:68) at java.lang.Thread.run(Thread.java:534) After this exception every request to the CORBA service that produced this exception doesn’t have any response on client side. Flow: Request from java side to CORBA interface, CORBA gets request, handles it, makes a response (we see it from CORBA side), but this response never came back from CORBA side to java through JacORB. It looks like it produces some lock that makes it impossible to get a response. After restarting of CORBA service we are getting the following exception for first request and next it work fine for some time until OutOfMemory error. Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: 0x0 minor code: 0 completed: Maybe at org.jacorb.orb.connection.ClientConnection.sendRequest(ClientConnection.java:225) at org.jacorb.orb.connection.ClientConnection.sendRequest(ClientConnection.java:213) at org.jacorb.orb.Delegate.invoke(Delegate.java:796) at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457) at com.wcom.conferencing.servlets.eccrs.corba._MmmUserAdminReportIntfcStub.GetActiveLeaders(Unknown Source) Please advice something. Environment: Number of processors available to the Java virtual machine 2 The total amount of memory in the Java virtual machine 1,073,741,824 bytes The amount of free memory in the Java Virtual Machine 443,097,632 bytes The maximum amount of memory that the Java virtual machine will attempt to use 4,096,000,000 bytes Java name Java(TM) 2 Runtime Environment, Standard Edition Java version 1.4.2 JVM name Fast VM JVM version 1.4.2-4 JVM vendor Hewlett-Packard Company Java specification name Java Platform API Specification JVM Mode native threads, mixed mode, 12/23/2004-06:00 OS architecture alpha OS name OSF1 OS version V5.1 Ps. we tried to use the latest JacORB but getting the same issue.
What are your properties? (with e.g. the latest version you tried - and was that CVS or...?)
Our production version is 1.1.4. It fails on the code line in BufferManager: method:getBuffer code: byte[] b = new byte[log > MIN_OFFSET ? 1 << log : 1 << MIN_OFFSET]; ---------------------------- JacORB properties: ORBInitRef.NameService=corbaloc::cutcutcut org.omg.CORBA.ORBClass=org.jacorb.orb.ORB org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton jacorb.security.change_ssl_roles=off jacorb.security.support_ssl=off jacorb.security.ssl.client.supported_options=0 jacorb.security.ssl.client.required_options=0 jacorb.security.ssl.server.supported_options=0 jacorb.security.ssl.server.required_options=0 ---------------------------- It is running on Tomcat 5.0.28 I tried to create test jsp and allocate the same amount of memory in cycle but it work fine. Also I put some debug code in BufferManager before new byte[]. Looks like it is not a momory issue mainly. It's not trying to allocate a lot of memory and not frequently, it fails after trying to allocate 4194304 after the end of request, but in the same time it is a lot of memory free. It can work for example 10 times and fails on 11, or work 1 fail on 2. It's unpredictable. I still have no idea why it's happening :(
Please test with the latest codebase.
Please retest with latest version and reopen if still a problem.