This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: weird GC problem


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 ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]