From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4040 invoked by alias); 5 Apr 2011 12:02:52 -0000 Received: (qmail 4031 invoked by uid 22791); 5 Apr 2011 12:02:51 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Apr 2011 12:02:47 +0000 Received: by vws2 with SMTP id 2so208482vws.20 for ; Tue, 05 Apr 2011 05:02:46 -0700 (PDT) Received: by 10.52.68.110 with SMTP id v14mr4274843vdt.202.1302004966275; Tue, 05 Apr 2011 05:02:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.167.34 with HTTP; Tue, 5 Apr 2011 05:02:05 -0700 (PDT) In-Reply-To: <4D9ADA89.8000307@redhat.com> References: <4D95909E.4060309@redhat.com> <4D959C24.8030408@redhat.com> <238A96A773B3934685A7269CC8A8D04272EFEFD5C3@GVW0436EXB.americas.hpqcorp.net> <4D997D8C.9060903@redhat.com> <4D9993D4.9040704@redhat.com> <4D9ADA89.8000307@redhat.com> From: Erik Groeneveld Date: Tue, 05 Apr 2011 12:02:00 -0000 Message-ID: Subject: Re: GC leaks debugging To: Andrew Haley Cc: java@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00029.txt.bz2 >> >> I have done many tests, with different programs, which all run >> flawlessly on OpenJDK, but explode on GCJ. =C2=A0I have run some test la= st >> night, and I'll see from the logs that the heap is 1 GB, while about >> 700 MB of it is free. > > That sounds like it's working perfectly, then. =C2=A0What is the problem? The problem is that the tests don't use much memory at all, but the heap keeps expanding, the collection cycles become less frequent and take longer and longer. Even on a system with 64GB, it just fills it up. This particular test repeats 13 million times the same code before it gets killed by OOM killer. The logs says, just before the kill (sizes in MB by me): -----------------------begin log----------------------- ***Finalization statistics: 55286 finalization table entries; 55 disappearing links 0 objects are eligible for immediate finalization ***Static roots: From 0x603000 to 0x603480 (temporary) From 0x7f81d5a00000 to 0x7f81d6349d48 (temporary) From 0x7f81d3069000 to 0x7f81d31b3c80 (temporary) Total size: 11095624 (10 MB) ***Heap sections: Total heap size: 959184896 (914 MB) Section 0 from 0x7f81d1503000 to 0x7f81d1513000 0/16 blacklisted Section 1 from 0x7f81d14e3000 to 0x7f81d14f3000 0/16 blacklisted // more, only few blacklisted Section 130 from 0x7f81957ce000 to 0x7f8195fce000 0/2048 blacklisted Section 131 from 0x7f8194f8e000 to 0x7f819578e000 0/2048 blacklisted ***Free blocks: Free list 2 (Total size 8192): 0x7f81a9f94000 size 8192 not black listed Free list 5 (Total size 10444800): 0x7f81a98c8000 size 20480 not black listed 0x7f81a9aee000 size 20480 not black listed // many, many more Free list 60 (Total size 5775360): 0x7f8195358000 size 4415488 not black listed 0x7f81a306b000 size 1359872 partially black listed Total of 672296960 bytes on free list (641 MB) ***Blocks in use: // cut blocks =3D 67177, bytes =3D 286887936 (273 MB) ***Finalization statistics: 38070 finalization table entries; 55 disappearing links 0 objects are eligible for immediate finalization -----------------------end log----------------------- The tests work fine on OpenJDK. What could cause GCJ to grow the heap infinitely? Erik PS Even compressed, the complete log is over the mailing-list allowed attachment size, so I gave an extract.