Java memory management & stack overflow

Hi
I am building an application in java. It has to keep track of a lot of objects, typically about 100 000 or so. When putting them in a linked list, I get stack overflow. Is there som way of storing all these objects that wont result in SOF error?

This app is practically screaming "DATABASE!". I suggest that you listen to it.

Similar Messages

  • Java Memory Management/Out of Memory

    Hi Guys,
    I have a few questions about java memory management
    Because i keep encounter a lot of out of memory error which i think java does not handle Vector/ArrayList re initialisation automatically
    Asumme i have 2 million record in database and , i will process every 80000 and store it in Vector
    while(true)
    list = new Vector();
    list = GetResultFromDatabase() // Process Every 80000
    if list.size() > 0 =======> My VEctor list contain 80000
    //loop the 800000
    //Process Some logic and data
    list.clear();
    list = null;
    If u See , i need to call list.clear and list = Null every process so it wont cause me out of memory
    Before i put that 2 lines , i always hit out of memory Exception.
    Seems like garbage collector cannot claim memory if i dont declare
    Is Memory Occupied by VEctor cannot be recoverable if we dont explitcitynya clear it and set it to NULL??
    Because in term of logic wise it wont cause a problem if i just
    do in this statement after it process like below
    list = new Vector() which will reinstatiate the object.
    Thanks.

    Damm i should hacve read your post again
    Look here:
    while(true)
    list = new Vector();What uer doing is craeting a new vector object everytime the while does an ityteration so when your while loop does 40000 loops there will be 40000 new objects in jou memory
    i sugest moving the decleration outside the while loop:
      list = new Vector();
    while(true)
    ///rest of loop
    } This could also be a problem
    hope it help :-)
    werns

  • Java Memory Management

    Hi,
    Can any one help me in find out the memory of a particular java object is consuming............................
    That means, is there any way so that I can find out the memory occupied by the Object.........
    Thanks
    Murali

    Hi Murali,
    As of such i don't find a method to find the memory of particular object but you can find the memory occupied by your application by using following three methods
    Runtime.getRuntime().maxMemory(),Runtime.getRuntime().totalMemory(),Runtime.getRuntime().freeMemory();
    As you wanted know the only the memory occupied by the object hope this url will help you out http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html

  • "Stack overflow" & "out of memory"

    Hello,
    I have an issue with javascript code : with my own navigation, which includes additional javascript, I have either a "out of memory" error on the declaration of "var strUrl = http://..." in the CommonOpener_CreateExtObject method, or a "stack overflow" error on the onload="document.PCC.RaiseWindowEvent(event);" event handling in the <body> tag.
    When I save the page as HTML and remove the onload event, no error happens anymore.
    I think I could remove the onload event generation by modifying the C# code, but it would certainly disable some other feature (I think this event is managing PEI calls or something else).
    Any idea on how to fix this ?
    P.S : I'm on a .NET platform, I'm going to try to recompile my nav on a java platform to see if it works...

    Sebastien,
    - Are you using 5.0.1 or 5.0.2?
    - Are you by any chance trying to extend the Isomorphic navigation (under 5.0.2, it's called "legacy")?
    I would carefully review the pluggable nav you're using and double-check you're including all the necessary javascript in the JavaScriptIncludes() method to make sure you're basically adding everything properly.
    The isomorphic nav was particularly hard to extend because it required you add a special DHTML element to close off the menus being inserted. If you base your work off of our new jsportalmenus nav, it's much easier to work with and more reliable: it injects javascript into a named DOM element, which in our case is just a <TD id='name'></TD>; the menu gets inserted in the table cell.
    At a minimum, try debugging your javascript bug using Microsoft's script debugger (downloadable from microsoft.com). You should be able to determine precisely why there is a failure; comapre your code to the original nav you started from and carefully pick out what could be different.
    The onload events and the PCC are critical to normal function of the portal. Sgutting that off isn't an option, in my mind. If you wanted to, you'd need to do some pretty major surgery on the portal, and thaqt wouldn't upgrade, either.
    David Phipps
    Plumtree Software

  • Memory management in Java

    HI all,
    I want to know what is memory management in JAVA means ?Is it related to memory management of java VM.?

    Sorry for posting in wrong area. also sorry for cross posting . i close this discussion as i have posted a new topic. so dont reply plz.

  • Stack overflow error while trying to run expense management activity on oracle BPM studio 10.3 on windows8 machine

    I am getting stack overflow error. While trying to bring expense creation screen on windows 8.
    I trying couple of settings in eclipse.ini file to increase the size but nothing helped. Can someone please advice?
    Below is eclipse.ini file
    -showsplash
    fuego.eclipse.studio
    --launcher.XXMaxPermSize
    --256m
    -vmargs
    -Xms600m
    -Xmx600m
    -Xss500m
    -Dfuego.fstudio=true
    -DprodMode=preProduction
    -Dbea.home=C:\OraBPMStudioHome\..
    -Djava.endorsed.dirs=""
    -Dsun.lang.ClassLoader.allowArraySyntax=true
    -Dfuego.studio.engine.java.options=-Dsun.lang.ClassLoader.allowArraySyntax=true
    -XX:PermSize=512M
    -XX:MaxPermSize=1024M
    -Xbootclasspath/a:C:\OraBPMStudioHome\eclipse\jre\lib\ext\tools.jar

    It looks like you are trying to run OSX on a Windows PC with VMware Workstation...
    This is NOT supported by VMware and doing so will break Apples EULA, you need Apple hardware to run OSX.
    No one here will be able to help you and you should investigate other legal and supported alternatives.
    // Linjo

  • Java Card Memory Managament: How do you free-up allocated memory?

    I have a problem with java card memory management, that causes the applet to hang. I think the java card runs out of RAM when my applet runs for several iterations or process() calls. My program requires significant size of bytes for each APDU command to be sent. (around 100-250 bytes, for each apdu.sendBytes() call).
    I use a temporary byte array buffer that will contain the APDU command to be sent, declared as:
    private byte [] tmpBuff;Before each process() call, the tmBuff is initialized and contains a new byte array containing the APDU command to be sent. (array size around 100-250 bytes).
    tmpBuff = new byte[] {0x00, ... } On the process() call, the tmpBuff is copied to APDU and sendBytes() function is called. The tmpBuff byte array is reinitialized after every process() call to contain the next command. After about 20 successful commands by the process() call, the applet seems to ran out of RAM and hangs.
    I suspect, that when tmpBuff is reinitialized before each process() call, the Java Card garbage collector does now free-up the memory that was used for the previous tmpBuff byte array initialization.
    Is there a way to reclaim the memory allocated for tmpBuff after it has been initialized?
    Or maybe call the Java card garbage collector?

    Cenon,
    Generally speaking, the new keywork is a bad idea outside the install method or constructors as the JCRE is not guarenteed to have a garbage collector (and if it does, has to be called explicitly by JCSystem.requestObjectDeletion(); This however is slow.
    A better option may be to use memory more efficiently than to rely on garbage collection. A way of doing this would be to have an instance variable that is initialised once and reused. This allows you to use either a transient or persistent array.
    public class TestApplet extends Applet {
        private final static short BUFFER_SIZE = (short) 300;
        private final byte[] buffer;
        private TestApplet() {
            // only have one of the following not commented out
            /* persistent buffer */
            // buffer = new byte[BUFFER_SIZE];
            /* transient buffer (much faster) */
            buffer = JCSystem.makeTransientByteArray(BUFFER_SIZE, JCSystem.CLEAR_ON_DESELECT);
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            // GP-compliant JavaCard applet registration
            new TestApplet().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
        public void process(APDU apdu) {
            // Good practice: Return 9000 on SELECT
            if (selectingApplet()) {
                return;
            // do some work here with buffer
    }In the above code you would be able to use the buffer to build the command and you will not have a memory leak.
    Cheers,
    Shane
    Edited by: safarmer on Jul 8, 2008 12:25 PM

  • How to get Java source in applet stack trace to debug Java security manager

    How can I get line numbers for Java source in stack traces for my applet? I'm having a problem with my code-signing certificate. On one of my applets, I consistently get a NullPointerException inside the security dialog code in the JDK. As a result, either the "trust this applet" dialog never appears, or even though it appears, it defaults to untrusted because of the exception, so I can't access any local files (and that's a bit of a problem for an applet whose sole purpose is to upload files to our server). I unzipped src.zip in my JDK directory and set the debug flag for my Ant <javac> task as well as set debuglevel to "lines." Anything else? Here's the trace that I'm getting so far. See that after the NullPointerException it assumes that the user has denied permission. If I could read this Java source maybe I could figure out why it hates my code-signing certificate (jarsigner, BTW, never complains when I verify my jar).
    security: Blacklist file not found or revocation check is disabled
    security: Accessing keys and certificate in Mozilla user profile: null
    security: Loading Root CA certificates from D:\Program Files (x86)\Java\jre6\lib\security\cacerts
    security: Loaded Root CA certificates from D:\Program Files (x86)\Java\jre6\lib\security\cacerts
    security: Loading Deployment certificates from C:\Users\Rich\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loaded Deployment certificates from C:\Users\Rich\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: Start to check whether root CA is replaced
    security: The root CA has been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: Start checking trusted extension for this certificate
    security: Start comparing to jurisdiction list with this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    security: Checking if certificate is in Deployment session certificate store
    java.lang.NullPointerException
         at com.sun.deploy.ui.UIFactory.showSecurityDialog(Unknown Source)
         at com.sun.deploy.security.TrustDeciderDialog.showDialog(Unknown Source)
         at com.sun.deploy.security.X509Util.showSecurityDialog(Unknown Source)
         at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
         at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
         at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$700(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    security: User has denied the priviledges to the code
    security: Adding certificate in Deployment denied certificate store
    security: Added certificate in Deployment denied certificate store
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: Start to check whether root CA is replaced
    security: The root CA has been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: Start checking trusted extension for this certificate
    security: Start comparing to jurisdiction list with this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment denied certificate store

    Rats, now that I look at the stack trace and compare to what's in the JDK srce.zip, it appears that most of this code is not part of the JDK source. I don't see any com/sun/deploy, etc.

  • Stack Overflow Jrockit 1.4.2_08 JVM R24.5.0-61 ari-49095-20050826-1856-linu

    Hi All we are using jrockit on Linux, we have a cluster that consists of 2 machines and each machine has 2 managed servers. the dumnp always happens on the one of the managed servers on each machine.
    Initially the cluster had 2 managed servers , one on each server, of lately we added 2 more managed servers (one each on the machine).
    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 0 days, 07:53:23 on Fri Aug 18 02:46:57 2006
    Additional information is available in:
    /usr/local/bea/user_projects/domains/cmstargetDomain/jrockit.11168.dump
    No core file will be created because core dumps have been
    disabled. To enable core dumping, try "ulimit -c unlimited"
    before starting JRockit again.
    If you see this dump, please open a support case with BEA and
    supply as much information as you can on your system setup and
    the program you were running. You can also search for solutions
    to your problem at http://forums.bea.com in
    the forum jrockit.developer.interest.general.
    Error code: 52
    Error Message: Stack overflow
    Signal info : si_signo=11, si_code=2
    Version : BEA WebLogic JRockit(TM) 1.4.2_08 JVM R24.5.0-61 ari-49095-20050826-1856-linux-ia32
    Threads / GC : Native Threads, GC strategy: parallel
    : mmHeap->data = 0x20000000, mmHeap->top = 0x40000000
    : mmStartCompaction = 0x2c800000, mmEndCompaction = 0x2f000000
    CPU : Intel Pentium 4 (EM64T)
    Number CPUs : 4
    Tot Phys Mem : 4127768576
    OS version : Red Hat Enterprise Linux ES release 3 (Taroon Update 4)
    Linux version 2.4.21-27.ELsmp ([email protected]) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47)) #1 SMP
    Wed Dec 1 21:59:02 EST 2004
    State : JVM is running
    Command Line : -Djava.class.path=/usr/local/bea/jrockit81sp4_142_08/lib/tools.jar:/usr/local/bea/weblogic81/server/lib/weblog
    ic_sp.jar:/usr/local/bea/weblogic81/server/lib/weblogic.jar::/usr/local/bea/weblogic81/common/eval/pointbase/lib/pbserver44.j
    ar:/usr/local/bea/weblogic81/common/eval/pointbase/lib/pbclient44.jar:/usr/local/bea/jrockit81sp4_142_08/jre/lib/rt.jar:/usr/
    local/bea/weblogic81/server/lib/webservices.jar::/opt/documentum/shared/config:/opt/documentum/shared/dctm.jar -Djrockit.laun
    cher.type=jrockit.shipment -Xms512m -Xmx512m -Dweblogic.Name=cmpa05Server02 -Dweblogic.management.username= -Dweblogic.manage
    ment.password= -Dweblogic.management.server=http://10.200.148.13:8001 -Djava.security.policy=/usr/local/bea/weblogic81/server
    /lib/weblogic.policy -Dsun.java.command=weblogic.Server
    Environment : JAVA_HOME=/usr/local/bea/jrockit81sp4_142_08, java.home=/usr/local/bea/jrockit81sp4_142_08/jre, java.class.pat
    h=/usr/local/bea/jrockit81sp4_142_08/lib/tools.jar:/usr/local/bea/weblogic81/server/lib/weblogic_sp.jar:/usr/local/bea/weblog
    ic81/server/lib/weblogic.jar::/usr/local/bea/weblogic81/common/eval/pointbase/lib/pbserver44.jar:/usr/local/bea/weblogic81/co
    mmon/eval/pointbase/lib/pbclient44.jar:/usr/local/bea/jrockit81sp4_142_08/jre/lib/rt.jar:/usr/local/bea/weblogic81/server/lib
    /webservices.jar::/opt/documentum/shared/config:/opt/documentum/shared/dctm.jar, java.library.path=/usr/local/bea/jrockit81sp
    4_142_08/jre/lib/i386/jrockit:/usr/local/bea/jrockit81sp4_142_08/jre/lib/i386:/usr/local/bea/jrockit81sp4_142_08/jre/../lib/i
    386:/opt/documentum/shared/dfc:/usr/local/bea/weblogic81/server/lib/linux/i686:/usr/local/bea/weblogic81/server/lib/linux/i68
    6/oci920_8
    C Heap : Good; no memory allocations have failed
    Registers (from context struct at 0x895716c/0x8957234):
    EAX = b4dd7c14 EBX = 08954fd8
    ECX = b4dba06c EDX = 226f5f20
    ESI = 08954ed0 EDI = 08954fd8
    ESP = b4db9fec EIP = b7374aa2
    EBP = b4dba000 EFL = 00010292
    CS = 0023 DS = 002b ES = 002b
    SS = 002b FS = 0033 GS = 0033
    Stack:
    b4db9fec :00000000 00000000 00000000 00000000 00000000 b4dba030
    b4dba004 :b7374b1f 08954fd8 00000000 00000000 00000000 089550e0
    b4dba01c :00000000 00000000 00000000 00000000 00000000 b4dba060
    b4dba034 :b7368b05 08954fd8 00000000 00000000 00000000 089550e0
    b4dba04c :b4dba068 226f5ab8 00000000 00000000 00000000 08954fd8
    b4dba064 :b6566d57 08955064 0808cba0 089550e0 00000000 226f5050
    b4dba07c :08954fd8 0000020c 35a893b0 35a893c8 b6566da8 b6f4d8e0
    b4dba094 :226f5ab8 08954ed0 226f5f20 b65670b2 00000248 00000234
    b4dba0ac :af903372 00000234 b7368b2d 0000008d 00000000 226f5ab8
    b4dba0c4 :00000000 b4dba108 08954fd8 226f53c8 acb2b38e 226f53f0
    b4dba0dc :3be87630 35a893b0 35a893b0 35a893b0 af904a36 b4dba130
    b4dba0f4 :201aeb58 b4dba134 00000000 00000004 00000000 08954fd8
    b4dba10c :b4dba1d0 08954ed0 201aeb58 35a893c8 29cbd300 089550e0
    b4dba124 :0000008d 00000000 226f5ab8 0000008d 00000000 af904c85
    b4dba13c :226f5ab8 08954fd8 b4dba154 acb2b43e b6577440 b65684d8
    b4dba154 :b6577430 b7359a4d b4dbb3cb 00000000 00000000 b4dba1f4
    b4dba16c :08955064 b6017da8 b6f15ab8 08954fd8 08955064 b6f15ab8
    b4dba184 :b4dba1b4 b732e61a b6f15ab8 b4dba1b0 08955064 00000001
    b4dba19c :b6f15ab8 b4dba1f0 b4dba1f4 b733e775 08955064 b4dba1ec
    b4dba1b4 :b4dba154 00000000 00000000 00000000 00000000 00000000
    b4dba1cc :00000000 226f5cc0 b4dba154 b4dba154 08954fd8 b4dba210
    b4dba1e4 :b6577430 b65684a0 00000000 b4dbb3cb b4dba234 b733e931
    b4dba1fc :08955064 080f7bd0 b6017da8 089550dc b4dba288 b7359550
    b4dba214 :b4dba26c b4dba238 08955064 089550dc b4dba3b4 00000000
    b4dba22c :00000000 080f7bd0 b4dba274 b733f146 08955064 b6f15ab8
    b4dba244 :089550dc b4dba288 b7359550 00000000 b4dba26c b4dba27c
    b4dba25c :08955064 00000004 00000000 08954fd8 226f5400 089550e0
    b4dba274 :b4dba2a4 b733ed68 08955064 089550dc b6f15ab8 b4dba2b8
    b4dba28c :08955064 089550e0 b4dba3b4 08954fd8 089550dc 08955064
    b4dba2a4 :b4dba2e4 b7341e69 08955064 089550dc b6f15ab8 00000002
    b4dba2bc :08955064 089550dc 00000000 b733b94c 08955064 b4dba310
    b4dba2d4 :00000000 089550d4 00000008 00000004 b4dba314 b7341d9a
    b4dba2ec :08955064 089550dc b4dba3b4 00000fff 089550dc 00000000
    b4dba304 :08954fd8 b4dba348 b753045c 089550dc b4dbb3b4 b73505d5
    b4dba31c :08955064 089550dc b4dba3b4 00000fff 089550dc b4dbb3bc
    b4dba334 :226f5948 b4dba378 b7368b2d 08954fd8 b4dba3b4 00000000
    b4dba34c :b7368b24 b4dba390 b73072bb 08954ed0 29cc68b8 b4dba380
    b4dba364 :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba37c :00000000 b4dba3c0 b7368b2d 08954fd8 00000005 b4dba3c0
    b4dba394 :b7368b24 08954ed0 0000008d 35a893c8 29cc7b00 089550e0
    b4dba3ac :b4dba3c8 00000000 7273752f 636f6c2f 622f6c61 752f6165
    b4dba3c4 :5f726573 6a6f7270 73746365 6d6f642f 736e6961 736d632f
    b4dba3dc :67726174 6f447465 6e69616d 706d632f 53353061 65767265
    b4dba3f4 :2f323072 67617473 6d632f65 72657373 65636976 736d632f
    b4dba40c :76726573 2e656369 2f726177 2d424557 2f464e49 73616c63
    b4dba424 :2f736573 69646e6a 6f72702e 74726570 00736569 b4dba458
    b4dba43c :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba454 :00000000 b4dba498 b7368b2d 08954fd8 00000005 b4dba498
    b4dba46c :b7368b24 08954ed0 0000008d 35a893c8 29ccb300 089550e0
    b4dba484 :b4dba4a0 00000000 29ccb2d8 b4dba4d0 b73072bb 08954ed0
    b4dba49c :0000008d b4dba4c0 b7374b02 08954fd8 08954ed0 00000000
    b4dba4b4 :08954fd8 b4dba4f8 b73072bb 08954ed0 b7368b2d b4dba4e8
    b4dba4cc :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba4e4 :00000000 b4dba528 b7368b2d 08954fd8 00000005 00000000
    b4dba4fc :b7368b24 b4dba540 b73072bb 08954ed0 29ccd8b8 b4dba530
    b4dba514 :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba52c :00000000 b4dba570 b7368b2d 08954fd8 00000005 b4dba570
    b4dba544 :b7368b24 08954ed0 0000008d 35a893c8 29cceb00 089550e0
    b4dba55c :b4dba578 00000000 29ccead8 b4dba5a8 b73072bb 08954ed0
    b4dba574 :0000008d b4dba598 b7374b02 08954fd8 08954ed0 00000000
    b4dba58c :08954fd8 b4dba5d0 b73072bb 08954ed0 b7368b2d b4dba5c0
    b4dba5a4 :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba5bc :00000000 b4dba600 b7368b2d 08954fd8 00000005 00000000
    b4dba5d4 :b7368b24 b4dba618 b73072bb 08954ed0 29cd10b8 b4dba608
    b4dba5ec :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba604 :00000000 b4dba648 b7368b2d 08954fd8 00000005 b4dba648
    b4dba61c :b7368b24 08954ed0 0000008d 35a893c8 29cd2300 089550e0
    b4dba634 :b4dba650 00000000 29cd22d8 b4dba680 b73072bb 08954ed0
    b4dba64c :0000008d b4dba670 b7374b02 08954fd8 08954ed0 00000000
    b4dba664 :08954fd8 b4dba6a8 b73072bb 08954ed0 b7368b2d b4dba698
    b4dba67c :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0b4dba694 :00000000 b4dba6d8 b7368b2d 08954fd8 00000005 00000000
    b4dba6ac :b7368b24 b4dba6f0 b73072bb 08954ed0 29cd48b8 b4dba6e0
    b4dba6c4 :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba6dc :00000000 b4dba720 b7368b2d 08954fd8 00000005 b4dba720
    b4dba6f4 :b7368b24 08954ed0 0000008d 35a893c8 29cd5b00 089550e0
    b4dba70c :b4dba728 00000000 29cd5ad8 b4dba758 b73072bb 08954ed0
    b4dba724 :0000008d b4dba748 b7374b02 08954fd8 08954ed0 00000000
    b4dba73c :08954fd8 b4dba780 b73072bb 08954ed0 b7368b2d b4dba770
    b4dba754 :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba76c :00000000 b4dba7b0 b7368b2d 08954fd8 00000005 00000000
    b4dba784 :b7368b24 b4dba7c8 b73072bb 08954ed0 29cd80b8 b4dba7b8
    b4dba79c :b7374b02 08954fd8 08954ed0 08954fd8 000000a0 089550e0
    b4dba7b4 :00000000 b4dba7f8 b7368b2d 08954fd8 00000005 b4dba7f8
    b4dba7cc :b7368b24 08954ed0 0000008d 35a893c8 29cd9300 089550e0
    b4dba7e4 :b4dba800 00000000 29cd92d8 b4dba830 b73072bb 08954ed0
    Code:
    b73749a2 :85ffffc0 e84d74c0 0000a0aa d689c389 e868006a 56000003
    b73749ba :c800e853 c4830000 fab4a310 1589b744 b744fab8 ffa35de8
    b73749d2 :bac189ff 000003e8 f799d089 99c189f9 53565052 00c7d5e8
    b73749ea :faaca300 1589b744 b744fab0 5be8658d 5dec895e 895590c3
    b7374a02 :10ec83e5 5d8b5356 f4c48308 8954e853 c689ffff 53f4c483
    b7374a1a :ff89a9e8 8df089ff 5e5be865 c35dec89 8955f689 5d8b53e5
    b7374a32 :0c4d8b08 8910558b b10ff0c8 c2890c53 940fca39 c0b60fc0
    b7374a4a :5dec895b 895590c3 5d8b53e5 0c4d8b08 8910558b b10ff0c8
    b7374a62 :c2891053 940fca39 c0b60fc0 5dec895b 895590c3 08558be5
    b7374a7a :8b104d8b 0ff00c45 890c4ab1 5dec89c2 895590c3 08458be5
    b7374a92 :8b5dec89 fc240440 895590c3 14ec83e5 085d8b53 8508438b
    b7374aaa :831374c0 e853f4c4 ffffc8da 000843c7 83000000 7b8310c4
    b7374ac2 :07740024 002443c7 83000000 44fa943d 097400b7 53f4c483
    b7374ada :ff9e55e8 e85d8bff c35dec89 8955f689 08ec83e5 8508458b
    b7374af2 :800d74c0 83fe0460 e850f4c4 ffffff9a c35dec89 8955f689
    b7374b0a :14ec83e5 085d8b53 3a74db85 53f4c483 ffff7de8 10c483ff
    b7374b22 :01044b80 07581d39 2274b746 fa943d83 7400b744 f4c48319
    b7374b3a :ffa8e853 c483ffff 044b8010 943d8301 00b744fa 5d8be775
    b7374b52 :5dec89e8 895590c3 08458be5 0e75c085 000001b8 8d0feb00
    b7374b6a :000026b4 408b0000 83013404 ec8901e0 8955c35d 10ec83e5
    b7374b82 :758b5356 047e8308 83437500 026af8c4 1bece856 c3890000
    b7374b9a :83f4c483 e853f4c4 ffff7e6e 3a30e850 c483fff0 74c08530
    Loaded modules:
    (* denotes the module causing the exception)
    0x08048000-0x0804ce46 /usr/local/bea/jrockit81sp4_142_08/bin/java
    0xb75e5000-0xb75e561b /etc/libcwait.so
    0xb75bf000-0xb75cb931 /lib/tls/libpthread.so.0
    0xb759d000-0xb75bde5f /lib/tls/libm.so.6
    0xb759a000-0xb759be23 /lib/libdl.so.2
    0xb7462000-0xb7593eaf /lib/tls/libc.so.6
    0xb75e9000-0xb75fdc8b /lib/ld-linux.so.2
    0xb7228000-0xb73feeef* /usr/local/bea/jrockit81sp4_142_08/jre/lib/i386/jrockit/libjvm.so
    0xb7005000-0xb700f2df /lib/libnss_files.so.2
    0xb66af000-0xb66befa5 /usr/local/bea/jrockit81sp4_142_08/jre/lib/i386/libverify.so
    0xb6681000-0xb66a0a0f /usr/local/bea/jrockit81sp4_142_08/jre/lib/i386/libjava.so
    0xb6656000-0xb66670eb /lib/libnsl.so.1
    0xb5321000-0xb5322705 /usr/local/bea/weblogic81/server/lib/linux/i686/libweblogicunix1.so
    0xb4a81000-0xb4a82eff /usr/local/bea/weblogic81/server/lib/linux/i686/libmuxer.so
    0xb3ebb000-0xb3ebe5c1 /usr/local/bea/jrockit81sp4_142_08/jre/lib/i386/libioser12.so
    0xb0fd5000-0xb0fd8133 /lib/libnss_dns.so.2
    0xb0fc3000-0xb0fd179f /lib/libresolv.so.2
    0xaeeaa000-0xaf4293ca /opt/documentum/shared/dfc/libdmcl40.so
    0xaee67000-0xaee6b1fb /lib/libcrypt.so.1
    0xaedb4000-0xaee5c9eb /usr/lib/libstdc++.so.5
    0xaedab000-0xaedb2813 /lib/libgcc_s.so.1
    Java Thread ID = 0x00001b80, lastJavaFrame = 0xb4dba06c, Name = ExecuteThread: '41' for queue: 'weblogic.kernel.Default'
    Thread Stack Trace:
    at tsiGCStateChanged+6()@0xb7374aa2
    at tsDisableGC+23()@0xb7374b1f
    at RJNI_jrockit_vm_MemSystem_getMoreTLAMemory+37()@0xb7368b05
    at jrockit/vm/MemSystem.getMoreTLAMemory(Native Method)@0xb6566d10
    at jrockit/vm/MemSystem.getMoreTLAMemoryWrapper(Native Method)@0xb6566da8
    at jrockit/vm/MemSystem.allocArray1(Native Method)@0xb65670b2
    at java/lang/StringCoding$CharsetSE.encode(Optimized Method)@0xaf903372
    at java/lang/StringCoding.encode(Optimized Method)@0xaf904a36
    at java/lang/StringCoding$DefaultEncoder.encode(Optimized Method)@0xaf904c85
    at java/lang/StringCoding.encode(Optimized Method)@0xacb2b43e
    at java/lang/String.getBytes(Unknown Source)@0xb6577440
    at java/io/UnixFileSystem.getBooleanAttributes0(Native Method)@0xb657f0e0
    at java/io/UnixFileSystem.getBooleanAttributes(Unknown Source)@0xb657f17f
    at weblogic/servlet/internal/WarClassFinder.getSource(Optimized Method)@0xacb3d89b
    at weblogic/servlet/internal/WarClassFinder.getSources(WarClassFinder.java:106)@0xb45c4f12
    at weblogic/utils/classloaders/MultiClassFinder.getSources(MultiClassFinder.java:97)@0xb45c4eaa
    at weblogic/utils/classloaders/MultiClassFinder.getSources(MultiClassFinder.java:89)@0xb45c4e0b

    Did a quick check and can't find anything obvious. Some tips:
    1) You are running on RHEL3u4, which is formally an "unsupported configuration". You should upgrade the OS to u5 or later. There are known I/O issues in RHEL3u4 and earlier. I don't think it has anything to do with your crash, but better safe than sorry. See http://e-docs.bea.com/jrockit/jrdocs/suppPlat/supp_142.html
    2) You may want to try the latest JRockit update, which you can find here: http://commerce.bea.com/products/weblogicjrockit/1.4.2/142_x.jsp
    3) If neither of the above helps, or you can't make an upgrade in your production environment, open a ticket with BEA Support. Before you do that, try to reproduce the crash after setting "ulimit -c unlimited" in the shell so that you get a proper core file.

  • How do I fix a stack overflow?

    Hi,
    Well I hope I am posting this in the right section of topics.
    I am new to programing.At the moment I am sudying loops in Java.
    I did something that has caused
    a "stack overflow" in my computer(Whatever that is).
    Is this really bad for my computer, and how do I fix it?
    thanks.

    Just to add a little more..
    The Stack is a special area of memory in the virtual machine. It stores variables that fall in and out of scope. When methods are called, the values of variables are often placed on the stack. The problem with a stack overflow arises when a method calls itself, either directly or indirectly, and never stops doing so. This could be called 'uncontrolled recursion'.
    When this happens, the stack will fill up until the method can no longer be called, and at this point a StackOverflowError will be thrown.
    It is important to note that this will not do bad things to your machine, because the stack is quite small (circa 256KB ?). If you don't catch the Error with a catch(Throwable) statement, the VM will exit automatically - all you have to do is fix the bug.

  • Stack Overflow Error for JNI program with Jdk1.3

    I wrote a JNI wrapper for a third party sofware (written in C) to use some exported functions provided. My program runs fine when using Sun JDK1.2.2, but I got the following error when using Jdk1.3 to run the program (It's a runtime error, only the version of runtime virtual machine matters.)
    # An EXCEPTION_STACK_OVERFLOW exception has been detected in native code outside
    the VM.
    # Program counter=0x9073337
    A stack overflow was encountered at address 0x09073337.
    I tried IBM jdk 1.2.2, it gave me a similar error complaining about the stack overflow error.
    The vendor of the third party software denies any wrong doing in their code and I don't have their source code. A test client (simulate the Java client) I wrote in C works perfectly fine and as I mentioned earlier the same java progarm runs OK with jdk 1.2.2, without any change to my system stack size. Does any body know what this is about and the solution for this?
    Thanks!
    My email: [email protected]

    I had the same exception occur in my JNI code and I have some advice on things to look for.
    Symptoms: The C++ code runs fine when called in an native executable but when it is wrapped by a JNI call inside a DLL you get the following exception:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_STACK_OVERFLOW occurred at PC=0x100d72e5
    Function name=_chkstk
    The address will be different of course.
    In my tests I isolated the problem to an allocation of a char array like so at the top of one of my wrapped C++ methods:
    char buf[650000];
    As you see this code is requesting 650000 bytes of stack memory. When run in a native executable there was no problem but when I ran it wrapped in the JNI call it blew up.
    Conclusion: There is a much smaller stack space when using JNI OR the added overhead of my JNI wrapper exhausted the available stack space OR this is a stack space issue related to DLLs.
    Hope this helps. Anyone with insight on this please put in your 2 cents.

  • TROUBLESHOOTING A STACK OVERFLOW ERROR

    제품 : ORACLE SERVER
    작성날짜 : 1997-02-04
    ==========================================
    TROUBLESHOOTING A STACK OVERFLOW ERROR
    ==========================================
    OVERVIEW
    A stack is a temporary storage space for programs. All programs have a
    stack. MS-DOS switches stacks for hardware interrupts to prevent stack
    overflows. Some programs such as EMM386.EXE, SMARTDRV.EXE, mouse drivers
    and TSR's will hook these hardware interrupts. When a hardware interrupt
    hook requires more stack space than is available, a stack overflow error
    occurs.
    SYNTAX
    The STACKS= command in your CONFIG.SYS specifies two parameters; the
    number of stack frames and the size of those frames.
    STACKS=x,y where x = number of stack frames
    minimum value is 8
    maximum value is 64
    y = bytes of each stack frame
    minimum value is 32
    maximum value is 512
    For most PC's the default is STACKS=9,128.
    TROUBLESHOOTING
    Perform the following troubleshooting steps prior to changing the STACKS=
    command:
    o If you are using a third party video driver reconfigure the pc to use the
    generic Windows VGA drivers.
    o Be sure you have 512K conventional RAM free before you load Windows.
    You can check the free memory by using the MEM /C command. The value
    for "Largest executable program size" should be 512k (524,288 bytes).
    o Personal Oracle7 requires 8MB RAM. An additional 8MB RAM is required
    when PL/SQL is also installed. The trial product requires PL/SQL and
    therefore automatically installs it.
    o Add the /X switch to the SMARTDRV.EXE driver in AUTOEXEC.BAT. This
    switch disables the write-behind caching.
    o Exclude the video graphics area from the memory manager.
    i.e. DEVICE = C:\WINDOWS\EMM386.EXE X=A000-C7FF
    The video driver's manufacturer can provide you with the appropriate
    range to exclude..
    o Boot clean.
    CONFIG.SYS AUTOEXEC.BAT
    ========== ============
    FILES=45 PROMPT$P$G
    BUFFERS=20 PATH=C:\WINDOWS;C:\DOS;\C:\
    DEVICE=C:\<dir>HIMEM.SYS SET TEMP=C:\<valid path>
    STACKS=9,256
    SHELL=C:\<valid path>\COMMAND.COM /E:1024 /P
    !!!CAUTION: Your system may have third-party drivers that must be
    loaded! Such drivers include hard disk drivers, disk
    partitioning disk compression utilities.
    Removing such drivers can render your hard drive
    inaccessible and/or damage your data.
    DO NOT REMOVE ANY DRIVER(S) THAT YOU CANNOT IDENTIFY ITS
    PURPOSE!
    o Add STACKS=9,256 to CONFIG.SYS. If you already have this statement
    then increase the stack frames to 16.
    The Microsoft Knowledge Base (http://www.microsoft.com/support/)provided
    technical resources for this bulletin. .............................

    The same issue seemed to be solved for me after I installed
    the ColdFusion 8 beta plug-ins for Eclipse
    http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

  • Stack overflow in JNI call

    Hi,
    I am doing a wrapper with JNI for a Windows library of image compression. I have a test program running correctly in C. This program compress data and it can move a lot of memory. If I call this program from a JNI functions I obtain a JNI error:
    An unrecoverable stack overflow has occurred.
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_STACK_OVERFLOW (0xc00000fd) occurred at PC=0x5FF88497
    Function=unpack_data+0x189D7
    Library=C:\WINDOWS\system32\NCSEcw.dll
    This error is produce inside my compression library. I try to adjust the parameters (-Xms -Xmx -Xss) of the JVM but in any case before the process ends it shows this exception. I have done other JNI interfaces and I never found with this problem before. Can anybody help me?
    Thanks in advance.

    I found in this forum a piece of code with a same kind problem but It is simpler than mine. I have proved this program in Windows and it produce the same error. In Linux it runs but if I enlarge the array largebuf it ends with the same error. In Linux I can reserve until 2 MB (in windows +-256K). Is there any way to increase the stack size in a jni call?.
    #include <stdio.h>
    #include <jni.h>
    #include "test.h"
    int myprint2(int a, int b){
         char extrabuf[100];
         printf("got here next\n");
         extrabuf;
         return 0;
    int myprint(int a, int b){
         char largebuf[260000];
         printf("got here\n");
         myprint2(1,1);
         largebuf;
         return 0;
    JNIEXPORT jint JNICALL Java_test_init(JNIEnv *env, jobject obj){
         myprint(1,1);
         return 1;
    test.java
    public class test{
         public native int init();
         public static void main(String []args){
              new test();
         public test(){
              System.loadLibrary("Nat");
              System.out.println(this.init());
    }

  • Diagnostics Workload Analysis - Java Memory Usage gives BI query input

    Dears
    I have set up diagnostics (aka root cause analysis) at a customer side and I'm bumping into the problem that on the Java Memory Usage tab in Workload analyis the BI query input overview is given
    Sol Man 7.0 EHP1 SPS20 (ST component SP19)
    Wily Introscope 8.2.3.5
    Introscope Agent 8.2.3.5
    Diagnostics Agent 7.20
    When I click on the check button there I get the following:
    Value "JAVA MEMORY USAGE" for variable "E2E Metric Type Variable" is invalid
    I already checked multiple SAP Notes like the implementation of the latest EWA EA WA xml file for the Sol Man stack version.
    I already reactivated BI content using report CCMS_BI_SETUP_E2E and it gave no errors.
    The content is getting filled in Wily Introscope, extractors on Solution Manager are running and capturing records (>0).
    Did anyone come accross this issue already?
    ERROR MESSAGE:
    Diagnosis
    Characteristic value "JAVA MEMORY USAGE" is not valid for variable E2E Metric Type Variable.
    Procedure
    Enter a valid value for the characteristic. The value help, for example, provides you with suggestions. If no information is available here, then perhaps no characteristic values exist for the characteristic.
    If the variable for 0DATE or 0CALDAY has been created and is being used as a key date for a hierarchy, check whether the hierarchies used are valid for this characteristic. The same is valid for variables that refer to the hierarchy version.
      Notification Number BRAIN 643 
    Kind regards
    Tom
    Edited by: Tom Cenens on Mar 10, 2011 2:30 PM

    Hello Paul
    I checked the guide earlier on today. I also asked someone with more BI knowledge to take a look with me but it seems the root cause analysis data fetching isn't really the same as what is normally done in BI with BI cubes so it's hard to determine why the data fetch is not working properly.
    The extractors are running fine, I couldn't find any more errors in the diagnostics agent log files (in debug mode) and I don't find other errors for the SAP system.
    I tried reactivating the BI content but it seems to be fine (no errors). I reran the managed system setup which also works.
    One of the problems I did notice is the fact that the managed SAP systems are half virtualized. They aren't completely virtualized (no seperate ip address) but they are using virtual hostnames which also causes issues with Root Cause Analysis as I cannot install only one agent because I cannot assign it to the managed systems and when I install one agent per SAP system I have the message that there are already agents reporting to the Enterprise Manager residing on the same host. I don't know if this could influence the data extractor. I doubt it because in Wily the data is being fetched fine.
    The only thing that it not working at the moment is the workload analysis - java memory analysis tab. It holds the Key Performance Indicators for the J2EE engine (garbage collection %). I can see them in Wily Introscope where they are available and fine.
    When I looked at the infocubes together with a BI team member, it seemed the infocube for daily stats on performance was getting filled properly (through RSA1) but the infocube for hourly stats wasn't getting filled properly. This is also visible in the workload analysis, data from yesterday displays fine in workload analysis overview for example but data from an hour ago doesn't.
    I do have to state the Solution Manager doesn't match the prerequisites (post processing notes are not present after SP-stack update, SLD content is not up to date) but I could not push through those changes within a short timeframe as the Solution Manager is also used for other scenarios and it would be too disruptive at this moment.
    If I can't fix it I will have to explain to the customer why some parts are not working and request them to handle the missing items so the prerequisites are met.
    One of the notes I found described a similar issue and noted it could be caused due to an old XML file structure so I updated the XML file to the latest version.
    The SAPOscol also throwed errors in the beginning strange enough. I had the Host Agent installed and updated and the SAPOscol service was running properly through the Host Agent as a service. The diagnostics agent tries to start SAPOscol in /usr/sap/<SID>/SMDA<instance number>/exe which does not hold the SAPOscol executable. I suppose it's a bug from SAP? After copying the SAPOscol from the Host Agent to the location of the SMD Agent the error disappeared. Instead the agent tries to start SAPOscol but then notices SAPOscol is already running and writes in the log that SAPOscol is already running properly and a startup is not neccesary.
    To me it comes down the point where I have little faith in the scenario if the Solution Manager and the managed SAP systems are not maintained and up to date 100%. I could open a customer message but the first advice will be to patch the Solution Manager and meet the prerequisites.
    Another pain point is the fact that if the managed SAP systems are not 100% correct in transaction SMSY it also causes heaps of issues. Changing the SAP system there isn't a fast operation as it can be included in numerous logical components, projects, scenario's (CHARM) and it causes disruption to daily work.
    All in all I have mixed feelings about the implementation, I want to deliver a fully working scenario but it's near impossible due to the fact that the prerequisites are not met. I hope the customer will still be happy with what is delivered.
    I sure do hope some of these issues are handled in Solution Manager 7.1. I will certainly mail my concerns to the development team and hope they can handle some or all of them.
    Kind regards
    Tom

  • Stack overflow resolution and question

    on Oct 8th, I posted the stack overflow at the end of this message. I
    figured out the problem, but would like some insight into why it manifested
    itself as a stack overflow. Why isn't it a heap overflow? I care which
    overflows because a problem could still exist.
    PROBLEM
    Our server transmits an event object to our client. The event object has
    references to 2 member objects which describe the context of the event.
    About 200 of each type of member object is created. They are kept in a
    HashMap so we can reuse them.
    However, in one case, a new member object is created every time an event is
    transmitted. That's the bug - about a thousand events a second are created
    so one thousand of each member object is created, then transmitted. When we
    changed the member object creation to a member HashMap lookup, the stack
    trace stopped.
    PROFILING
    To isolate the problem, we profiled the client with OptimizeIt. This
    showed about 150,000 member objects and about 148,000
    java.io.ObjectInputStream$HandleTable$HandleList instances. In some runs,
    Garbage collection reduced the number to about 60,000. In other runs,
    Garbage Collection did not run before the stack error occurred.
    If we create lots of member objects in the heap, then the heap should
    overflow. Why does the stack overflow?
    ERROR MESSAGE
    The declaration is
    Socket sock = new Socket( hostname, port );
    ObjectInputStream is = new ObjectInputStream( sock.getInputStream() );
    ObjectOutputStream os = new ObjectOutputStream( sock.getOutputStream() );
    java.lang.StackOverflowError
    at COM.jrockit.io.NativeIOInputStream.read([BII)I(Optimized Method)
    at java.io.ObjectInputStream$PeekInputStream.read([BII)I(Optimized Metho
    d)
    at java.io.ObjectInputStream$BlockDataInputStream.read([BIIZ)I(Unknown S
    ource)
    at java.io.ObjectInputStream$BlockDataInputStream.readFully([BIIZ)V(Unkn
    own Source)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    Jeff
    Jeff
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Well, the HandleList entries mark a dependency from a parent object to a
    child (i.e referer and referee), and my guess is that you at some point
    simply manage to serialize a very long object chain:
    Obj1 -[ ref to]-> Obj2 -[ref to]-> Obj3 and so on.
    This will cause a recursive deserialization (actually, it causes a
    recursive serialization also, so sender should SOE as well). The amount
    of memeory used is probably high, but not OOM high. Note, that for this
    to happen, all objects sent must be unique, which you state that they
    are. Question is how you've managed to create an object chain like this.
    Another explanation might be that there is actually a bug somewhere in
    the sender that causes a circular reference between two (or more)
    objects to be sent not as reference handles, but unique objects. I
    cannot see what would cause this though. I assume that you don't have
    concurrency issues (i.e only one thread uses the ObjectOutput/Input
    streams at one time)?
    Do you have an exact count of the transmitted object? It might help me
    figure out exactly what happend.
    /C
    Jeff wrote:
    on Oct 8th, I posted the stack overflow at the end of this message. I
    figured out the problem, but would like some insight into why it manifested
    itself as a stack overflow. Why isn't it a heap overflow? I care which
    overflows because a problem could still exist.
    PROBLEM
    Our server transmits an event object to our client. The event object has
    references to 2 member objects which describe the context of the event.
    About 200 of each type of member object is created. They are kept in a
    HashMap so we can reuse them.
    However, in one case, a new member object is created every time an event is
    transmitted. That's the bug - about a thousand events a second are created
    so one thousand of each member object is created, then transmitted. When we
    changed the member object creation to a member HashMap lookup, the stack
    trace stopped.
    PROFILING
    To isolate the problem, we profiled the client with OptimizeIt. This
    showed about 150,000 member objects and about 148,000
    java.io.ObjectInputStream$HandleTable$HandleList instances. In some runs,
    Garbage collection reduced the number to about 60,000. In other runs,
    Garbage Collection did not run before the stack error occurred.
    If we create lots of member objects in the heap, then the heap should
    overflow. Why does the stack overflow?
    ERROR MESSAGE
    The declaration is
    Socket sock = new Socket( hostname, port );
    ObjectInputStream is = new ObjectInputStream( sock.getInputStream() );
    ObjectOutputStream os = new ObjectOutputStream( sock.getOutputStream() );
    java.lang.StackOverflowError
    at COM.jrockit.io.NativeIOInputStream.read([BII)I(Optimized Method)
    at java.io.ObjectInputStream$PeekInputStream.read([BII)I(Optimized Metho
    d)
    at java.io.ObjectInputStream$BlockDataInputStream.read([BIIZ)I(Unknown S
    ource)
    at java.io.ObjectInputStream$BlockDataInputStream.readFully([BIIZ)V(Unkn
    own Source)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)
    at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O
    bjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Opt
    imized Method)
    at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i
    o.ObjectStreamClass;)V(Optimized Method)

Maybe you are looking for

  • Logon and do some Work in different Domains in one Forrest dosent work...

    Hi together.. i have the Problem that i need to maintain Groups in all Sub Locations just adding on dailybase all Users to a special Group... my Problem  is that i need to maintain these Groups in 5 Domains in this Forrest.. arround 300 Groups at all

  • Allocation Base report.

    Dear Team, I have to fect a report based on Internal order/cost center/Cost sheet wise. The  required logic will be like below: the report should show the Pool, Target, and Total amount% Through which will come to know the total all balances have bee

  • Customers-screen layout per activity/account group

    Hi Gurus! I need to set up the screen selection per activity and account group. I need extra "display only" fields on the customer change, and in a standard way i can do it but it will affect all account groups. Is there any workaround??? Thanks in a

  • GUI download, how to retain format of decimal places

    Hi everyone! I have a program that downloads data to excel file using GUI Download. The values of the amount in the ALV display are 11.90, 11.90- which is correct because it has two decimal places. But the problem now occurs in the excel file. The va

  • Nokia n95 maps licence problem and gps not working

    hi i have n95 and i formated it all and it's mass memory, now when i open maps i don't find my license, also i can't update it, i can't dowload maps for my phone, so i can't navigate without internet, also gps lock not  working and when i use pc suit