public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/30886] Memory collection deadlock
  2007-02-20 15:48 [Bug java/30886] New: Memory collection deadlock swagiaal at redhat dot com
@ 2007-02-20 15:48 ` swagiaal at redhat dot com
  2007-02-21 13:38 ` [Bug libgcj/30886] " aph at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: swagiaal at redhat dot com @ 2007-02-20 15:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from swagiaal at redhat dot com  2007-02-20 15:48 -------
Created an attachment (id=13075)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13075&action=view)
test case


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug java/30886]  New: Memory collection deadlock
@ 2007-02-20 15:48 swagiaal at redhat dot com
  2007-02-20 15:48 ` [Bug java/30886] " swagiaal at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: swagiaal at redhat dot com @ 2007-02-20 15:48 UTC (permalink / raw)
  To: gcc-bugs

While writing a test case for a Java-Gnome memory leak, I found that my test
case hangs every once in a while. Attached is the test case with all the
unrelated code removed.

The commented out lines ([1][2] and [3]) just change the frequencey of the
hang.

It doenst always hang so I just do this:
   while true; do ./TestGCJGC ; done
untill it hangs

gcj -v:
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)


-- 
           Summary: Memory collection deadlock
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: swagiaal at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/30886] Memory collection deadlock
  2007-02-20 15:48 [Bug java/30886] New: Memory collection deadlock swagiaal at redhat dot com
  2007-02-20 15:48 ` [Bug java/30886] " swagiaal at redhat dot com
@ 2007-02-21 13:38 ` aph at gcc dot gnu dot org
  2007-02-22 15:11 ` swagiaal at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: aph at gcc dot gnu dot org @ 2007-02-21 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from aph at gcc dot gnu dot org  2007-02-21 13:38 -------
I don't understand what this is supposed to be testing.

Can you please explain what your expected behaviour is?


-- 

aph at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/30886] Memory collection deadlock
  2007-02-20 15:48 [Bug java/30886] New: Memory collection deadlock swagiaal at redhat dot com
  2007-02-20 15:48 ` [Bug java/30886] " swagiaal at redhat dot com
  2007-02-21 13:38 ` [Bug libgcj/30886] " aph at gcc dot gnu dot org
@ 2007-02-22 15:11 ` swagiaal at redhat dot com
  2007-02-22 15:19 ` aph at gcc dot gnu dot org
  2007-02-22 15:35 ` swagiaal at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: swagiaal at redhat dot com @ 2007-02-22 15:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from swagiaal at redhat dot com  2007-02-22 15:11 -------
Expected:
  The collection quota (500 objects) is met and the program exits with a pass

Actual;
  The program hangs before the quota is met. Some times not a single object is
collected.
  This happens more frequently if System.gc() is called


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/30886] Memory collection deadlock
  2007-02-20 15:48 [Bug java/30886] New: Memory collection deadlock swagiaal at redhat dot com
                   ` (2 preceding siblings ...)
  2007-02-22 15:11 ` swagiaal at redhat dot com
@ 2007-02-22 15:19 ` aph at gcc dot gnu dot org
  2007-02-22 15:35 ` swagiaal at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: aph at gcc dot gnu dot org @ 2007-02-22 15:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from aph at gcc dot gnu dot org  2007-02-22 15:19 -------
I can't see anything in the Java Language Standard that suggests that your test
case must terminate.  Garbage collection is not deterministic, and may not
collect all objects.

When I tried your test case one object was not reclaimed, probably because a
reference to it still existed in the stack.  In gcj we do a conservative scan
of the stack, and there may be stale references that prevent objects from being
collected.  To guarantee that everything is collected you have to do a precise
scan, and we deliberately don't do that.


-- 

aph at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/30886] Memory collection deadlock
  2007-02-20 15:48 [Bug java/30886] New: Memory collection deadlock swagiaal at redhat dot com
                   ` (3 preceding siblings ...)
  2007-02-22 15:19 ` aph at gcc dot gnu dot org
@ 2007-02-22 15:35 ` swagiaal at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: swagiaal at redhat dot com @ 2007-02-22 15:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from swagiaal at redhat dot com  2007-02-22 15:35 -------
Fare enough, I just thought I would bring my test case to your attention.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-22 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20 15:48 [Bug java/30886] New: Memory collection deadlock swagiaal at redhat dot com
2007-02-20 15:48 ` [Bug java/30886] " swagiaal at redhat dot com
2007-02-21 13:38 ` [Bug libgcj/30886] " aph at gcc dot gnu dot org
2007-02-22 15:11 ` swagiaal at redhat dot com
2007-02-22 15:19 ` aph at gcc dot gnu dot org
2007-02-22 15:35 ` swagiaal at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).