Re: Can't throw the dreaded 'idle in transaction' - need help! - Mailing list pgsql-jdbc

From Vadim Nasardinov
Subject Re: Can't throw the dreaded 'idle in transaction' - need help!
Date
Msg-id 200411231015.29259@vadim.nasardinov
Whole thread Raw
In response to Re: Can't throw the dreaded 'idle in transaction' - need help!  ("Temp02" <temp02@bluereef.com.au>)
List pgsql-jdbc
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.


pgsql-jdbc by date:

Previous
From: Vadim Nasardinov
Date:
Subject: better logging on the backend (was: Re: When running with autocommit false only the first BEGIN)
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Strange server error with current 8.0beta driver