Problem : Application run out of memory while processing image I/O.

Hi,
I have coded an application (utility) for creating scaled (JPEG) images (thumb nails) and writing (saving) them to files. I tried this with both imageio package of jdk1.4 and com.sun.image.codec.jpeg.* classes of earlier version. Application works with both versions but when I execute it for more (say more than 10 images) images, system becomes very slow and application starts throwing a memory related (OutOfMemoryError) error. Is it that objects of java image related classes consume too much memory ? How to solve this problem ? (My system run P4 processor with 256 MB RAM).
Awaiting solution,
Thanx and regards,
IB

So I am not alone in this...
I wrote the jpeg thumbnail generating code over a year ago and now when I am ready to use it in the finished app. I noticed that each process (as monitored using Forte 3's execution window) that instantiates a new ImageIcon object is never killed by the JVM. As more and more processes are started for distinct tasks they build up endlessly. Here's the method which is almost identical to the test code provided in sun's tutorial for generating thumbnails from jpeg and gif image files (http://developer.java.sun.com/developer/TechTips/1999/tt1021.html) :
public boolean createThumbImage(int maxDim) throws EntegraEntityException {
     * Reads an image in a file and creates
     * a thumbnail in another file.
     * @param this.getImagePath() The name of image file.
     * @param thumb The name of thumbnail file. 
     * Will be created if necessary.
     * @param maxDim The width and height of
     * the thumbnail must
     * be maxDim pixels or less.
       String thumbsource =  this.path + this.filename;
       String thumbdest = this.path + "thumbs_" + maxDim + File.separator/*"\\"*/ + Utilities.replaceString(Utilities.replaceString(this.filename," ","_","ALL").trim(),"[.][a-zA-Z]*",".jpg","ALL");
   //  System.out.println("thumbsource in createthumbimage(): " + thumbsource + "\n");
   //  System.out.println("thumbdest in createthumbimage(): " + thumbdest + "\n");
        try {
            // Get the image from a file.
            java.awt.Image inImage = new ImageIcon (thumbsource).getImage();
            // Determine the scale.
         double scale = (double)maxDim/(double)inImage.getHeight(null);
            if (inImage.getWidth(null) > inImage.getHeight(null)) {
                scale = (double)maxDim/(double)inImage.getWidth(null);
            // Determine size of new image.
            //One of them
            // should equal maxDim.
            int scaledW = (int)(scale*inImage.getWidth(null));
            int scaledH = (int)(scale*inImage.getHeight(null));
            // Create an image buffer in
            //which to paint on.
            BufferedImage outImage =
              new BufferedImage(scaledW, scaledH,
                BufferedImage.TYPE_INT_RGB);
            // Set the scale.
            AffineTransform tx =
              new AffineTransform();
            // If the image is smaller than
            //the desired image size,
            // don't bother scaling.
            if (scale < 1.0d) {
                tx.scale(scale, scale);
            // Paint image.
            Graphics2D g2d =
             outImage.createGraphics();
            g2d.drawImage(inImage, tx, null);
            g2d.dispose();
            // JPEG-encode the image
            //and write to file.
            Utilities.fileMakeDirs(this.path + "thumbs_" + maxDim + File.separator/*"\\"*/);
            Utilities.fileMakeFile(thumbdest);
            OutputStream os =
             new FileOutputStream(thumbdest);
            JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
            encoder.encode(outImage);
            os.close();
            return true;
        } catch (IOException e) {
            throw new EntegraEntityException("IO exception creating thumbnail for Image object ID: " + this.getId() + " ::",e);
        } catch (EntegraFileIOException fi) {
            throw new EntegraEntityException("File IO exception creating thumbnail for Image object ID: " + this.getId() + " ::",fi);
    //    return false; //Never reached. Since it doesn't live in the "try" block but must be here to ensure method body gets a return value.
}:During my troubleshooting of the method execution yesterday I discovered that the stuck process only occurs as a consequence of the line shown in bold below :
java.awt.Image inImage = new ImageIcon (thumbsource).getImage();
:this indicates to me that there is something wrong with how either the Image object or the ImageIcon file resources are allocated. At first I tried using the "flush()" method of the java.awt.Image class to release the resources to no avail, later I was able to confirm that the error does not occur for the default constructor of ImageIcon only for the one that specifies the source path (as shown in the line above) this indicates that a fileIO stream is being created and probably not being released inside ImageIcon or Image, but since that stream is probably private to those core classes we can't access it to close() it properly. I sure hope I am wrong on this or there is an alternative to using these classes..
Please let me know if any of you have other ideas on how to quash this bug or can otherwise find flaws in my logic for it's occurance.
Regards,
Sent2null

Similar Messages

  • Running out of memory while using cursored stream with large data

    We are following the suggestions/recommendations for the cursored stream:
    CursoredStream cursor = null;
              try
                   Session session = getTransaction();
                   int batchSize = 50;
                   ReadAllQuery raq = getQuery();
                   raq.useCursoredStream(batchSize, batchSize);
                   int num = 0;
                   ArrayList<Request> limitRequests = null;
                   int totalLimitRequest = 0;
                   cursor = (CursoredStream) session.executeQuery(raq);
                   while( !cursor.atEnd() )
                        Request request = (Request) cursor.read() ;
                        if( num == 0 )
                             limitRequests = new ArrayList<Request>(batchSize);
                        limitRequests.add(request);
                        totalLimitRequest++;
                        num++;
                        if( num >= batchSize )
                             log.warn("Migrating batch of " + batchSize + " Requests.");
                             updateLimitRequestFillPriceForBatch(limitRequests);
                             num = 0;
                             cursor.releasePrevious();
                   if( num > 0 )
                        updateLimitRequestFillPriceForBatch(limitRequests);
                   cursor.close();
    We are committing every 50 records in the unit of work, if we set DontMaintianCache on the ReadAllQuery we are getting PrimaryKeyExceptions intermittently, and we do not see much difference in the IdentityMap size.
    Any suggestions/ideas for dealing with large data sets? Thanks

    Hi,
    If I use read-only classes with CursoredStream and execute the query within UOW, should I be saving any memory?
    I had to use UOW because when I use Session to execute the query I get
    6115: ISOLATED_QUERY_EXECUTED_ON_SERVER_SESSION
    Cause: An isolated query was executed on a server session: queries on isolated classes, or queries set to use exclusive connections, must not be executed on a ServerSession or in CMP outside of a transaction.
    I assume marking the descriptor as read-only will avoid registering in UOW, but I want to make sure that this is the case while using CursoredStream.
    We are running in OC4J(OAS10.1.3.4) with BeanManagedTransaction.
    Please suggest.
    Thanks
    -Raam
    Edited by: Raam on Apr 2, 2009 1:45 PM

  • RT-Target running out of memory while writing to Network Stream

    Hey there,
    I have a program, that transfers acquired data from the FPGA to the Host-PC. The RT-VI reads the data from the DMA-FIFO and writes it onto a Network Stream (BlockDiagram.png).
    Now I am experiencing a phenomenon, that the RT-Target loads its RAM until it's full, and crashes.
    I have no idea, why this happens, the buffer of the Network Stream is empty, all elements are read by the Host, and there is no array built by indexing or so.
    Has anybody an idea, how I can handle this?
    Best regards,
    Solved!
    Go to Solution.
    Attachments:
    BlockDiagram.png ‏43 KB
    DSM.png ‏78 KB

    Hey there,
    I got the problem solved,
    the problem was, the buffer of the sender endpoint was too big. Unlike this problem: http://digital.ni.com/public.nsf/allkb/784CB8093AE30551862579AB0050C429, it wasn't memory growth because of dynamic memory allocation,
    it's just the normal speed of the cRIO while allocating the buffer memory. Setting the sender buffer much smaller, memory growth stops at a specific level (DSM2.png).
    It's only strange, that memory usage grows that slowly, despite creating the endpoint with preallocated buffer, while usage sinks rapidly when the VI-execution stops...
    Best regards...
    Attachments:
    DSM2.png ‏63 KB

  • I have windows 7I have downloaded most updates and use no mobile devices just use itunes my pc. what programs can I eleminate as I'm running out of memory?

    What itunes/sony programs can I elimnate from my pc if I only use it on my pc?  I have no mobile devices and afraid Im have sony, safari browser and other programs on my computer. I routinely down loaded all updates and afraid I have many uneeded programs and also have problems of running out of memory, can somebody help

    Thank you for your quick response, BalusC. I really appreciate your answer.
    Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
    Best Regards, Ailsa

  • Problems with PNGs... Overall compression + Running out of memory!

    We're having a number of issues with PNGs while working on our first iPhone project, and any assistance would be greatly appreciated!
    Our game is using a large number of PNG assets, some of which are full-frame (though the full-frame files tend to mostly be transparent/use alphas, though apparently that doesn't help memory issues much).
    We're running into two huge problems -
    1) We're running out of memory on device when calling to these full frame sequences, which tend to be anywhere from 10-40 frames each at anywhere from 50 to 250kb in size.
    2) Our overall package size is huge, sitting at around 60mb. I've already compressed the pngs through photoshop to the best of my ability, and I'm not having much luck with downloadable compressors like pngcrush. IS there a way to compress all the pngs through xcode/c++/objective C? The programmers are informing me right now that the only compression possible is whatever I apply directly to my pngs on my end - nothing through code.
    I'm stumped as to how I'm seeing seemingly-complex apps with plenty of content at 1-5mbs, and running smoothly with full-frame animations. I'm imagining the problem is that we're not using a proprietary engine to properly manage things, but I'm wondering if there is a simple solution.
    Thanks in advance, guys!
    P.S. - Already done a bunch of research on my own, and not having much luck. Just wondering if there is something obvious that both the programmers and I are missing!

    * Make image frame smaller? A fully transparent border around an image is pure overhead -- there is still data in the actual pixels (even though you cannot see them), plus the transparent border itself. All it needs is an x/y coordinate and a tiny code adjustment.
    * Use less transparency bits? Perhaps you could do with 1-bit transparency on some images. It'll use 1/8 times the memory (well, globally).
    * Use less colors? 24 bit color might compress down to 16 bits without visual artifacts (esp. when you don't have lots of gradients). Perhaps even 8 bit palettized.
    * Make images smaller? You might be able to get away with enlarging some images.
    Just a few things you could check right away, without major rewrites.

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • System hanging when it runs out of memory

    Hello,
    my system has a finite amount of RAM and swap (it doesn't matter, to my purpose, if it's 16GB or 128MB, I'm not interested in increasing it anyway).
    Sometimes my apps completely use all the available memory. I would expect that in these cases the kernel kills some apps to keep working correctly. The OOM Killer exists just for this, doesn't it?
    What happens, instead, is that the system hangs. Even the mouse stops working. Sometimes it manages to get back to life in a few seconds/minutes, other times hours pass by and nothing changes.
    I don't want to add more memory, I just want that the kernel kills some application when it's running out of memory.
    Why isn't this happening?
    Right now I'm writing a bash script that will kill the most memory-hungry process when available memory gets below 10%, because I'm sick of freezing my machine.
    But why do I have to do this? Why do I need an user space tool polling memory usage and sentencing applications according to a cheap policy? What the hell is wrong with my OOM Killer, why isn't it doing is job?!

    Alright, you won, now quit pointing out my ignorance
    Your awkish oom killer is a lot cooler than mine, switching to it, thanks!
    I did some testing (initially just to test the oom killing script) and found out that if a program tries to allocate all the memory it can, it gets eventually killed by linux's oom killer. If instead it stops allocating new memory when there are less than 4MB of free memory (or similar values) the OOM won't do anything, and the system will get stuck, like if a forkbomb was running.
    That's it, this program with MINSIZE=1 will be killed, while with MINSIZE=4MB will force me to hard reboot:
    #include <string.h>
    #include <stdlib.h>
    #define MINSIZE (1024*1024*4) // 4MB
    int main( )
    int block = 1024*1024*1024; // 1GB
    void *p;
    while( 1 ) {
    p = malloc( block );
    if( p ) {
    memset( p, 85, block );
    else if( block > MINSIZE ) {
    block /= 2;
    return 0;
    Guess I'd need to go deeper to understand why Linux' oom killer works like that, but I won't (assuming the oom killing script will behave).

  • Finale running out of memory

    Mac Pro 3.5GHz 6-core Intel Xeon E5
    Memory:  16GB 1867 MHz DDR3
    IT of Flash
    I am running OSX 10.9.5
    The problem occurs when I use Finale 2014 3.4736  (latest version) music notation application with Garritan for Finale
    Shortly after starting work on a small vocal score with piano accompaniment I am faced with the warning:
    "Finale has run out of memory. Please save your work and quit".
    No other applications are running.
     How can this be?
    Help is needed
    Thanks Sion
    Back

    Hi ..
    If you can, don't run other memory intensive apps while using the Finale app.
    Open the Activity Monitor located in HD > Applications > Utilities then select the Memory tab.
    From there you can see which apps are using the most RAM. (memory)

  • Oracle 9i running out of memory

    Folks !
    I have a simple 3 table schema with a few thousand entries each. After dedicating gigabytes of hard disk space and 50% of my 1+ GB memory, I do a few simple Oracle Text "contains" searches (see below) on these tables and oracle seems to grow some 25 MB after each query (which typically return less than a dozen rows each) till it eventually runs out of memory and I have to reboot the system (Sun Solaris).
    This is on Solaris 9/Sparc with Oracle 9.2 . My query is simple right outer join. I think the memory growth is related to Oracle Text index/caching since memory utilization seems pretty stable with simple like '%xx%' queries.
    "top" shows a dozen or so processes each with about 400MB RSS/SIZE. It has been a while since I did Oracle DBA work but I am nothing special here. Databse has all the default settings that you get when you create an Oracle database.
    I have played with SGA sizes and no matter how large or small the size of SGA/PGA, Oracle runs out of memory and crashes the system. Pretty stupid to an Enterprise databas to die like that.
    Any clue on how to arrest the fatal growth of memory for Oracle 9i r2?
    thanks a lot.
    -Sanjay
    PS: The query is:
    SELECT substr(sdn_name,1,32) as name, substr(alt_name,1,32) as alt_name, sdn.ent_num, alt_num, score(1), score(2)
    FROM sdn, alt
    where sdn.ent_num = alt.ent_num(+)
    and (contains(sdn_name,'$BIN, $LADEN',1) > 0 or
    contains(alt_name,'$BIN, $LADEN',2) > 0)
    order by ent_num, score(1), score(2) desc;
    There are following two indexes on the two tables:
    create index sdn_name on sdn(sdn_name) indextype is ctxsys.context;
    create index alt_name on alt(alt_name) indextype is ctxsys.context;

    I am already using MTS.
    Atached is the init.ora file below.
    may be I should repost this article with subject "memory leak in Oracle" to catch developer attention. I posted this a few weeks back in Oracle Text groiup and no response there either.
    Thanks for you help.
    -Sanjay
    # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    # Cache and I/O
    db_block_size=8192
    db_cache_size=33554432
    db_file_multiblock_read_count=16
    # Cursors and Library Cache
    open_cursors=300
    # Database Identification
    db_domain=""
    db_name=ofac
    # Diagnostics and Statistics
    background_dump_dest=/space/oracle/admin/ofac/bdump
    core_dump_dest=/space/oracle/admin/ofac/cdump
    timed_statistics=TRUE
    user_dump_dest=/space/oracle/admin/ofac/udump
    # File Configuration
    control_files=("/space/oracle/oradata/ofac/control01.ctl", "/space/oracle/oradata/ofac/control02.ctl", "/space/oracle/oradata/ofac/control03.ctl")
    # Instance Identification
    instance_name=ofac
    # Job Queues
    job_queue_processes=10
    # MTS
    dispatchers="(PROTOCOL=TCP) (SERVICE=ofacXDB)"
    # Miscellaneous
    aq_tm_processes=1
    compatible=9.2.0.0.0
    # Optimizer
    hash_join_enabled=TRUE
    query_rewrite_enabled=FALSE
    star_transformation_enabled=FALSE
    # Pools
    java_pool_size=117440512
    large_pool_size=16777216
    shared_pool_size=117440512
    # Processes and Sessions
    processes=150
    # Redo Log and Recovery
    fast_start_mttr_target=300
    # Security and Auditing
    remote_login_passwordfile=EXCLUSIVE
    # Sort, Hash Joins, Bitmap Indexes
    pga_aggregate_target=25165824
    sort_area_size=524288
    # System Managed Undo and Rollback Segments
    undo_management=AUTO
    undo_retention=10800
    undo_tablespace=UNDOTBS1

  • Error when compiling firefox...Out of memory: Kill process 6763

    I'm trying to compile the firefox version 15 as both 16.0.1 and I always get the same error, which I think leaves me with no ram even though I have 8 gigs, i try it with 8 gigs of swap but does exactly the same, here are all the facts about this problem, the only thing I have not tried is to change the compiler version, what do you think? this is a clear linkage error where the system breaks down after running out of physical memory...
    ERROR--->-using  yaourt -Sb or makepkg -s:
    /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/toolkit/library/nsUnicharUtils.cpp:275:1: warning: always_inline function might not be inlinable [-Wattributes]
    /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/toolkit/library/nsUnicharUtils.cpp:50:1: warning: always_inline function might not be inlinable [-Wattributes]
    /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/toolkit/library/nsUnicharUtils.cpp:40:1: warning: always_inline function might not be inlinable [-Wattributes]
    rm -f libxul.so
    /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/_virtualenv/bin/python /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/config/pythonpath.py -I../../config /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/config/expandlibs_exec.py --depend .deps/libxul.so.pp --target libxul.so --uselist -- c++ -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -fprofile-generate -O3 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,--gc-sections -Wl,-h,libxul.so -o libxul.so nsStaticXULComponents.i_o nsUnicharUtils.i_o nsBidiUtils.i_o nsSpecialCasingData.i_o nsUnicodeProperties.i_o nsRDFResource.i_o -lpthread -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,-rpath,/usr/lib/firefox -Wl,-z,noexecstack -fprofile-generate -Wl,-rpath-link,/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/dist/bin -Wl,-rpath-link,/usr/lib ../../toolkit/xre/libxulapp_s.a ../../staticlib/components/libnecko.a ../../staticlib/components/libuconv.a ../../staticlib/components/libi18n.a ../../staticlib/components/libchardet.a ../../staticlib/components/libjar50.a ../../staticlib/components/libstartupcache.a ../../staticlib/components/libpref.a ../../staticlib/components/libhtmlpars.a ../../staticlib/components/libidentity.a ../../staticlib/components/libimglib2.a ../../staticlib/components/libgkgfx.a ../../staticlib/components/libgklayout.a ../../staticlib/components/libdocshell.a ../../staticlib/components/libembedcomponents.a ../../staticlib/components/libwebbrwsr.a ../../staticlib/components/libnsappshell.a ../../staticlib/components/libtxmgr.a ../../staticlib/components/libcommandlines.a ../../staticlib/components/libtoolkitcomps.a ../../staticlib/components/libpipboot.a ../../staticlib/components/libpipnss.a ../../staticlib/components/libappcomps.a ../../staticlib/components/libjsreflect.a ../../staticlib/components/libcomposer.a ../../staticlib/components/libtelemetry.a ../../staticlib/components/libjsinspector.a ../../staticlib/components/libjsdebugger.a ../../staticlib/components/libstoragecomps.a ../../staticlib/components/librdf.a ../../staticlib/components/libwindowds.a ../../staticlib/components/libjsctypes.a ../../staticlib/components/libjsperf.a ../../staticlib/components/libgkplugin.a ../../staticlib/components/libunixproxy.a ../../staticlib/components/libjsd.a ../../staticlib/components/libautoconfig.a ../../staticlib/components/libauth.a ../../staticlib/components/libcookie.a ../../staticlib/components/libpermissions.a ../../staticlib/components/libuniversalchardet.a ../../staticlib/components/libfileview.a ../../staticlib/components/libplaces.a ../../staticlib/components/libtkautocomplete.a ../../staticlib/components/libsatchel.a ../../staticlib/components/libpippki.a ../../staticlib/components/libwidget_gtk2.a ../../staticlib/components/libimgicon.a ../../staticlib/components/libprofiler.a ../../staticlib/components/libaccessibility.a ../../staticlib/components/libremoteservice.a ../../staticlib/components/libspellchecker.a ../../staticlib/components/libzipwriter.a ../../staticlib/components/libservices-crypto.a ../../staticlib/libjsipc_s.a ../../staticlib/libdomipc_s.a ../../staticlib/libdomplugins_s.a ../../staticlib/libmozipc_s.a ../../staticlib/libmozipdlgen_s.a ../../staticlib/libipcshell_s.a ../../staticlib/libgfxipc_s.a ../../staticlib/libhal_s.a ../../staticlib/libdombindings_s.a ../../staticlib/libxpcom_core.a ../../staticlib/libucvutil_s.a ../../staticlib/libchromium_s.a ../../staticlib/libsnappy_s.a ../../staticlib/libgtkxtbin.a ../../staticlib/libthebes.a ../../staticlib/libgl.a ../../staticlib/libycbcr.a -L../../dist/bin -L../../dist/lib /tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/dist/lib/libjs_static.a -lffi -Wl,-rpath-link,/usr/lib -L/usr/lib -lssl3 -lsmime3 -lnss3 -lnssutil3 -lcrmf -lXrender -lfreetype -lfontconfig -lsqlite3 -ljpeg -lpng -lz -lhunspell-1.3 -L/usr/lib -levent -lpixman-1 ../../dist/lib/libgkmedias.a -lasound -lrt -L../../dist/bin -L../../dist/lib -L/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl ../../dist/lib/libmozalloc.a -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lX11 -lXext -lpangoft2-1.0 -lfreetype -lfontconfig -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lgtk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lXt -lgthread-2.0 -lfreetype -lstartup-notification-1 -lvpx -ldl -lrt -lrt
    collect2: error: ld terminated with signal 9 [Matat]
    make[6]: *** [libxul.so] Error 1
    make[6]: Leaving directory `/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu/toolkit/library'
    make[5]: *** [libs_tier_platform] Error 2
    make[5]: Leaving directory `/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu'
    make[4]: *** [tier_platform] Error 2
    make[4]: Leaving directory `/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu'
    make[3]: *** [default] Error 2
    make[3]: Leaving directory `/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release/obj-x86_64-unknown-linux-gnu'
    make[2]: *** [realbuild] Error 2
    make[2]: Leaving directory `/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release'
    make[1]: *** [profiledbuild] Error 2
    make[1]: Leaving directory `/tmp/yaourt-tmp-enric/abs-firefox/src/mozilla-release'
    make: *** [build] Error 2
    dmesg output on  ld :
    [ 1521.353469] ld invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0, oom_score_adj=0
    [ 1521.353474] Pid: 6763, comm: ld Not tainted 3.6.0 #1
    [ 1521.353475] Call Trace:
    [ 1521.353482] [<ffffffff814cc68e>] ? dump_header.isra.11+0x5d/0x18e
    [ 1521.353486] [<ffffffff812ae3dc>] ? ___ratelimit+0xac/0x120
    [ 1521.353489] [<ffffffff810e2fb5>] ? oom_kill_process+0x275/0x3b0
    [ 1521.353492] [<ffffffff810e2b10>] ? find_lock_task_mm+0x20/0x70
    [ 1521.353494] [<ffffffff810e3455>] ? out_of_memory+0x1c5/0x290
    [ 1521.353497] [<ffffffff810e742a>] ? __alloc_pages_nodemask+0x85a/0x870
    [ 1521.353500] [<ffffffff811048c4>] ? handle_pte_fault+0x8c4/0xb10
    [ 1521.353505] [<ffffffff81075ddf>] ? select_task_rq_fair+0x4cf/0x790
    [ 1521.353509] [<ffffffff8100a21f>] ? native_sched_clock+0xf/0x70
    [ 1521.353512] [<ffffffff8102b880>] ? do_page_fault+0x130/0x460
    [ 1521.353515] [<ffffffff810e6301>] ? get_page_from_freelist+0x311/0x670
    [ 1521.353519] [<ffffffff814d2275>] ? page_fault+0x25/0x30
    [ 1521.353523] [<ffffffff810df577>] ? file_read_actor+0x67/0x1f0
    [ 1521.353526] [<ffffffff810f6915>] ? shmem_file_aio_read+0x155/0x3a0
    [ 1521.353530] [<ffffffff81128832>] ? do_sync_read+0x92/0xd0
    [ 1521.353532] [<ffffffff811290c0>] ? vfs_read+0xa0/0x160
    [ 1521.353535] [<ffffffff811291c7>] ? sys_read+0x47/0xa0
    [ 1521.353537] [<ffffffff814d2275>] ? page_fault+0x25/0x30
    [ 1521.353540] [<ffffffff814d27fd>] ? system_call_fastpath+0x1a/0x1f
    [ 1521.353541] Mem-Info:
    [ 1521.353543] DMA per-cpu:
    [ 1521.353544] CPU 0: hi: 0, btch: 1 usd: 0
    [ 1521.353545] CPU 1: hi: 0, btch: 1 usd: 0
    [ 1521.353546] CPU 2: hi: 0, btch: 1 usd: 0
    [ 1521.353547] CPU 3: hi: 0, btch: 1 usd: 0
    [ 1521.353548] DMA32 per-cpu:
    [ 1521.353550] CPU 0: hi: 186, btch: 31 usd: 0
    [ 1521.353551] CPU 1: hi: 186, btch: 31 usd: 26
    [ 1521.353552] CPU 2: hi: 186, btch: 31 usd: 59
    [ 1521.353553] CPU 3: hi: 186, btch: 31 usd: 0
    [ 1521.353554] Normal per-cpu:
    [ 1521.353555] CPU 0: hi: 186, btch: 31 usd: 30
    [ 1521.353556] CPU 1: hi: 186, btch: 31 usd: 156
    [ 1521.353557] CPU 2: hi: 186, btch: 31 usd: 169
    [ 1521.353558] CPU 3: hi: 186, btch: 31 usd: 0
    [ 1521.353562] active_anon:1599337 inactive_anon:345122 isolated_anon:0
    active_file:140 inactive_file:222 isolated_file:0
    unevictable:17 dirty:0 writeback:0 unstable:0
    free:11562 slab_reclaimable:14927 slab_unreclaimable:21150
    mapped:6681 shmem:932329 pagetables:10868 bounce:0
    [ 1521.353567] DMA free:15892kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15644kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:8kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
    [ 1521.353568] lowmem_reserve[]: 0 3147 7925 7925
    [ 1521.353575] DMA32 free:23592kB min:4520kB low:5648kB high:6780kB active_anon:2754024kB inactive_anon:412764kB active_file:16kB inactive_file:44kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3223060kB mlocked:0kB dirty:0kB writeback:0kB mapped:5892kB shmem:1294220kB slab_reclaimable:7144kB slab_unreclaimable:5108kB kernel_stack:216kB pagetables:8616kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:715 all_unreclaimable? yes
    [ 1521.353576] lowmem_reserve[]: 0 0 4778 4778
    [ 1521.353582] Normal free:6764kB min:6860kB low:8572kB high:10288kB active_anon:3643324kB inactive_anon:967724kB active_file:544kB inactive_file:844kB unevictable:68kB isolated(anon):0kB isolated(file):0kB present:4892832kB mlocked:68kB dirty:0kB writeback:0kB mapped:20832kB shmem:2435096kB slab_reclaimable:52564kB slab_unreclaimable:79484kB kernel_stack:2968kB pagetables:34856kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:2484 all_unreclaimable? yes
    [ 1521.353583] lowmem_reserve[]: 0 0 0 0
    [ 1521.353586] DMA: 1*4kB 0*8kB 1*16kB 0*32kB 2*64kB 1*128kB 1*256kB 0*512kB 1*1024kB 1*2048kB 3*4096kB = 15892kB
    [ 1521.353592] DMA32: 740*4kB 506*8kB 300*16kB 135*32kB 25*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB 1*4096kB = 23872kB
    [ 1521.353599] Normal: 637*4kB 0*8kB 0*16kB 2*32kB 1*64kB 0*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 6516kB
    [ 1521.353605] 932908 total pagecache pages
    [ 1521.353606] 0 pages in swap cache
    [ 1521.353607] Swap cache stats: add 0, delete 0, find 0/0
    [ 1521.353608] Free swap = 0kB
    [ 1521.353609] Total swap = 0kB
    [ 1521.369740] 2094576 pages RAM
    [ 1521.369743] 80362 pages reserved
    [ 1521.369744] 36619 pages shared
    [ 1521.369745] 1993098 pages non-shared
    [ 1521.369746] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
    [ 1521.369752] [ 2286] 0 2286 6258 269 16 0 -1000 systemd-udevd
    [ 1521.369754] [ 2293] 0 2293 153174 83 229 0 0 systemd-journal
    [ 1521.369757] [ 3585] 0 3585 4695 188 13 0 0 mount.ntfs-3g
    [ 1521.369759] [ 3615] 0 3615 3547 140 12 0 0 crond
    [ 1521.369761] [ 3616] 0 3616 6708 2523 18 0 0 preload
    [ 1521.369763] [ 3617] 0 3617 17762 297 38 0 0 cupsd
    [ 1521.369765] [ 3619] 0 3619 43562 313 52 0 0 NetworkManager
    [ 1521.369767] [ 3620] 84 3620 6988 70 20 0 0 avahi-daemon
    [ 1521.369769] [ 3621] 0 3621 6515 72 18 0 0 systemd-logind
    [ 1521.369770] [ 3622] 81 3622 4595 285 14 0 -900 dbus-daemon
    [ 1521.369772] [ 3626] 0 3626 2275 32 9 0 0 agetty
    [ 1521.369774] [ 3627] 0 3627 6693 53 19 0 0 kdm
    [ 1521.369776] [ 3628] 84 3628 6957 52 18 0 0 avahi-daemon
    [ 1521.369778] [ 3631] 0 3631 45316 12716 91 0 0 X
    [ 1521.369780] [ 4287] 0 4287 15666 128 36 0 0 kdm
    [ 1521.369782] [ 5131] 102 5131 92417 912 41 0 0 polkitd
    [ 1521.369784] [ 5132] 0 5132 53222 346 41 0 0 colord
    [ 1521.369786] [ 5163] 0 5163 129753 991 153 0 0 colord-sane
    [ 1521.369788] [11395] 0 11395 523912 258 62 0 0 console-kit-dae
    [ 1521.369790] [11468] 1000 11468 3668 111 13 0 0 startkde
    [ 1521.369792] [11480] 1000 11480 3970 37 13 0 0 dbus-launch
    [ 1521.369794] [11481] 1000 11481 4839 401 15 0 0 dbus-daemon
    [ 1521.369796] [11507] 1000 11507 4068 94 12 0 0 gpg-agent
    [ 1521.369798] [11510] 1000 11510 3760 87 11 0 0 ssh-agent
    [ 1521.369799] [11524] 1000 11524 1013 21 7 0 -300 start_kdeinit
    [ 1521.369801] [11525] 1000 11525 85821 1591 149 0 -300 kdeinit4
    [ 1521.369803] [11528] 1000 11528 188590 3072 227 0 0 kded4
    [ 1521.369805] [11534] 1000 11534 108217 2084 173 0 0 kwalletd
    [ 1521.369807] [11539] 1000 11539 107913 2348 173 0 0 kglobalaccel
    [ 1521.369809] [11542] 0 11542 55597 601 43 0 0 upowerd
    [ 1521.369811] [11555] 1000 11555 1047 18 7 0 0 kwrapper4
    [ 1521.369813] [11556] 1000 11556 127307 2185 174 0 0 ksmserver
    [ 1521.369814] [11568] 0 11568 49409 269 33 0 0 udisks-daemon
    [ 1521.369816] [11573] 0 11573 12394 89 28 0 0 udisks-daemon
    [ 1521.369818] [11577] 1000 11577 214097 12177 260 0 0 kwin
    [ 1521.369820] [11590] 1000 11590 93530 1489 131 0 0 kactivitymanage
    [ 1521.369822] [11621] 1000 11621 343123 3417 215 0 0 knotify4
    [ 1521.369824] [11631] 1000 11631 175587 4370 239 0 0 krunner
    [ 1521.369826] [11633] 1000 11633 246522 16714 342 0 0 plasma-desktop
    [ 1521.369828] [11636] 1000 11636 216148 5325 253 0 0 lancelot
    [ 1521.369830] [11639] 1000 11639 50634 268 35 0 0 mission-control
    [ 1521.369831] [11643] 1000 11643 37597 405 39 0 0 akonadi_control
    [ 1521.369833] [11645] 1000 11645 357276 722 81 0 0 akonadiserver
    [ 1521.369835] [11652] 1000 11652 377776 6206 70 0 0 mysqld
    [ 1521.369837] [11738] 1000 11738 76786 1061 110 0 0 akonadi_agent_l
    [ 1521.369839] [11739] 1000 11739 76783 1056 111 0 0 akonadi_agent_l
    [ 1521.369841] [11740] 1000 11740 75143 1033 111 0 0 akonadi_agent_l
    [ 1521.369843] [11741] 1000 11741 75144 1042 110 0 0 akonadi_agent_l
    [ 1521.369845] [11742] 1000 11742 75800 1048 112 0 0 akonadi_agent_l
    [ 1521.369847] [11743] 1000 11743 75800 1054 107 0 0 akonadi_agent_l
    [ 1521.369848] [11744] 1000 11744 76786 1064 108 0 0 akonadi_agent_l
    [ 1521.369850] [11745] 1000 11745 76780 1073 111 0 0 akonadi_agent_l
    [ 1521.369852] [11746] 1000 11746 84215 1305 155 0 0 akonadi_maildis
    [ 1521.369854] [11747] 1000 11747 92098 1211 138 0 0 akonadi_nepomuk
    [ 1521.369856] [11774] 1000 11774 59745 591 76 0 0 nepomukserver
    [ 1521.369858] [11777] 1000 11777 287924 2235 149 0 0 nepomukservices
    [ 1521.369860] [11795] 1000 11795 100823 10181 51 0 0 virtuoso-t
    [ 1521.369861] [11801] 1000 11801 93041 786 99 0 0 pulseaudio
    [ 1521.369863] [11802] 133 11802 41125 46 17 0 0 rtkit-daemon
    [ 1521.369865] [11811] 1000 11811 17253 140 36 0 0 gconf-helper
    [ 1521.369867] [11813] 1000 11813 11527 127 26 0 0 gconfd-2
    [ 1521.369869] [11816] 1000 11816 68886 1148 123 0 0 kuiserver
    [ 1521.369871] [11837] 1000 11837 58146 1047 105 0 0 nepomukservices
    [ 1521.369873] [11839] 1000 11839 53655 966 98 0 0 nepomukservices
    [ 1521.369875] [11840] 1000 11840 92263 1128 107 0 0 nepomukservices
    [ 1521.369877] [11841] 1000 11841 109750 1232 107 0 0 nepomukservices
    [ 1521.369878] [12942] 1000 12942 41975 542 78 0 0 kwrited
    [ 1521.369880] [12944] 1000 12944 246808 6774 195 0 0 ktorrent
    [ 1521.369882] [12954] 1000 12954 93430 1212 139 0 0 polkit-kde-auth
    [ 1521.369884] [12957] 1000 12957 70673 1126 130 0 0 nepomukcontroll
    [ 1521.369886] [12959] 1000 12959 92309 1654 138 0 0 kgpg
    [ 1521.369888] [12966] 1000 12966 109879 2164 176 0 0 klipper
    [ 1521.369890] [13009] 1000 13009 86477 1682 131 0 0 kio_http_cache_
    [ 1521.369892] [17302] 1000 17302 270535 59165 488 0 0 firefox
    [ 1521.369894] [17322] 1000 17322 10407 86 26 0 0 gvfsd
    [ 1521.369896] [17324] 1000 17324 50365 171 31 0 0 gvfs-fuse-daemo
    [ 1521.369897] [18462] 1000 18462 138761 5014 199 0 0 konsole
    [ 1521.369899] [18464] 1000 18464 4227 156 13 0 0 bash
    [ 1521.369901] [19535] 1000 19535 3885 324 13 0 0 yaourt
    [ 1521.369903] [19680] 1000 19680 3800 253 13 0 0 makepkg
    [ 1521.369905] [22861] 1000 22861 174765 6917 209 0 0 dolphin
    [ 1521.369907] [24940] 1000 24940 12258 2121 27 0 0 Xvfb
    [ 1521.369909] [24941] 1000 24941 2944 134 11 0 0 make
    [ 1521.369911] [25116] 1000 25116 2946 137 11 0 0 make
    [ 1521.369913] [25337] 1000 25337 3013 200 11 0 0 make
    [ 1521.369915] [ 473] 1000 473 2977 169 12 0 0 make
    [ 1521.369917] [ 3719] 1000 3719 3006 176 12 0 0 make
    [ 1521.369919] [10784] 1000 10784 3006 175 13 0 0 make
    [ 1521.369921] [12252] 1000 12252 115351 9567 175 0 0 kvirc
    [ 1521.369922] [26014] 1000 26014 4256 168 13 0 0 bash
    [ 1521.369925] [30177] 1000 30177 4255 167 14 0 0 bash
    [ 1521.369926] [30976] 1000 30976 86977 3634 138 0 0 plugin-containe
    [ 1521.369928] [ 915] 1000 915 87003 1648 132 0 0 kio_file
    [ 1521.369930] [ 916] 1000 916 109277 2635 176 0 0 kio_thumbnail
    [ 1521.369932] [ 1186] 1000 1186 4227 157 13 0 0 bash
    [ 1521.369934] [ 2105] 1000 2105 86873 1689 132 0 0 klauncher
    [ 1521.369936] [ 2473] 1000 2473 87003 1648 132 0 0 kio_file
    [ 1521.369938] [ 3468] 1000 3468 141313 5962 206 0 0 kate
    [ 1521.369940] [ 6331] 1000 6331 109512 2225 174 0 0 kate
    [ 1521.369942] [ 6733] 1000 6733 2983 150 12 0 0 make
    [ 1521.369943] [ 6760] 1000 6760 17243 1559 39 0 0 python
    [ 1521.369945] [ 6761] 1000 6761 1882 30 9 0 0 c++
    [ 1521.369947] [ 6762] 1000 6762 1816 23 9 0 0 collect2
    [ 1521.369949] [ 6763] 1000 6763 812215 809141 1588 0 0 ld
    [color=#FF40BF][ 1521.369951] Out of memory: Kill process 6763 (ld) score 402 or sacrifice child
    [ 1521.369953] Killed process 6763 (ld) total-vm:3248860kB, anon-rss:3236396kB, file-rss:168kB[/color]
    gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: /build/src/gcc-4.7.2/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release
    Thread model: posix
    gcc version 4.7.2 (GCC)
    cat /proc/meminfo
    MemTotal: 8056856 kB
    MemFree: 1240336 kB
    Buffers: 278356 kB
    Cached: 4591784 kB
    SwapCached: 0 kB
    Active: 2700172 kB
    Inactive: 3860720 kB
    Active(anon): 2498432 kB
    Inactive(anon): 2441488 kB
    Active(file): 201740 kB
    Inactive(file): 1419232 kB
    Unevictable: 68 kB
    Mlocked: 68 kB
    SwapTotal: 0 kB
    SwapFree: 0 kB
    Dirty: 124 kB
    Writeback: 0 kB
    AnonPages: 1690996 kB
    Mapped: 218032 kB
    Shmem: 3249176 kB
    Slab: 172972 kB
    SReclaimable: 90332 kB
    SUnreclaim: 82640 kB
    KernelStack: 3264 kB
    PageTables: 38384 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 4028428 kB
    Committed_AS: 6713700 kB
    VmallocTotal: 34359738367 kB
    VmallocUsed: 92972 kB
    VmallocChunk: 34359642076 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB
    DirectMap4k: 10240 kB
    DirectMap2M: 7237632 kB
    /etc/makepkg.conf
    # ARCHITECTURE, COMPILE FLAGS
    CARCH="x86_64"
    CHOST="x86_64-unknown-linux-gnu"
    CFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
    CXXFLAGS="${CFLAGS}"
    LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
    MAKEFLAGS="-j5"
    thanks a lot
    Last edited by papu (2012-10-13 17:35:38)

    yes it's true it take 4gigs of 8 gigs i have,  but when i was using gentoo never had this problem when i was compiling any package and then my pc was 4gigs.
    df -hT
    Filesystem Type Size Used Avail Use% Mounted on
    rootfs rootfs 51G 7.7G 41G 17% /
    dev devtmpfs 3.9G 0 3.9G 0% /dev
    run tmpfs 3.9G 1.6M 3.9G 1% /run
    /dev/sdb2 ext4 51G 7.7G 41G 17% /
    tmpfs tmpfs 3.9G 76K 3.9G 1% /dev/shm
    tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
    tmpfs tmpfs 3.9G 56K 3.9G 1% /tmp
    /dev/sdc1 fuseblk 299G 237G 62G 80% /mnt/share
    /dev/sdb1 ext2 183M 28M 146M 16% /boot
    /dev/sdb3 ext4 18G 6.2G 11G 37% /home
    i am using vanilla kernel 3.6.0
    cat /etc/fstab
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    # /dev/sdb2
    UUID=412194cb-8953-4d02-94b4-d25d21bd7126 / ext4 rw,relatime,barrier=0 0 1
    #/dev/sdb1
    UUID=8bc28611-e3ee-4079-b311-33b9d4a0f36a /boot ext2 rw,relatime 0 2
    #/dev/sdb3
    UUID=2d6d63e0-a59f-439f-9c11-f6673055e65a /home ext4 rw,relatime,barrier=0 0 2
    #/dev/sdc1
    UUID=60F0F9D3F0F9AF80 /mnt/share ntfs-3g umask=0 0 0
    what i have to do ?
    thanks so much. friends!
    Last edited by papu (2012-10-13 19:44:17)

  • Running out of memory despite having set je.maxMemory to a moderate value

    I have set je.maxMemory to 20MB (je.maxMemory=20000000) and allowed a max heap size of 512MB (-Xms256M -Xmx512M).
    After two hours of running my web service, I'm running out of memory. After having profiled my service (using Yourkit Java Profiler 1.10.6), I can see the following:
    Name                                               Objects ShallowSize  RetainedSize
    byte[]                                               16711   124124880     124124880
    com.sleepycat.je.tree.BIN                              181       24616     116254200
    com.sleepycat.je.tree.Node[]                           187       98736     115743184
    com.sleepycat.je.tree.LN                              7092      226944     115253600
    java.util.concurrent.ConcurrentHashMap$HashEntry       554       17728      78328944
    java.util.concurrent.ConcurrentHashMap$HashEntry[]    1053       34728      77489632
    java.util.concurrent.ConcurrentHashMap                 117        5616      71812072
    java.util.concurrent.ConcurrentHashMap$Segment[]       118       10304      71807912
    java.util.concurrent.ConcurrentHashMap$Segment        1052       42080      71798808
    com.sleepycat.je.tree.IN                                 6         672      45592352
    java.lang.String                                    135888     4348416      14152664The memory profiler claims further, that com.sleepycat.je.tree.BIN is responsible for 71% of all heap memory.
    In any case, com.sleepycat.je.tree.BIN claims ~ 116MB of heap memory, which is by any goodwill, exceeded the limit of 20MB.
    How can this be?
    How is JE ensuring that the limit is not exceeded? Is there a timer (thread) running which once a while checks the memory used and then cleans up ; or is memory usage checked creating a com.sleepycat.je.tree.BIN object?
    My environment:
    BDB JE 4.0.92 - used as cache loader within Jboss Cache (3.2.7.GA), running on a JBOSS Application Server, Java 1.6 (IBM) on Linux. Further details are listed in the system properties below (except some deleted security items).
    System properties:
    (java.lang.String, int, java.lang.StringBuffer, int)=contains
    DestroyJavaVM helper thread=(java.lang.String, java.security.KeyStore$Entry, java.security.KeyStore$ProtectionParameter)
    base.collection.name=CD2JAVA
    bind.address=10.12.25.130
    catalina.base=/work/ocrgws_test/server0
    catalina.ext.dirs=/work/ocrgws_test/server0/lib
    catalina.home=/work/ocrgws_test/server0
    catalina.useNaming=false
    com.arjuna.ats.arjuna.objectstore.objectStoreDir=/work/ocrgws_test/server0/data/tx-object-store
    com.arjuna.ats.jta.lastResourceOptimisationInterface=org.jboss.tm.LastResource
    com.arjuna.ats.tsmx.agentimpl=com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
    com.arjuna.common.util.logger=log4j_releveler
    com.arjuna.common.util.logging.DebugLevel=0x00000000
    com.arjuna.common.util.logging.FacilityLevel=0xffffffff
    com.arjuna.common.util.logging.VisibilityLevel=0xffffffff
    com.ibm.cpu.endian=little
    com.ibm.jcl.checkClassPath=
    com.ibm.oti.configuration=scar
    com.ibm.oti.jcl.build=20100326_1904
    com.ibm.oti.shared.enabled=false
    com.ibm.oti.vm.bootstrap.library.path=/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs:/opt/ibm/java-x86_64-60/jre/lib/amd64
    com.ibm.oti.vm.library.version=24
    com.ibm.util.extralibs.properties=
    com.ibm.vm.bitmode=64
    common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar
    epo.jboss.deploymentscanner.extradirs=/work/ocrgws_test/app/
    external.cert.ldap.* = ***************
    file.encoding=UTF-8
    file.separator=/
    flipflop.activation.time=16:30
    hibernate.bytecode.provider=javassist
    ibm.signalhandling.rs=false
    ibm.signalhandling.sigchain=true
    ibm.signalhandling.sigint=true
    ibm.system.encoding=UTF-8
    jacorb.config.log.verbosity=0
    java.assistive=ON
    java.awt.fonts=
    java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
    java.awt.printerjob=sun.print.PSPrinterJob
    java.class.path=/work/ocrgws_test/config:/usr/local/jboss-eap-4.3-cp07/bin/run.jar:/opt/ibm/java-x86_64-60/lib/tools.jar
    java.class.version=50.0
    java.compiler=j9jit24
    java.endorsed.dirs=/usr/local/jboss-eap-4.3-cp07/lib/endorsed
    java.ext.dirs=/opt/ibm/java-x86_64-60/jre/lib/ext
    java.fullversion=JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr8-20100401_55940 (JIT enabled, AOT enabled)
    J9VM - 20100401_055940
    JIT - r9_20100401_15339
    GC - 20100308_AA_CMPRSS
    java.home=/opt/ibm/java-x86_64-60/jre
    java.io.tmpdir=/tmp
    java.jcl.version=20100408_01
    java.library.path=/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs:/opt/ibm/java-x86_64-60/jre/lib/amd64:/usr/lib64/mpi/gcc/openmpi/lib64:/usr/lib
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    java.net.preferIPv4Stack=true
    java.protocol.handler.pkgs=org.jboss.net.protocol
    java.rmi.server.codebase=http://10.12.25.130:8083/
    java.rmi.server.hostname=10.12.25.130
    java.rmi.server.randomIDs=true
    java.runtime.name=Java(TM) SE Runtime Environment
    java.runtime.version=pxa6460sr8-20100409_01 (SR8)
    java.security.krb5.conf=/usr/local/jboss/etc/krb5.conf
    java.specification.name=Java Platform API Specification
    java.specification.vendor=Sun Microsystems Inc.
    java.specification.version=1.6
    java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory
    java.vendor.url=http://www.ibm.com/
    java.vendor=IBM Corporation
    java.version=1.6.0
    java.vm.info=JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr8-20100401_55940 (JIT enabled, AOT enabled)
    J9VM - 20100401_055940
    JIT - r9_20100401_15339
    GC - 20100308_AA_CMPRSS
    java.vm.name=IBM J9 VM
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Sun Microsystems Inc.
    java.vm.specification.version=1.0
    java.vm.vendor=IBM Corporation
    java.vm.version=2.4
    javax.management.builder.initial=org.jboss.mx.server.MBeanServerBuilderImpl
    javax.net.ssl.trustStore=/usr/local/jboss/etc/ldap.truststore
    javax.net.ssl.trustStorePassword=password
    jboss.bind.address=10.12.25.130
    jboss.home.dir=/usr/local/jboss-eap-4.3-cp07
    jboss.home.url=file:/usr/local/jboss-eap-4.3-cp07/
    jboss.identity=30df88bc0a52e350x6e2ff59cx136c17794d5x-8000757
    jboss.lib.url=file:/usr/local/jboss-eap-4.3-cp07/lib/
    jboss.messaging.controlchanneludpaddress=239.1.200.4
    jboss.messaging.datachanneludpaddress=239.1.200.4
    jboss.partition.name=ocrgws_test_Partition
    jboss.partition.udpGroup=239.1.200.4
    jboss.remoting.domain=JBOSS
    jboss.remoting.instanceid=30df88bc0a52e350x6e2ff59cx136c17794d5x-8000757
    jboss.remoting.jmxid=luu002t.internal.epo.org_1334685694459
    jboss.remoting.version=22
    jboss.security.disable.secdomain.option=true
    jboss.server.config.url=file:/work/ocrgws_test/server0/conf/
    jboss.server.data.dir=/work/ocrgws_test/server0/data
    jboss.server.home.dir=/work/ocrgws_test/server0
    jboss.server.home.url=file:/work/ocrgws_test/server0/
    jboss.server.lib.url=file:/work/ocrgws_test/server0/lib/
    jboss.server.log.dir=/work/ocrgws_test/server0/log
    jboss.server.name=luu002t_ocrgws_test_server0
    jboss.server.temp.dir=/work/ocrgws_test/server0/tmp
    jboss.tomcat.udpGroup=239.1.200.4
    jbossmx.loader.repository.class=org.jboss.mx.loading.UnifiedLoaderRepository3
    je.maxMemory=20000000
    jgroups.bind_addr=10.12.25.130
    jmx.console.bindcredential=3bpwdmpc
    jmx.console.binddn=cn=jbossauth-ro,ou=accounts,ou=auth,dc=epo,dc=org
    jmx.console.rolesctxdn=ou=roles-test,ou=jboss,ou=applications,ou=internal,dc=epo,dc=org
    jndi.datasource.name=java:MainframeDS
    jnp.disableDiscovery=true
    jxe.current.romimage.version=15
    jxe.lowest.romimage.version=15
    line.separator=
    mainframelogin.password=720652a1e842fc7f
    mainframelogin.username=test_t
    org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
    org.apache.tomcat.util.http.ServerCookie.VERSION_SWITCH=true
    org.epo.jboss.application.home=/work/ocrgws_test
    org.hyperic.sigar.path=/work/ocrgws_test/server0/./deploy/hyperic-hq.war/native-lib
    org.jboss.ORBSingletonDelegate=org.jacorb.orb.ORBSingleton
    org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
    org.omg.CORBA.ORBSingletonClass=org.jboss.system.ORBSingleton
    org.w3c.dom.DOMImplementationSourceList=org.apache.xerces.dom.DOMXSImplementationSourceImpl
    os.arch=amd64
    os.name=Linux
    os.version=2.6.32.46-0.3-xen
    package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
    package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
    path.separator=:
    poll.interval.milliseconds=300000
    program.name=run.sh
    server.loader=
    shared.loader=
    spnego.config=/usr/local/jboss/etc/spnego.properties
    sun.arch.data.model=64
    sun.boot.class.path=/usr/local/jboss-eap-4.3-cp07/lib/endorsed/xercesImpl.jar:/usr/local/jboss-eap-4.3-cp07/lib/endorsed/xalan.jar:/usr/local/jboss-eap-4.3-cp07/lib/endorsed/serializer.jar:/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs/jclSC160/vm.jar:/opt/ibm/java-x86_64-60/jre/lib/annotation.jar:/opt/ibm/java-x86_64-60/jre/lib/beans.jar:/opt/ibm/java-x86_64-60/jre/lib/java.util.jar:/opt/ibm/java-x86_64-60/jre/lib/jndi.jar:/opt/ibm/java-x86_64-60/jre/lib/logging.jar:/opt/ibm/java-x86_64-60/jre/lib/security.jar:/opt/ibm/java-x86_64-60/jre/lib/sql.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmorb.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmorbapi.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmcfw.jar:/opt/ibm/java-x86_64-60/jre/lib/rt.jar:/opt/ibm/java-x86_64-60/jre/lib/charsets.jar:/opt/ibm/java-x86_64-60/jre/lib/resources.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmpkcs.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmcertpathfw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjgssfw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjssefw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmsaslfw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjcefw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjgssprovider.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjsseprovider2.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmcertpathprovider.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmxmlcrypto.jar:/opt/ibm/java-x86_64-60/jre/lib/management-agent.jar:/opt/ibm/java-x86_64-60/jre/lib/xml.jar:/opt/ibm/java-x86_64-60/jre/lib/jlm.jar:/opt/ibm/java-x86_64-60/jre/lib/javascript.jar:/tmp/yjp201202191932.jar
    sun.boot.library.path=/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs:/opt/ibm/java-x86_64-60/jre/lib/amd64
    sun.io.unicode.encoding=UnicodeLittle
    sun.java.command=org.jboss.Main -b 10.12.25.130 -Djboss.server.home.dir=/work/ocrgws_test/server0 -Djboss.server.home.url=file:/work/ocrgws_test/server0 -Djboss.server.name=luu002t_ocrgws_test_server0 -Djboss.partition.name=ocrgws_test_Partition -Depo.jboss.deploymentscanner.extradirs=/work/ocrgws_test/app/ -Dorg.epo.jboss.application.home=/work/ocrgws_test
    sun.java.launcher.pid=17781
    sun.java.launcher=SUN_STANDARD
    sun.java2d.fontpath=
    sun.jnu.encoding=UTF-8
    sun.rmi.dgc.client.gcInterval=3685000
    sun.rmi.dgc.server.gcInterval=3685000
    system=java.io.ObjectStreamField
    tomcat.util.buf.StringCache.byte.enabled=true
    user.country=US
    user.dir=/work/ocrgws_test
    user.home=*****************
    user.language=en
    user.name=***********
    user.timezone=Europe/Berlin
    user.variant=

    The memory profiler claims further, that com.sleepycat.je.tree.BIN is responsible for 71% of all heap memory. In any case, com.sleepycat.je.tree.BIN claims ~ 116MB of heap memory, which is by any goodwill, exceeded the limit of 20MB. >
    I'm not sure whether the profiler is reporting live objects only (referenced) or all objects (including those not yet reclaimed). If the latter, it isn't telling you how much memory is actually referenced by the JE cache.
    Please look at the JE stats to see what the cache usage is, from JE's point of view.
    If you believe there is a bug in JE cache management, you'll need to write a small standalone test to demonstrate it and submit it to us, since we don't know of any such bug. Also note that we'll have difficulty supporting JE 4.0 (without a support contract anyway). Please use JE 5.0, or at least 4.1.
    Eviction occurs as objects are allocated, as well as in background threads. Eviction in background threads and concurrent eviction were greatly improved in JE 4.1.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Generating large amounts of XML without running out of memory

    Hi there,
    I need some advice from the experienced xdb users around here. I´m trying to map large amounts of data inside the DB (Oracle 11.2.0.1.0) and by large I mean files up to several GB. I compared the "low level" mapping via PL/SQL in combination with ExtractValue/XMLQuery with the elegant XML View Mapping and the best performance gave me the View Mapping by using the XMLTABLE XQuery PATH constructs. So now I have a View that lies on several BINARY XMLTYPE Columns (where the XML files are stored) for the mapping and another view which lies above this Mapping View and constructs the nested XML result document via XMLELEMENT(),XMLAGG() etc. Example Code for better understanding:
    CREATE OR REPLACE VIEW MAPPING AS
    SELECT  type, (...)  FROM XMLTYPE_BINARY,  XMLTABLE ('/ROOT/ITEM' passing xml
         COLUMNS
          type       VARCHAR2(50)          PATH 'for $x in .
                                                                let $one := substring($x/b012,1,1)
                                                                let $two := substring($x/b012,1,2)
                                                                return
                                                                    if ($one eq "A")
                                                                      then "A"
                                                                    else if ($one eq "B" and not($two eq "BJ"))
                                                                      then "AA"
                                                                    else if (...)
    CREATE OR REPLACE VIEW RESULT AS
    select XMLELEMENT("RESULTDOC",
                     (SELECT XMLAGG(
                             XMLELEMENT("ITEM",
                                          XMLFOREST(
                                               type "ITEMTYPE",
    ) as RESULTDOC FROM MAPPING;
    ----------------------------------------------------------------------------------------------------------------------------Now all I want to do is materialize this document by inserting it into a XMLTYPE table/column.
    insert into bla select * from RESULT;
    Sounds pretty easy but can´t get it to work, the DB seems to load a full DOM representation into the RAM every time I perform a select, insert into or use the xmlgen tool. This Representation takes more than 1 GB for a 200 MB XML file and eventually I´m running out of memory with an
    ORA-19202: Error occurred in XML PROCESSING
    ORA-04030: out of process memory
    My question is how can I get the result document into the table without memory exhaustion. I thought the db would be smart enough to generate some kind of serialization/datastream to perform this task without loading everything into the RAM.
    Best regards

    The file import is performed via jdbc, clob and binary storage is possible up to several GB, the OR storage gives me the ORA-22813 when loading files with more than 100 MB. I use a plain prepared statement:
            File f = new File( path );
           PreparedStatement pstmt = CON.prepareStatement( "insert into " + table + " values ('" + id + "', XMLTYPE(?) )" );
           pstmt.setClob( 1, new FileReader(f) , (int)f.length() );
           pstmt.executeUpdate();
           pstmt.close(); DB version is 11.2.0.1.0 as mentioned in the initial post.
    But this isn´t my main problem, the above one is, I prefer using binary xmltype anyway, much easier to index. Anyone an idea how to get the large document from the view into a xmltype table?

  • Target has run out of memory on LM3s8962

    I'm using the LM3s8962 evaluation kit to record data from the ADC's.  I have the system set up so that I use the elemental nodes of the four adc's in a while loop, and replace the values in four different arrays.  The arrays are initialize (1x1000 elements) before entering the loop.  This works fine.
    THE PROBLEM:  When I try to make the arrays larger (i.e. initial arrays larger than 1000 points, 4 individual arrays), I get the following error:
    Error: Memory allocation failed. The target has run out of memory. [C:\Program Files (x86)\National Instruments\LabVIEW 2011\CCodeGen\libsrc\blockdiagram\CCGArrSupport2.c at line 253: 2 3
    OR
    Error: Memory allocation failed. The target has run out of memory. [C:\Program Files (x86)\National Instruments\LabVIEW 2011\CCodeGen\libsrc\blockdiagram\CCGArrSupport2.c at line 173: 2 3
    Any suggestions?

    Th0r wrote:
    It looks like you're filling up the flash memory on the LM3S8962 with all of these array initializations.  According to page 263 of the LM3S8962 datasheet, that microcontroller has 256 KB of flash memory which you can use to fill up with your code.  In addition to your array initializations, some of this space is taken up by the LabVIEW Embedded Module-specific code as well.  What datatype are you using in these arrays?  Does this error occur upon building or running your code?  Thanks for any additional information you can provide!  
    That's probably it.  The error occurs when building the code, before it's actually able to run.  If reduce the array size, I'm able to run the code no problem.  At the moment,  I'm using a long 32 bit integer, which I know realize I can reduce significantly, as my ADC only reads at 10 bits.  Do you know if there's a way that I can preallocate the array to a place other than flash?
    I've found a fix around it since I last posted, in which I set up a buffer (smaller) and then save the buffer values on the SD card.  This works well and I can sample for long periods of time, but it does slow down my overall sampling rate, so I'd like to fix the above problem nonetheless. 

  • System running out of memory

    I have deployed a Windows Embedded Standard 7 on a x64 machine. My answer file includes the File Based Write Filter and my system has 8GB RAM installed. I have excluded some working folders for a specific software and other than that no big change would
    happen in the system. I have set the overlay size of FBWF to be 1GB.
    Now my problem is that after the system works for some time, the amount of free memory starts to decline and after around 7-8 hours the available memory reaches a critical amount and the system is unusable and I have to reset the system manually. I have
    increased the size of the overlay to 2GB but this happens again.
     Is it possible that this problem is due to FBWF? If I set the overlay size to be 2GB the system should not touch any more than that 2GB so I would never run out of memory with 8GB installed RAM. am I right?

    Would you please take a look at my situation and give me a possible diagnosis:
    1- I have "File Based Write Filter" on Windows Embedded Standard 7 x64 SP1.
    2- The installed RAM is 8GB and size of overlay of FBWF is set to 2GB.
    3- When the system is giving the critical memory message the conditions are as follows:
    a) The consumed memory in task manager is somewhere around 4 to 4.5 GB out of 8GB
    b) A process schedule.exe (from our software) is running more than a hundred time and is consuming
    memory,
    but its .exe file is located inside an unprotected folder.
    c) executing fbwfmgr.exe /overlaydetail is reporting that only 135MB of overlay volume is full!
    Memory consumed by directory structure: 35.6 MB
    Memory consumed by file data: 135 MB
    d) The CPU usage is normal
    I don't know what exactly is full? Memory has free space, FBWF overlay volume has free space, then which memory is full?
    p.s.: I checked my answer file and paging file is disabled as required.

  • Mac Desktop Manager - Device has run out of memory

    So, long story short, this is the latest (of a very long string) of error messages. I have been able, with the help of these forums, to troubleshoot all the others.
    I am syncing my BB 8120 (v4.5.0.174) to iCal with the Desktop Manager, only set to sync calendar. It simply drops with an error that the 'Device has run out of memory'. Checking the Applications tab shows 17mb of free space.
    History:
    I got this Blackberry a few months ago, deciding I wanted a robust phone with good battery life that had email.
    I use gmail. Apparently this is not compatible with BIS, and had continual problems. This is still unsatisfactory - I have to use the gmail app which causes problems (hanging) and does not support push.
    I was dismayed to discover that a Blackberry sync client for Mac had only recently been announced, however I persevered.
    When it was released, I started using it, but it has continually given errors on all manner of different combinations.
    I recently solved the contacts problem by syncing using the Google sync, which syncs also with my mac over the air.
    This is not a solution for the calendars because iCal does not support google calendars well enough for my liking.
    The phone sporadically has a spinning hourglass, for what reason(s) I cannot determine, even after battery pulls etc.
    Suffice to say I have spent hundreds of hours troubleshooting this phone over the last months. For a phone whose main selling functions are email and organisation, it does neither of these reliably or well.
    If I do not solve this problem soon I will return to my old phone which supported everything above more reliably, and had 4 times the battery life to boot. The only thing I would miss is the qwerty keyboard.
    Mac OS 10.6.2 MacBook Pro

    Ah yes, good old Project Manager. There are plenty of times when it causes more problems than it solves.
    You might try deleting the following folder:
    User/Library/Preferences/Logic/PM Data
    If you use Project Manager, it's easy enough to rebuild the table. If you don't then don't worry - just delete it. By the way, if you're into Project Manager or would like to know more, go to the website of the perhaps the most generous man in the Logic world, Edgar Rothermich and grab some of his user manuals.
    http://homepage.mac.com/edgarrothermich/Manuals.html
    Pete

Maybe you are looking for

  • Removing the responsbility of user maintenance from the DBA

    Suppose you were working with a customer whose DBAs refuse to be involved with user maintenance, i.e. creation and deletion of users, password maintenance, role and privilege assignment etc. What technology and/or approach would you recommend? Some r

  • Itunes library is on a shared drive, how do I add laptops etc correctly?

    Hi folks, Short version: I have my itunes library on my WD My Book Live NAS. I would like a new laptop and a new PC to see this library and be able to add to it etc. Long version: I currently have a Desktop and a laptop, and itunes library on a NAS.

  • Videos won't play in iTunes

    TV, Video Podcast, Movies - none of them play in iTunes 10.5.3.  A windows pops up, you have the PAUSE button showing as if it's playing but nothing is happening, just a still shot of the video.  They play fine in quicktime. I re-installed iTunes, no

  • Issues in migration to oracle 8i

    hi oracle gurus, need 3 questions to be answered - a) what is the procedure and the minimum requirements for migration from oracle 8.0 to oracle 8i ? b) we have some vb-> oracle ADO components. current version is 1.1. Will it be necessary to migrate

  • Roles in MM

    Hi all, Can someone help me in identifying different roles which can be created for MM reports in BI. I am not able to get it from business here cause they are not sure of these concepts. What i reqiure is if someone can suggest me different roles an