This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: weird GC problem
- To: Jeff Sturm <jeff dot sturm at appnet dot com>
- Subject: Re: weird GC problem
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Sat, 23 Dec 2000 21:41:31 +1300
- CC: java-discuss at sources dot redhat dot com
- References: <3A445902.31BABB74@appnet.com>
Jeff Sturm wrote:
> So it seems that FileDescriptor.in had been inadvertently finalized by
> the GC, closing the native descriptor. Had it actually been collected
> as well, I would expect to see other failures sooner or later, as the
> vtable would be overwritten. But this isn't the case. The program runs
> for many iterations and always produces the correct answer, once I
> hacked alloc.c.
Have you tried putting a breakpoint on the finalizer and poking around in
gdb to try and figure out whats going on? Note that finalization is
somewhat broken in gcj anyway - if a finalizer tries to allocate it can
cause infinite looping, since we don't run the finalizers in a separate
thread yet. Finalizers seem to be rarely used in Java, which could be why
this hasn't been noticed before.
regards
[ bryce ]