weird GC problem

Bryce McKinlay bryce@albatross.co.nz
Sat Dec 23 00:40:00 GMT 2000


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 ]


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /