9 Replies Latest reply: Dec 27, 2012 2:24 PM by Joe Weinstein-Oracle RSS

    JDBC Driver 11.2.0.1.0 freeze after execute query with order by

    Junior Sousa

      Hi,

      I have two tables : A and B

      The table B has as foreign key the ID from table A.

      I'm executing statment select id, foreing_id, name from table b order by foreing_id;

      After executing query I see on database that query remains inactive and I don't receive any response on my client.

      I've activate the oracle driver logs and I notice that driver stop working after these lines

      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.OracleSql getSqlBytes
      TRACE_30: return: [B@126f827
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.OracleSql getSqlBytes
      TRACE_30: Exit
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
      TRACE_16: Enter:
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
      TRACE_16: return: 178
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
      TRACE_16: Exit
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
      TRACE_16: Enter:
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
      TRACE_16: return: 2000
      Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
      TRACE_16: Exit

      I'm using linux machine to execute this query, and I tried execute this same application in another linux machine and the query works.

      It's very strange, for instance, this only happens if I have two records on table B using the id from table A, and also happens if only one record from table A.

      Could someone help me what's going on with oracle driver?

        • 1. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
          Joe Weinstein-Oracle
          Can you give us a thread dump of the application to see where the driver is hung?
          If you can include the full DDL of the table(s), that might help.
          What version of dbms?
          • 2. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
            gimbal2
            Did you try with a different driver version (older or newer) to see if the problem persists? Right now for all we know you're running into a bug specific to the version you're using.
            • 3. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
              Junior Sousa
              LOG ORACLE DRIVER_

              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql initialize
              TRACE_30: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql computeBasicInfo
              TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql computeBasicInfo
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
              TRACE_30: return: 0
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
              TRACE_30: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement prepareForNewResults
              TRACE_16: Enter: true, true
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement clearWarnings
              TRACE_16: Public Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement clearWarnings
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement prepareForNewResults
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
              TRACE_20: Debug: needToPrepareDefineBuffer = true
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
              CONFIG: SQL: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
              TRACE_16: Enter: null
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
              TRACE_16: Enter: null
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLine
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLineUnchecked
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLineUnchecked
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLine
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection open
              TRACE_16: Enter: oracle.jdbc.driver.T4CStatement@af72d8
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
              TRACE_16: Enter: "T4CConnection.open"
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement setCursorId
              TRACE_16: Enter: 0
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement setCursorId
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection open
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement executeMaybeDescribe
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement executeMaybeDescribe
              TRACE_20: Debug: rowPrefetchChanged = false, needToParse = true, needToPrepareDefineBuffer = true, columnsDefinedByUser = false
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CStatement executeForDescribe
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
              TRACE_16: Enter: "oracle.jdbc.driver.T4CStatement.execute_for_describe"
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
              TRACE_16: Enter: null
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
              TRACE_16: Enter: null
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
              TRACE_16: Enter: "oracle.jdbc.driver.T4CStatement.doOall8"
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedMessages
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedClose
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedClose
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedMessages
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
              TRACE_16: Enter: true, false
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
              TRACE_16: Enter: true, false
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
              TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql skipSpace
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql skipSpace
              TRACE_30: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql handleODBC
              TRACE_16: Enter: NORMAL
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql handleODBC
              TRACE_30: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
              TRACE_16: return: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
              TRACE_30: return: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
              TRACE_30: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
              TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
              TRACE_16: return: [B@289d2e
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
              TRACE_30: return: [B@289d2e
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
              TRACE_30: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
              TRACE_16: return: 178
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
              TRACE_16: Exit
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
              TRACE_16: Enter:
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
              TRACE_16: return: 2000
              Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
              TRACE_16: Exit


              DDL TABLE A*

              CREATE TABLE "TABLE_A"
              (     "ID" NUMBER NOT NULL ENABLE,
                   "NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
                   "TYPE" NUMBER NOT NULL ENABLE,
                   "VERSION" VARCHAR2(30 BYTE) NOT NULL ENABLE,
                   "ISIMPLIED" NUMBER(1,0),
                   CONSTRAINT "TABLE_A_PK" PRIMARY KEY ("ID")
              USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ENABLE
              ) SEGMENT CREATION IMMEDIATE
              PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ;


              CREATE UNIQUE INDEX "TABLE_A_NAME_UNIQ" ON "TABLE_A" ("NAME")
              PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ;

              CREATE UNIQUE INDEX "TABLE_A_PK" ON "TABLE_A" ("ID")
              PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ;

              DDL Table B:_

              CREATE TABLE "TABLE_B"
              (     "ID" NUMBER NOT NULL ENABLE,
                   "TABLE_A_ID" NUMBER NOT NULL ENABLE,
                   "NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
                   "URL" VARCHAR2(2000 BYTE) NOT NULL ENABLE,
                   "ISACTIVE" NUMBER(1,0) NOT NULL ENABLE,
                   CONSTRAINT "TABLE_B_PK" PRIMARY KEY ("ID")
              USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ENABLE,
                   CONSTRAINT "TABLE_A_FK" FOREIGN KEY ("TABLE_A_ID")
                   REFERENCES "TABLE_A" ("ID") ON DELETE CASCADE ENABLE
              ) SEGMENT CREATION IMMEDIATE
              PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ;


              CREATE UNIQUE INDEX "TABLE_B_NAME_UNIQ" ON "TABLE_B" ("NAME")
              PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ;

              CREATE UNIQUE INDEX "TABLE_B_PK" ON "TABLE_B" ("ID")
              PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
              STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
              PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
              TABLESPACE "APPDATA" ;

              Comments*_

              After line: Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId TRACE_16: Exit the driver freeze.

              I can see on DB that query keep INACTIVE and oracle driver doesn't throws any exception.

              My Oracle version is 11.2.0.1.0 and as well as oracle driver, I also tried use the version 11.2.0.3.0 but the problem persists.

              More facts:

              If I remove or replace by another field the clause order by TABLE_A_ID from query the query works.
              In this case, I have two recods on TABLE_B with TABLE_A_ID equals 2, if I remove one of these records the query works.

              The bug happens only one specific machine where the number of routers is bigger than another machine that works with all possible scenarios.

              Edited by: 978737 on Dec 27, 2012 12:11 PM
              • 4. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
                Joe Weinstein-Oracle
                that debug tracing is not what I need. What I need is a java stack trace of the thread when it is hanging.
                Get it by sending a <CTL><BRK> or a <CTL>\ to the JVM (depending on the OS)...
                • 5. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
                  Junior Sousa
                  Is this?

                  Full thread dump Java HotSpot(TM) Server VM (20.1-b02 mixed mode):

                  "Low Memory Detector" daemon prio=10 tid=0xaf34a000 nid=0x3c38 runnable [0x00000000]
                  java.lang.Thread.State: RUNNABLE

                  "C2 CompilerThread1" daemon prio=10 tid=0xaf348000 nid=0x3c37 waiting on condition [0x00000000]
                  java.lang.Thread.State: RUNNABLE

                  "C2 CompilerThread0" daemon prio=10 tid=0xaf346000 nid=0x3c36 waiting on condition [0x00000000]
                  java.lang.Thread.State: RUNNABLE

                  "Signal Dispatcher" daemon prio=10 tid=0xaf344400 nid=0x3c35 waiting on condition [0x00000000]
                  java.lang.Thread.State: RUNNABLE

                  "Finalizer" daemon prio=10 tid=0xaf336000 nid=0x3c34 in Object.wait() [0xaf22c000]
                  java.lang.Thread.State: WAITING (on object monitor)
                  at java.lang.Object.wait(Native Method)
                  - waiting on <0xdfeb0250> (a java.lang.ref.ReferenceQueue$Lock)
                  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
                  - locked <0xdfeb0250> (a java.lang.ref.ReferenceQueue$Lock)
                  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
                  at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

                  "Reference Handler" daemon prio=10 tid=0xaf334800 nid=0x3c33 in Object.wait() [0xaf27d000]
                  java.lang.Thread.State: WAITING (on object monitor)
                  at java.lang.Object.wait(Native Method)
                  - waiting on <0xdfeb80e0> (a java.lang.ref.Reference$Lock)
                  at java.lang.Object.wait(Object.java:485)
                  at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
                  - locked <0xdfeb80e0> (a java.lang.ref.Reference$Lock)

                  "main" prio=10 tid=0x08e04800 nid=0x3c24 runnable [0xf72fd000]
                  java.lang.Thread.State: RUNNABLE
                  at java.net.SocketInputStream.socketRead0(Native Method)
                  at java.net.SocketInputStream.read(SocketInputStream.java:129)
                  at oracle.net.ns.Packet.receive(Packet.java:286)
                  at oracle.net.ns.DataPacket.receive(DataPacket.java:100)
                  at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:227)
                  at oracle.net.ns.NetInputStream.read(NetInputStream.java:172)
                  at oracle.net.ns.NetInputStream.read(NetInputStream.java:97)
                  at oracle.net.ns.NetInputStream.read(NetInputStream.java:82)
                  at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:119)
                  at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:75)
                  at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1263)
                  at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1238)
                  at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:296)
                  at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:193)
                  at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
                  at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:197)
                  at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1068)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1348)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1539)
                  at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1810)
                  - locked <0xdff06118> (a oracle.jdbc.driver.T4CConnection)
                  at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1281)
                  at Teste.main(Teste.java:21)

                  "VM Thread" prio=10 tid=0xaf330c00 nid=0x3c32 runnable

                  "GC task thread#0 (ParallelGC)" prio=10 tid=0x08e0c000 nid=0x3c25 runnable

                  "GC task thread#1 (ParallelGC)" prio=10 tid=0x08e0d400 nid=0x3c26 runnable

                  "GC task thread#2 (ParallelGC)" prio=10 tid=0x08e0ec00 nid=0x3c27 runnable

                  "GC task thread#3 (ParallelGC)" prio=10 tid=0x08e10000 nid=0x3c28 runnable

                  "GC task thread#4 (ParallelGC)" prio=10 tid=0x08e11800 nid=0x3c29 runnable

                  "GC task thread#5 (ParallelGC)" prio=10 tid=0x08e13000 nid=0x3c2a runnable

                  "GC task thread#6 (ParallelGC)" prio=10 tid=0x08e14400 nid=0x3c2b runnable

                  "GC task thread#7 (ParallelGC)" prio=10 tid=0x08e15c00 nid=0x3c2c runnable

                  "GC task thread#8 (ParallelGC)" prio=10 tid=0x08e17000 nid=0x3c2d runnable

                  "GC task thread#9 (ParallelGC)" prio=10 tid=0x08e18800 nid=0x3c2e runnable

                  "GC task thread#10 (ParallelGC)" prio=10 tid=0x08e19c00 nid=0x3c2f runnable

                  "GC task thread#11 (ParallelGC)" prio=10 tid=0x08e1b400 nid=0x3c30 runnable

                  "GC task thread#12 (ParallelGC)" prio=10 tid=0x08e1cc00 nid=0x3c31 runnable

                  "VM Periodic Task Thread" prio=10 tid=0xaf34c000 nid=0x3c39 waiting on condition

                  JNI global references: 1043

                  Heap
                  PSYoungGen total 19136K, used 9014K [0xdec00000, 0xe1160000, 0xf4150000)
                  eden space 16448K, 46% used [0xdec00000,0xdf369558,0xdfc10000)
                  from space 2688K, 53% used [0xdfeb0000,0xe0014500,0xe0150000)
                  to space 2688K, 0% used [0xdfc10000,0xdfc10000,0xdfeb0000)
                  PSOldGen total 43712K, used 0K [0xb4150000, 0xb6c00000, 0xdec00000)
                  object space 43712K, 0% used [0xb4150000,0xb4150000,0xb6c00000)
                  PSPermGen total 16384K, used 10601K [0xb0150000, 0xb1150000, 0xb4150000)
                  object space 16384K, 64% used [0xb0150000,0xb0baa680,0xb1150000)
                  • 6. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
                    Joe Weinstein-Oracle
                    Yes, that is the stack trace. It shows the driver waiting for some sort of
                    expected response from the DBMS.

                    Now, what version of the DBMS? Please put this in your program, before the
                    executeQuery() call:

                    (assume your connection object is 'c')

                    System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
                    System.out.println("The DBMS is " + c.getMetaData().getDatabaseProductVersion() );

                    This sounds like you should send this to Oracle support. I recommend writing the
                    reproducer program so it creates the tables you need and puts in whatever rows
                    to think are needed, then does this query. That way support will have no way to
                    escape pursuing the fix...
                    • 7. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
                      Junior Sousa
                      I got you. It's a strange behavior.

                      Follow the info about driver and dbms:

                      The driver is 11.2.0.1.0
                      The DBMS is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
                      With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
                      Data Mining and Real Application Testing options

                      2012-12-27 16:44:29
                      Full thread dump Java HotSpot(TM) Server VM (20.1-b02 mixed mode):

                      "Low Memory Detector" daemon prio=10 tid=0xaf603000 nid=0x81d runnable [0x00000000]
                      ....
                      • 8. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
                        Joe Weinstein-Oracle
                        Yes, especially if you're sure the DBMS thinks there is nothing going on with that connection/session...
                        Contact support.
                        • 9. Re: JDBC Driver 11.2.0.1.0 freeze after execute query with order by
                          Junior Sousa
                          Thanks Joe, I'll try contact support.

                          It's very interesting/funny case, I don't know why this same application using this same database works when I run it from another machine.