Finalization thread does not keep up with Object allocation

Hi,
I'm trying to track down a memeory leak in my program. When I use OptimizeIT I find 11,690 instances of java.lang.ref.Finalizer hanging about. I also see lots of JDBC Connection, CallableStatements, and PreparedCalls hanging around. (They are actually instances of my vendor specific classes). Those objects include a finalize() method.
Why are all these java.lang.ref.Finalizers hanging about? Why doesn't the finalization thread actually let go of them or finalize them in a timely manner! Eventually, my process runs out of memory and the Finalization thread never seems to finalize these objects. The rate at which I am newing up connections seems to be faster than the finalization thread can destory the object.
charlie
p.s.
When I go into the reference graph, there are lots of Connection objects that don't have link back to the root set. But, they are never GC'ed when I push the GC button. While OptimizeIT doesn't show the finalization thread holding a reference to them, I believe OptimizeIT 4.2 hides the java.lang.ref.Finalizer reference that points to your object. The reference inside java.lang.ref.Finalizer is actually inside a super class called java.lang.ref.Reference. Why I don't know? But, someone with OptimizeIT 4.1 said that they see more information than I do in OptimizeIT 4.2. Also when I do a show Outbound References I don't see the instance members for the super class. (Namely java.lang.ref.Reference.referent) Is anyone familiar enough with OptimizeIT as to why this is occuring?

>
Well thanks for the advice, jschell, but I am cleaning
up my connections by calling close(). But, keep the
great advice coming. I didn't think this forum had
quite enough worthless, cynical advice. For the
benefit of developers who read this forum for some
worth while advice. I'll post my findings.
Hmmmm...others seems to think my advice is worthwhile.
Some have even come to think that my advice is worthwhile after posting remarks like the one above.
What's really interesting about this problem is that
this has nothing to do with whether you call close()
or not. In fact, you could've called close() and
cleaned up properly, and your program could still leak
memory! It hinges on objects that implement the
finalize() method.
Your program, or third party libraries, or even the JVM can leak memory.
My JDBC vendor, like many, includes a finalize()
method in the implemention classes of Connection,
ResultSet, PreparedCall, etc. Naturally, this is to
clean up a connection when a programer has lost a
reference to a connection without calling close, but
it has a serious side effect.
Could be.
And your JDBC vendor would be?
I certainly know of JDBC vendors who do use finalize. Seems reasonable since the JDBC spec suggests it.
And I have used JDBC drivers that use it in 24x7 server operations and I have not traced a leak to those drivers yet.
So to my mind that suggests that finalize by itself is not a problem.
I've tested this will a class that simply does a wait()
call in its finalize() method. Then I allocate lots
of other objects that contain a finalize() method,
and watch the free memory fall. Just as a guess I would say that that is a really bad thing to do. My first guess would be that it would just lock up the JVM. Since it doesn't that would suggest that the JVM is creating one or more threads to call finalize.
Threads take memory.
And when you call wait you suspend those thread indefinitely.
So I would expect to see memory fall.
>
Seems like to me that it's better to leak memory, than
to try to clean up for the programmer. While
researching this problem I ran across a long post on
the .NET mailing list on finalization in .NET, and
they seem to say the same thing that Sun says which is
that the use of a finalize() method that the system
will call implicitly is a bad thing. You should
always use an explicit call like close().
I would guess that memory collection in .Net is going to be less robust than in java. It simply hasn't been around long enough.
While the fix for my problem is quite simple, remove
the finalize() method from the wrapper class. But, I
haven't run across any documenation on Sun's site or
the internet that has run across a memory leak quite
like this.
I however, have read, and participated in quite a few threads on this site where many people have suggested that you should never use finalize.
I think there are even a couple examples that show exactly how using finalize can generate memory leaks.

