X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 913BF11F6606 for ; Tue, 11 Apr 2006 19:37:58 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 required=5 tests=[none] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id 4CXh+L7I1kPS for ; Tue, 11 Apr 2006 19:37:56 -0300 (ADT) X-Greylist: delayed 00:31:32.667448 by SQLgrey- Received: from mail.cs.mcgill.ca (mail.CS.McGill.CA [132.206.51.234]) by postgresql.org (Postfix) with ESMTP id A066411F656C for ; Tue, 11 Apr 2006 19:37:48 -0300 (ADT) Received: from mail.cs.mcgill.ca (localhost [127.0.0.1]) by mail.cs.mcgill.ca (Postfix) with ESMTP id 99F3A2F90E for ; Tue, 11 Apr 2006 18:06:15 -0400 (EDT) Received: from 132.206.52.74 (SquirrelMail authenticated user ylin30) by mail.cs.mcgill.ca with HTTP; Tue, 11 Apr 2006 18:06:15 -0400 (EDT) Message-ID: <59619.132.206.52.74.1144793175.squirrel@mail.cs.mcgill.ca> Date: Tue, 11 Apr 2006 18:06:15 -0400 (EDT) Subject: FastPath blocked when ERROR is thrown From: "Yi Lin" To: pgsql-jdbc@postgresql.org User-Agent: SquirrelMail/1.5.1 [CVS] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200604/82 X-Sequence-Number: 15016 HI I used java API FastPath.fastpath(fid, ...) to call a C function PGfn(conn, fid,...) in the kernal. But if there is an exception (i.e., ERROR messages is thrown in the backend due to elog(ERROR, ...)), the FastPath.fastpath(fid, ..) is blocked and never returns. The DB backend is also dead. I have to "pkill -9 post" in order to restore everything. Can anyone give a clue of what the problems should be? Where should are the bugs possibly located? The java codes is attached: public boolean putWriteSet(java.sql.Connection conn, byte[] writeSet) throws SQLException { Fastpath fp = ((org.postgresql.Connection)conn).getFastpathAPI(); FastpathArg[] args = new FastpathArg[1]; args[0] = new FastpathArg(writeSet); fp.fastpath(2075, false, args); //to apply writeset, indirectly call PQfn(conn, 2075, ...) implemented in the kernal in C. return true; } I am not the original author of C version PQfn(.,2075,..) so I have no idea where and how to debug it. I doubt that the blocking is due to implementation of C part instead of Java part. But I don't know how to start my debugging. thanks in advance! ======================================= Yi Lin Ph.D. candidate School of Computer Science McGill University Montreal, Quebec,Canada URL: http://www.cs.mcgill.ca/~ylin30/ \\\ $ /// @ @ ======o0o==0==o0o======================