X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D502E3A3F29 for ; Tue, 23 Nov 2004 15:08:36 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80798-06 for ; Tue, 23 Nov 2004 15:08:20 +0000 (GMT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by svr1.postgresql.org (Postfix) with ESMTP id 1D9EB3A3F1C for ; Tue, 23 Nov 2004 15:08:23 +0000 (GMT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iANF8K7Z013020; Tue, 23 Nov 2004 10:08:20 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iANF8Ar06001; Tue, 23 Nov 2004 10:08:10 -0500 Received: from 192.168.1.2 (vpn83-131.boston.redhat.com [172.16.83.131]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id iANF84ht007662; Tue, 23 Nov 2004 10:08:05 -0500 From: Vadim Nasardinov Organization: Red Hat / Westford To: pgsql-jdbc@postgresql.org Subject: Re: Can't throw the dreaded 'idle in transaction' - need help! Date: Tue, 23 Nov 2004 10:15:29 -0500 User-Agent: KMail/1.5.4 References: <02fe01c4d054$b60a5fe0$2201010a@bluereef.local> <41A1870F.4030506@opencloud.com> <002d01c4d122$2abdc6b0$2201010a@bluereef.local> In-Reply-To: <002d01c4d122$2abdc6b0$2201010a@bluereef.local> Cc: temp02@bluereef.com.au MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411231015.29259@vadim.nasardinov> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/186 X-Sequence-Number: 11608 On Tuesday 23 November 2004 01:03, Temp02 wrote: > We don't use any Java locking with the application we leave it all > up to the DB. Not a single synchronized block of code in your entire application? Did you try sending a SIGQUIT to your application, as Oliver suggested in http://archives.postgresql.org/pgsql-jdbc/2004-11/msg00169.php | $ cat Main.java | public class Main { | public static void main(String[] _) throws InterruptedException { | while (true) { | Thread.sleep(1000); | } | } | } | | $ javac Main.java | $ java -cp . Main & | [1] 9346 | $ ps -ef | grep java | vadim 9346 7513 3 10:03 pts/0 00:00:00 java -cp . Main In response to a SIGQUIT, the JRE should dump stack traces for all the current threads, like so: | $ kill -QUIT 9346 | Full thread dump Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode): | | "Signal Dispatcher" daemon prio=1 tid=0x08095950 nid=0x2482 waiting on condition [0..0] | | "Finalizer" daemon prio=1 tid=0x08090e90 nid=0x2482 in Object.wait() [4c792000..4c79287c] | at java.lang.Object.wait(Native Method) | - waiting on <0x44590490> (a java.lang.ref.ReferenceQueue$Lock) | at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111) | - locked <0x44590490> (a java.lang.ref.ReferenceQueue$Lock) | at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127) | at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) | | "Reference Handler" daemon prio=1 tid=0x080902e8 nid=0x2482 in Object.wait() [4c711000..4c71187c] | at java.lang.Object.wait(Native Method) | - waiting on <0x44590380> (a java.lang.ref.Reference$Lock) | at java.lang.Object.wait(Object.java:429) | at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115) | - locked <0x44590380> (a java.lang.ref.Reference$Lock) | | "main" prio=1 tid=0x0805ab88 nid=0x2482 waiting on condition [bfffd000..bfffd55c] | at java.lang.Thread.sleep(Native Method) | at Main.main(Main.java:4) | | "VM Thread" prio=1 tid=0x0808f088 nid=0x2482 runnable | | "VM Periodic Task Thread" prio=1 tid=0x080981a0 nid=0x2482 waiting on condition | "Suspend Checker Thread" prio=1 tid=0x08094f98 nid=0x2482 runnable Except yours will be a lot longer.