Archived
This forum has been archived. Please start a new discussion on GitHub.
OutOfMemmoryError: mmAlloc
Hi,
While sending a huge string (size could be even 54 MB) to the ice servant, I am getting following exception. But sometimes, I am able to send the same string to the same Ice service. I guess this is not related to Ice framework. But it would be really helpful if anyone can provide some info about this problem.
Is it just memory unavailablity problem?
JDK : Jrockit 1.4.2.8
Please let me know if any other info is required.
java.lang.OutOfMemoryError: mmAllocLargeArray(jniGetVMThread(env), (ClassP)c, (ObjectP*)res, len) : mmAllocLargeArray(jniGetVMThread(env), (ClassP)c, (ObjectP*)res, len)
java.lang.StringCoding.trim([BI)[B(Unknown Source)
java.lang.StringCoding.access$700([BI)[B(Unknown Source)
java.lang.StringCoding$CharsetSE.encode([CII)[B(Unknown Source)
java.lang.StringCoding.encode(Ljava/lang/String;[CII)[B(Unknown Source)
java.lang.String.getBytes(Ljava/lang/String;)[B(Unknown Source)
IceInternal.BasicStream.writeString(Ljava/lang/String;)V(BasicStream.java:1031)
com.gale.cs.vault.model.Document.__write(LIceInternal/BasicStream;)V(Document.java:102)
IceInternal.BasicStream.writeInstance(LIce/Object;Ljava/lang/Integer;)V(BasicStream.java:1554)
IceInternal.BasicStream.writePendingObjects()V(BasicStream.java:1467)
com.gale.cs.vault._VaultServiceICEDelM.addDocument(Lcom/gale/cs/vault/model/Document;Ljava/util/Map;)Lcom/gale/cs/vault/model/DocumentId;(_VaultServiceICEDelM.java:28)
com.gale.cs.vault.VaultServiceICEPrxHelper.addDocument(Lcom/gale/cs/vault/model/Document;Ljava/util/Map;)Lcom/gale/cs/vault/model/DocumentId;(VaultServiceICEPrxHelper.java:35)
com.gale.cs.vault.VaultServiceICEPrxHelper.addDocument(Lcom/gale/cs/vault/model/Document;)Lcom/gale/cs/vault/model/DocumentId;(VaultServiceICEPrxHelper.java:20)
jrockit.reflect.NativeMethodInvoker.invoke0(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
jrockit.reflect.NativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;I)Ljava/lang/Object;(Unknown Source)
org.springframework.remoting.ice.IceClientInterceptor.invoke(Lorg/aopalliance/intercept/MethodInvocation;)Ljava/lang/Object;(IceClientInterceptor.java:245)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed()Ljava/lang/Object;(ReflectiveMethodInvocation.java:144)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;(JdkDynamicAopProxy.java:174)
$Proxy32.addDocument(Lcom/gale/cs/vault/model/Document;)Lcom/gale/cs/vault/model/DocumentId;(Unknown Source)
com.gale.cs.workflow.loadfeed.biz.service.impl.LoadFeedWorkflowServiceImpl.checkinDocumentsToDeliveryVault(Lcom/gale/cs/workflow/WorkflowInput;Lcom/gale/cs/workflow/FeedInput;Ljava/util/List;)V(LoadFeedWorkflowServiceImpl.java:435)
Thanks & Regards,
Sivaprakash S
While sending a huge string (size could be even 54 MB) to the ice servant, I am getting following exception. But sometimes, I am able to send the same string to the same Ice service. I guess this is not related to Ice framework. But it would be really helpful if anyone can provide some info about this problem.
Is it just memory unavailablity problem?
JDK : Jrockit 1.4.2.8
Please let me know if any other info is required.
java.lang.OutOfMemoryError: mmAllocLargeArray(jniGetVMThread(env), (ClassP)c, (ObjectP*)res, len) : mmAllocLargeArray(jniGetVMThread(env), (ClassP)c, (ObjectP*)res, len)
java.lang.StringCoding.trim([BI)[B(Unknown Source)
java.lang.StringCoding.access$700([BI)[B(Unknown Source)
java.lang.StringCoding$CharsetSE.encode([CII)[B(Unknown Source)
java.lang.StringCoding.encode(Ljava/lang/String;[CII)[B(Unknown Source)
java.lang.String.getBytes(Ljava/lang/String;)[B(Unknown Source)
IceInternal.BasicStream.writeString(Ljava/lang/String;)V(BasicStream.java:1031)
com.gale.cs.vault.model.Document.__write(LIceInternal/BasicStream;)V(Document.java:102)
IceInternal.BasicStream.writeInstance(LIce/Object;Ljava/lang/Integer;)V(BasicStream.java:1554)
IceInternal.BasicStream.writePendingObjects()V(BasicStream.java:1467)
com.gale.cs.vault._VaultServiceICEDelM.addDocument(Lcom/gale/cs/vault/model/Document;Ljava/util/Map;)Lcom/gale/cs/vault/model/DocumentId;(_VaultServiceICEDelM.java:28)
com.gale.cs.vault.VaultServiceICEPrxHelper.addDocument(Lcom/gale/cs/vault/model/Document;Ljava/util/Map;)Lcom/gale/cs/vault/model/DocumentId;(VaultServiceICEPrxHelper.java:35)
com.gale.cs.vault.VaultServiceICEPrxHelper.addDocument(Lcom/gale/cs/vault/model/Document;)Lcom/gale/cs/vault/model/DocumentId;(VaultServiceICEPrxHelper.java:20)
jrockit.reflect.NativeMethodInvoker.invoke0(Ljava/lang/Object;ILjava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
jrockit.reflect.NativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;I)Ljava/lang/Object;(Unknown Source)
org.springframework.remoting.ice.IceClientInterceptor.invoke(Lorg/aopalliance/intercept/MethodInvocation;)Ljava/lang/Object;(IceClientInterceptor.java:245)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed()Ljava/lang/Object;(ReflectiveMethodInvocation.java:144)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;(JdkDynamicAopProxy.java:174)
$Proxy32.addDocument(Lcom/gale/cs/vault/model/Document;)Lcom/gale/cs/vault/model/DocumentId;(Unknown Source)
com.gale.cs.workflow.loadfeed.biz.service.impl.LoadFeedWorkflowServiceImpl.checkinDocumentsToDeliveryVault(Lcom/gale/cs/workflow/WorkflowInput;Lcom/gale/cs/workflow/FeedInput;Ljava/util/List;)V(LoadFeedWorkflowServiceImpl.java:435)
Thanks & Regards,
Sivaprakash S
0
Comments
-
first of all be sure that your system has available memory when it crash
if you are in linux side check if you are exceding system limits with ulimit, ulimit -a list you the limits for a user.
You must adjust your jvm params to allow more memory, this option can help. I think the default is 32mb for clients and 64 for servers
-Xmx256m
//sets the maximum heap size to 256mb
for a extensive list of jvm params check this url http://www.tagtraum.com/gcviewer-vmflags.html
I hope this help you0 -
I observed that it is because of lack of memory. Also, I observed that it requires almost memory of 10 times more than the actual content to recieve from the ICE server. Is my observation correct?
Suppose if I have to retreive content (assume size as 6MB) from an ICE server, i had to set memory heap size as 60MB while ruinning the client. I am using JDK1.4.2_8
Thanks & Regards,
Sivaprakash Selvaraj,
HTC Global Services.0 -
Before we can help you, can you please update your signatures as described in this thread.
Cheers,
Michi.0 -
Please let us also know which Ice version you are using.0
-
Ice Version
I am using ICE Version 3.0.10 -
Hi,
I've confirmed that Ice for Java is using a lot of memory when marshaling strings. We'll fix this in the next release.
Thanks for reporting this problem.
Take care,
- Mark0