Subject Re: [Firebird-Java] Firebird finalizer
Author Mark Rotteveel
I assume you are using one connection per thread (or at least: not share
connections with multiple threads).

This problem can be avoided by explicitly closing statements instead of
letting the finalizer handle this. As too the cause of the problem, I
have no idea. It looks like Jaybird is waiting for a response of the server.


Kanka sumatra wrote:
> My application which is using Firebird classic (2.1.1) hangs.
> There are multiple threads spawned off and all of them do inserts and
> reads and return except for one. On viewing the threads via jconsole it
> seems to be blocked on firebird's finalizer. The jconsole output is listed
> below. Can anyone throw some light on this please?
> We are using hibernate and spring and I do not see any open connections
> issue.
> Thanks in advance.
> Jconsole o/p:
> --------------------------------
> Name: Finalizer
> Total blocked: 528 Total waited: 147
> Stack trace:
> Method)
> Source)
> org.firebirdsql.gds.impl.wire.XdrInputStream.readInt(
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.nextOperation(AbstractJavaGDSI\
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGD\
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlFreeStatement(AbstractJ\
> - locked org.firebirdsql.gds.impl.wire.isc_db_handle_impl@c9d6ed
> org.firebirdsql.gds.impl.GDSHelper.closeStatement(
> org.firebirdsql.jdbc.AbstractStatement.close(
> - locked org.firebirdsql.jdbc.FBPreparedStatement@599060
> org.firebirdsql.jdbc.AbstractStatement.finalize(
> java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
> java.lang.ref.Finalizer.runFinalizer(Unknown Source)
> java.lang.ref.Finalizer.access$100(Unknown Source)
> java.lang.ref.Finalizer$ Source)
> --------------------------------

Mark Rotteveel