Similar Messages

  • Sequence does not keep up with playhead on timeline. Shouldn't it?

    Hi!
    When I view a sequence of clips on the canvas, I expect the timeline sequence to keep moving left off screen as the playhead moves right. Instead, the playhead disappears off screen to the right and the sequence of clips remains on the starting blocks. At the moment, I keep up with the playhead using the left/right scroll on MM. Is there a way of automatically syncing - on screen - the movement of clips and playhead?
    Regards.

    Nope. FCP doesn't work that way.
    If you believe it should, send the FCP team feedback using the FEEDBACK selection under the FCP item located in the FCP Menu bar.
    x

  • Coverflow does not keep up with songs

    I have my touch set up on the little plastic stand on my desk at work and have a playlist selected and playing. It is turned longways obviously to sit in the stand. Coverflow never changes unless you physically pick up the touch and turn it round, that triggers the change. Annoying - it should change as the playlist moves to a new song. Also on coverflow , you cannot adjust volume, etc, again you have to take it out of the stand and flip it around. Since they give you the stand , it would be nice to have more functionality in that mode.

    Already covered, see THIS THREAD
    Please send Apple feedback:
    http://www.apple.com/feedback
    Scott

  • Extending view object which does not have any entity object associated with

    Dear all
    I am interested in extended on of the standard pages VO object in JDeveloper OA extension
    the standard page is oracle/apps/pos/supplier/....suppSummaryPG
    and one of the view which I am interested to extend is suppSummVO
    the problem is that when I copy xml files and java files from apps server to
    my local jdevelope folder , I am not able to open that suppSummVO, the changes which
    I find from other VO object and this(suppSummVO) object is that, this VO does not have any
    Entity Object associated with it and the only query is return on this VO , is it the reason that
    I am not able to open it Jdeveloper, but the real issue is that how can I extends this type of VO
    in my OAExtension.
    Regard
    Noman

    Its the same way of extending VO with EO's or without EO's.
    Sometimes if the .class files arn't decompiled we get weird jbo errors. So use cavaj/jad to decompile those Impl.class, RowImpl.class files and keep them in the same folder as vo.xml in myprojects and try extending that VO.
    Thanks,
    Ravi

  • The property with ID SI_LOGON_INFO does not exist in the object

    Hi Experts,
    I am writing a Java code which upload rpt report to an infoview and try to set username/password and user prompt false together.
    I uploaded rpt success, however, after I add IReportLogon to add user/password. I got an error.
    The property with ID SI_LOGON_INFO does not exist in the object
    Code here, any suggestion is appreciated.
    IPluginMgr boIPluginMgr = infoStore.getPluginMgr();
    IPluginInfo boReportPlugin = boIPluginMgr.getPluginInfo("CrystalEnterprise.Report");
    IInfoObjects boInfoObjects = infoStore.newInfoObjectCollection();
    boInfoObjects.add(boReportPlugin);
    IInfoObject boReportObject = (IInfoObject) boInfoObjects.get(0);
    String boReportName = getName(filePath);
    boReportObject.setTitle(boReportName);
    boReportObject.setDescription(filePath);
    boReportObject.getFiles().addFile(filePath);
    boReportObject.properties().setProperty(CePropertyID.SI_PARENTID, folderID);
    IReport Report = (IReport)boReportObject;
    IReportLogon rptLogon = (IReportLogon) Report.getReportLogons().get(0);     
    //get error after try to retrieve rptLogon Class.     
    rptLogon.setPromptOnDemandViewing(false);
    rptLogon.setUserName("fortest");
    rptLogon.setPassword("whatever");
    infoStore.commit (boInfoObjects);

    Hi Adam,
    Thanks for your reply.
    I added this refreshProperties() method before, but after run this method, the application will no response even wait for over 2 minutes.
    Do you know why?
    or shall I wait for long time to resolve this issue?

  • The property with ID SI_DELTA_METAINFO does not exist in the object

    Hi ,
    when i moved crystal reprts from our Crystal server to the new BOBJ (BOExi3.1) Server and on DB configuration for all the reports i used the DB defaults that comes with the Report.
    Problem when i try to run locally or run from the enterprise login it works perfect, but when i try to run the report from the Infoview it says Database Information is either Incorrect or Incomplete.
    and also when i goto report and change the DB configuration it throws this error as
    "The property with ID SI_DELTA_METAINFO does not exist in the object".
    Please throw some light on the above error as i need to make it available for our end-users ASAP.
    regards,
    Sethu.

    Hi Seth,
    I looks like you have a configuration issue in BOE so I moved your post to the Admin forum.
    You also likely have a support Contract so I suggest you create a case in Service Market Place to immediate assistance. This is a public forum that may or may not be monitored by SAP Support Rep's, depending on the case load.
    Thank you
    Don

  • The property with ID SI_FILES does not exist in the object

    Hi,
    We are accessing the BO reports through front End web application using WEBI. We are using BO Java SDK on the application for this purpose.
    Some of our users (APAC region) has started getting the error while accessing the reports from web application. Here are the error:
    com.crystaldecisions.sdk.exception.SDKException$PropertyNotFound: The property with ID SI_FILES does not exist in the object [24/01/12 13:27:39:402 GMT] 000000b6 SystemErr R at com.crystaldecisions.sdk.occa.infostore.internal.ag.getFiles(Unknown Source)
    [24/01/12 13:27:39:402 GMT] 000000b6 SystemErr R at com.crystaldecisions.sdk.occa.infostore.internal.AbstractSendableObject.getFiles(Unknown Source)
    Same report when accessed by the users from AMER or EMEA region, it is working fine. Can anyone help me what is the issue and how to resolve it?
    Thanks,
    Ashok

    what version of Enterprise is this? XI 3.1, Bi 4.0? Also what version pack are you running. I am asusming that APJ and EMEA\AMER users try to hit the same web\app server\ BOE, same application and access same reports. What kind of authentication you use? Given everything else is same it's got to be security issue? Does APJ users are part of a different group in your 3rd party auth server such as LDAP or AD?
    Edited by: Aasavari Bhave on Jan 25, 2012 2:55 PM

  • When I download my i tunes music from computer it does not keep my greatest hits albums from certain artists together it scrambles them with other artists is this because of the way I have my music library on my computer set up.

    When I download my i tunes music from computer it does not keep my greatest hits albums from certain artists together it scrambles them with other artists is this because of the way I have my music library on my computer set up.

    See Grouping tracks into albums.
    tt2

  • T400 does not start up with a battery and AC, but starts up with only AC.

    I bought T400, 7417-CTO in Jan 2010. My T400 does not start up with a battery and AC power. I tried to start with only AC power after pulling out the battery, it worked fine. Even when I inserted the battery in T400, which was running perfectly with AC only, T400 seems to lose the power - more strictly speaking, it kept stoping and re-running several times, and finally it dead.
    a few possibilities
    1) a battery is dead - but it does not explain the failure with both AC and battery
    2) some hibernation issue - I plugged in and out the DIMM, and clock battery. I tried to keep pushing the power button trick, but it didn't work
    3) Mother board failure??
    I really appreciate if you give me some advice on it.
    Wanyong

    Thanks for all your kind and helpful comments.
    Unfortunately, I don't have any friends who have Lenovo - or I don't have many friends here since I moved in the last summer. ;-)
    After purchasing a new battery, I will update it. Hope that this thread helps someone who had/will have same prob. as mine.
    -WS

  • Error ACLContainer: 65315 does NOT EXIST in  the Object Cache for parentID:

    Expert,
    I did the following steps to upgrade the OWB repository from 10g to 11g
    • Created a dummy workspace in the 11.2 repository
    • Created users in the destination environment
    • Run Repository Assistant against the 11.1 source database
    • Then selected *“Export entire repository to a file”* and selected the MDL(10g) to import
    After 99% of completing I have got the below error
    Error ACLContainer: 65315 does NOT EXIST in  the Object Cache for parentID: 65314
    Please let me know the solution.
    Thanks,
    Balaa...

    Hi I had the same error and worked on it for almost a week with no success but there is few work around for this try it it might work for you.
    Step 1>Run a health check on OWB 10.2 enviroment(make sure you clone your OWB 10.2 enviroment and then do this healthcheck ,these checks are tricky )
    refer
    Note 559542.1 Health Check of the Oracle Warehouse Builder 10.2 Metadata Repository
    This will give you info about your missing ACL
    Step 2> download these two scripts fixLostACLContainer.sql ,fixAllACLContainers.sql
    please refer :
    Note 559542.1 Health Check of the Oracle Warehouse Builder 10.2 Metadata Repository
    OWB 10.2 - Internal ERROR: Can not find the ACL container for object (Doc ID 460411.1)
    Note 754763.1 Repository Cleanup Script for OWB 10.2 and OWB 11.1
    Note 460411.1 Opening Map Returns Cannot find ACL Containter for Object
    Note 1165068.1 Internal Error: Can Not Find The ACL Containter For for object:CMPPhysical Object
    It might resolve this ACL issue but it did not work for me.
    If none of these work then
    Perform export from design center of OWB 10.2 and import through design center of OWB 11.2.(ONLY OPTION)
    It worked for me.
    Varun

  • How do I keep format when copying a table to keynote? paste and match style does not keep format

    how do I keep format when copying a table to keynote? paste and match style does not keep format

    It used to work until recent updates and it is very frustrating.....I hope someone out there knows how to deal with this.

  • FileUpload problem: InputStream does not contain a serialized object

    Hi All,
    I'm using the FileUpload component in a JSPDynPage and the htmlb component seems to work fine but I cannot read the file (InputStream). I get the following error(IOException): "InputStream does not contain a serialized object".
    Please let me know what is wrong with my code. This is a part of the code I used:
    public FileInputStream sourceFileInput;
    public ObjectInputStream input;
    FileUpload fu;
    fu = (FileUpload) this.getComponentByName("myFileUpload");
    IFileParam fileParam = ((FileUpload) getComponentByName("myFileUpload")).getFile();
    File f       = fileParam.getFile();
    file         = fu.getFile().getFile();
    absolutepath = fu.getFile().getFile().getAbsolutePath();
    this.sourceFileInput = new FileInputStream(file);
    input = new ObjectInputStream(sourceFileInput);
    The last line of code seems to generate te error.

    Hi,
    I have found the answers, thank you both.
    (I included the examle code. Perhaps of some use to someone.)
    FileUpload fu;
    fu = null;
    fu = (FileUpload) this.getComponentByName("myFileUpload");
    //       this is the temporary file
    if (fu != null) {
         IFileParam fileParam = ((FileUpload) getComponentByName("myFileUpload")).getFile();
         if (fileParam != null) {
              // get info about this file and create a FileInputStream
              File f = fileParam.getFile();
              if (f != null) {
                   try {
                        fis = new FileInputStream(f);
                   // process exceptions opening files
                   catch (FileNotFoundException ex) {
                        myBean.setMessage(
                             "1" + f + ex.getLocalizedMessage());
                   isr = new InputStreamReader(fis);
                   br = new BufferedReader(isr);
    String textLine = "";
    do {
         try {
              textLine = (String) br.readLine();
         } catch (IOException e) {
              myBean.setMessage(
                   "1" + e.getLocalizedMessage());
         // Jco append table & put data into the record
         // (I_FILE is the table with txt data that is sent to the RFC)
         I_FILE.appendRow();     
         I_FILE.setValue(textLine, "REC");                              
    } while (textLine != null);

  • Why do my songs and audio books keep getting erased when I add a new book?  Now some books will not play and the iPod does not keep track of where I was when I pause a book, leave for music and then go back!

    About a month ago I added some new audio books to my iPod Classic and then after disconnecting, I discovered EVERYTHING had been erased. 
    I had to restore through my iTunes but then I could not load my music back on.
    I uninstalled / reinstalled iTunes and completely reformated the iPod drive.
    I successfully got my music and books back on but then added a new book two days ago only to discover everything got erased AGAIN!!!
    Of course, my 1 Year Warranty was up about a week before the first incident.....
    I formatted the iPod again, uninstalled / reinstalled iTunes (it was freezing during sync) and downloaded all my music and books again.
    Now I have several books that will not play (they play on iTunes and they played on the iPod before all these events) and the iPod does not keep track of where I was in a book when I have to stop and go to something else.
    Does anyone know what is going on with this thing???  I have a 5th Gen Video and in all the years I've had it, I've NEVER had problems like this! 
    Does anyone have any ideas on what I can do to get my iPod Classic up and running properly again?
    Thanks.

    When iTunes/iPod sync process failed due to timeout, the iPod, has only the initilaised  filesytem structure at the start of the Sync.
    The timeout failure could be due to
    Bad hardisk - do the iPod disk diagnostic, refer to this excellent post by tt2
    Slow USB port or resource - Dont use any USB hub, disconnect all other USB devices while syncing
    Timeout due to Antivirus or other plugins - disconnect from Internet and stop the Antivirus or monitoribng software if you are syncing.
    Preferably stop doing other things while syncing this ancient device, which the latest iTunes designer, think will soon be extinct.
    Have a nice day!

  • New FocusTraversalPolicy Mechanism Does Not Work Well With OO Designs

    I would like to complain about the new focus traversal mechanism not working well with object-oriented GUI designs.
    Specifically, we have many reusable panel classes that can be swapped in and out of reusable dialog classes. On some of these panels, the default focus traversal is not what is desirable, perhaps because one component on the right side of the window is just slightly higher than a component on the left side, maybe due to the component on the right having a label on top, and so the default focus goes to the component on the right instead of the left. So we have a need to be able to explicitly define the order of components in some panels.
    If I try to define a focus traversal policy in the panel's constructor, a NullPointerException is thrown because the panel's focus cycle root is null (the panel has not been added to any dialog or frame yet).
    If I try to associate a focus traversal policy at the dialog level, it would have to explicitly reference its child panels' inner components, which would break the encapsulation of the panels. It would also make it hard to have generic dialog classes into which various reusable panel objects can be swapped.
    Someone suggested making each panel a focus cycle root. This makes it hard to "break out" of one panel to move on to the next panel in the dialog. Special keys would have to be assigned to try to cycle out, and these keys would have to be different than the normal traversal keys, making them inconsistent and nonintuitive to the user. Also, the focus policy would have to know if the dialog had more than one panel, what order the panels were in to know whether to cycle to the next panel or not, etc. This is a mess.
    Does anyone have any idea how to get around these problems? I have tried using a global focus policy with a global hash map of prev/next component key-value pairs, but we are still running into trouble with some deeply nested tabbed dialogs. It's just not possible to always have the focus cycle root in existence at the point where you want to explicitly define traversal between two components, or when you are trying to establish the default component for a panel in a tabbed pane.
    Has anyone else run into similar issues?
    Robbie Gilbert
    [email protected]

    I agree completely. One of the popular consultants on this forum stated that the new focus mechanism was more versatile and only a little more complex. I would say it's more than a little complex given the trouble average programmers are having understanding how it works...at least at first...and after understanding it realizing that they are going to have type their fingers off to update their code. Oh, and the dread of maintaining this awful mess.
    I'm currently having the same problem as you Robbie. Some of my reusable panels need special tab ordering...that's not usually a problem, in most programming environments, till now. Now I have to go around the world and back just to get my stupid cursor to be in the right place when I hit the tab key??!!! and special key mappings just to get out of a focus cycle...lame.
    And how is an IDE graphical designer going to work with this? It's not, that's how...ok maybe if some kind person or company creates a custom focus traversal policy editor of some kind, I don't know.
    Good grief Sun! We need something to help us meet our deadlines, not solutions that force us to spend 80% of our time customizing every stinking bit of UI functionality we need!!!
    JTables are even worse. I've mastered most of the garbage that is JTable after many months of pain and I don't know how I'm going to help my peers understand them in any short amount of time. Most of them were Oracle Forms programmers, not that that is any great solution either. But they will likely have problems.
    In conclusion, I wish I had chosen another UI technology for our new product client, and may yet.

  • Profiling application but component does not appear in Live Objects

    I have built an application using Flash Builder 4.6 and Flex SDK 4.6, which consists of many custom-built components, some of which are vast and contain lots of code. When I run the application, one of the components which loads using PopUpManager is causing the memory usage in Task Manager to increase and despite closing/reopening the component, the memory usage never goes down, only up. Eventually the process runs out of memory and crashes.
    So I'm trying to profile the application. When I run the profiler, I can see all the classes opening into the Live Objects window. However when I load the component which is eating the memory, it appears in my application but does not appear in Live Objects, nor does any of its children.
    What would cause this to occur?
    Also am I doing the right thing by using components or should I be using modules instead?

    hi Venkat,
    it seems that 0sold_to not assigned to any infoobject catalog, you can try modify it with RSD1, to bring it to infoobject catalog, you can choose one infoobject catalog right click, change, and move 0sold_to from left to right and activate the infoobject catalog or use following function module (SE37)
    hope this helps.
    RSDG_IOBC_REORG
    Import parameter Value
    I_OBJVERS A
    I_PROGRESS
    I_IOBJTP *
    I_ALL_IOBJ X
    I_T_IOBJNM 0 entries
    I_BYPASS_BUFFER
    F8 -> Execute
    Note 573421.

Maybe you are looking for

  • Unable to Display Signature Image in Siebel BI Report

    Hi, I have been trying to display a signature in a report but when I run the report the place where the signature should be is empty. I have searched through the log file but there is no error indicating anything is wrong. Siebel has an out of the bo

  • Unable to do PGI, Goods Movement error

    Hi I am working on IDES after very longtime, This is regular posting period error. When I try to do PGI I am getting error " Posting only possible in periods 2002/11 & 2002/10 in company code 3000" . Then I had opened posting periods in OB52 for peri

  • Question my illustration dont work on windows 7

    hi my name is francisco rodriguez and i won to inscription on adobe and i have one problem i have illustration.10.3 bout is not work on windows7

  • HELP Linksys WRT300N v2 after Upgrade death

     To upgrade the router from firmware version 2.00.8, it requires   two steps as follows:   step 1) Upgrade the router using the bin file called: wrt300n.bin   step 2) Upgrade the router using the bin file called : wrt300n-2.00.20.bin step 1 upgrade r

  • Can´t open links from other applications, "Firefox no responde..."

    When I try to do so, I get a pop-up saying firefox doesn´t respond ( In Spanish: "Firefox se está ejecutando, pero no responde. Para abrir una nueva ventana, primero debe cerrar el proceso Firefox existente, o reiniciar su sistema.") I´ve already res