Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Exclamation Unanswered: Random Thread problems

    Running both on Linux Red Hat 7.2 and 8.0 with Oracle 9.2.0, ojdbc14.jar and JDK 1.4.0_02.

    We have been having threads that occasionally freeze. Looking at the JVM thread dump, we see a repeated pattern (see below) where by two threads get stuck at java.net.SocketInputStream.read(SocketInputStream. java:116). The frozen thread socket read commands always originate an oracle.sql.CLOB.getChunkSize command and a normal SQL statement.

    My initial hunch was a concurrency issue at an OS level but seeing that we were able to reproduce the error both under Red Hat 7.2 and 8.0 I must look to either the JVM, the Oracle thin JDBC or the DB itself. Note that reproducing the problem involves generating a very high traffic rate and waiting till the case happens.

    Any similar experiences? Any one with some clues?

    "Thread-31" prio=1 tid=0x0x822aec8 nid=0x3951 runnable [65090000..6509085c]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream. java:116)
    at oracle.net.ns.Packet.receive(Unknown Source)
    at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine. java:931)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine. java:893)
    at oracle.jdbc.ttc7.v8TTILob.receiveReply(v8TTILob.ja va:955)
    at oracle.jdbc.ttc7.v8TTILob.getChunkSize(v8TTILob.ja va:345)
    at oracle.jdbc.ttc7.TTC7Protocol.getLobChunkSize(TTC7 Protocol.java:3034)
    at oracle.sql.LobDBAccessImpl.getChunkSize(LobDBAcces sImpl.java:686)
    - locked <0x4688f498> (a oracle.sql.LobDBAccessImpl)
    at oracle.sql.CLOB.getChunkSize(CLOB.java:664)
    at oracle.sql.CLOB.getBufferSize(CLOB.java:689)
    at oracle.sql.CLOB.getCharacterStream(CLOB.java:317)
    at upstream.xsys.SQLMgr.readCLOB(SQLMgr.java:75)
    at upstream.xsys.xSmsUserMgr.makeUser(xSmsUserMgr.jav a:205)
    at upstream.xsys.xSmsUserMgr.readUser(xSmsUserMgr.jav a:138)
    at upstream.xsys.xSmsUserMgr.addUser(xSmsUserMgr.java :115)
    ...

    "Thread-30" prio=1 tid=0x0x82e4488 nid=0x394f runnable [64f8d000..64f8e85c]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputSteam.j ava:116)
    at oracle.net.ns.Packet.receive(Unknown Source)
    at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine. java:931)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine. java:893)
    at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
    at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.ja va:586)
    - locked <0x46827428> (a oracle.jdbc.ttc7.TTC7Protocol)
    at oracle.jdbc.driver.OracleStatement.<init>(OracleSt atement.java:385)
    at oracle.jdbc.driver.OracleStatement.<init>(OracleSt atement.java:413)
    at oracle.jdbc.driver.OraclePreparedStatement.<init>( OraclePreparedStatement.java:119)
    at oracle.jdbc.driver.OracleCallableStatement.<init>( OracleCallableStatement.java:77)
    at oracle.jdbc.driver.OracleCallableStatement.<init>( OracleCallableStatement.java:48)
    at oracle.jdbc.driver.OracleConnection.privatePrepare Call(OracleConnection.java:1133)
    at oracle.jdbc.driver.OracleConnection.prepareCall(Or acleConnection.java:988)
    - locked <0x46823830> (a oracle.jdbc.driver.OracleConnection)
    at com.addval.dbutils.DBConnection.prepareCall(DBConn ection.java:232)
    at com.upstreamsystems.sms.outbound.OutboundManager.a ddToTable(OutboundManager.java:360)
    at com.upstreamsystems.sms.outbound.OutboundManager.s endToGateway(OutboundManager.java:334)
    ...

    Patrick Hargitt

  2. #2
    Join Date
    Feb 2004
    Posts
    1

    Re: Random Thread problems

    Hi Phargitt,

    I also have the similar problem and i do not have a solution .Our production server crashes often because of this we are using redhat ES release 2.1 ,jdk 1.4.1_03 , weblogic 8.1 sp1 and oracle database 9.2.0.2

    Could you please give me areply if you have found out the solution .My email address shirley.remedios@jobpartners.com

    Cheers

    Shirley


    Originally posted by phargitt
    Running both on Linux Red Hat 7.2 and 8.0 with Oracle 9.2.0, ojdbc14.jar and JDK 1.4.0_02.

    We have been having threads that occasionally freeze. Looking at the JVM thread dump, we see a repeated pattern (see below) where by two threads get stuck at java.net.SocketInputStream.read(SocketInputStream. java:116). The frozen thread socket read commands always originate an oracle.sql.CLOB.getChunkSize command and a normal SQL statement.

    My initial hunch was a concurrency issue at an OS level but seeing that we were able to reproduce the error both under Red Hat 7.2 and 8.0 I must look to either the JVM, the Oracle thin JDBC or the DB itself. Note that reproducing the problem involves generating a very high traffic rate and waiting till the case happens.

    Any similar experiences? Any one with some clues?

    "Thread-31" prio=1 tid=0x0x822aec8 nid=0x3951 runnable [65090000..6509085c]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream. java:116)
    at oracle.net.ns.Packet.receive(Unknown Source)
    at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine. java:931)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine. java:893)
    at oracle.jdbc.ttc7.v8TTILob.receiveReply(v8TTILob.ja va:955)
    at oracle.jdbc.ttc7.v8TTILob.getChunkSize(v8TTILob.ja va:345)
    at oracle.jdbc.ttc7.TTC7Protocol.getLobChunkSize(TTC7 Protocol.java:3034)
    at oracle.sql.LobDBAccessImpl.getChunkSize(LobDBAcces sImpl.java:686)
    - locked <0x4688f498> (a oracle.sql.LobDBAccessImpl)
    at oracle.sql.CLOB.getChunkSize(CLOB.java:664)
    at oracle.sql.CLOB.getBufferSize(CLOB.java:689)
    at oracle.sql.CLOB.getCharacterStream(CLOB.java:317)
    at upstream.xsys.SQLMgr.readCLOB(SQLMgr.java:75)
    at upstream.xsys.xSmsUserMgr.makeUser(xSmsUserMgr.jav a:205)
    at upstream.xsys.xSmsUserMgr.readUser(xSmsUserMgr.jav a:138)
    at upstream.xsys.xSmsUserMgr.addUser(xSmsUserMgr.java :115)
    ...

    "Thread-30" prio=1 tid=0x0x82e4488 nid=0x394f runnable [64f8d000..64f8e85c]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputSteam.j ava:116)
    at oracle.net.ns.Packet.receive(Unknown Source)
    at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine. java:931)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine. java:893)
    at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
    at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.ja va:586)
    - locked <0x46827428> (a oracle.jdbc.ttc7.TTC7Protocol)
    at oracle.jdbc.driver.OracleStatement.<init>(OracleSt atement.java:385)
    at oracle.jdbc.driver.OracleStatement.<init>(OracleSt atement.java:413)
    at oracle.jdbc.driver.OraclePreparedStatement.<init>( OraclePreparedStatement.java:119)
    at oracle.jdbc.driver.OracleCallableStatement.<init>( OracleCallableStatement.java:77)
    at oracle.jdbc.driver.OracleCallableStatement.<init>( OracleCallableStatement.java:48)
    at oracle.jdbc.driver.OracleConnection.privatePrepare Call(OracleConnection.java:1133)
    at oracle.jdbc.driver.OracleConnection.prepareCall(Or acleConnection.java:988)
    - locked <0x46823830> (a oracle.jdbc.driver.OracleConnection)
    at com.addval.dbutils.DBConnection.prepareCall(DBConn ection.java:232)
    at com.upstreamsystems.sms.outbound.OutboundManager.a ddToTable(OutboundManager.java:360)
    at com.upstreamsystems.sms.outbound.OutboundManager.s endToGateway(OutboundManager.java:334)
    ...

    Patrick Hargitt

  3. #3
    Join Date
    Aug 2003
    Posts
    3

    Re: Random Thread problems

    Hi,

    We did fix the problem.

    The solution is to not use a Connection object that is being used. The error you see is most probably because there are two queries being run through the same connection object.

    In our case the problem came from an application that released a connection to the database connection pool before having finished using it. Because it was released to the pool, another thread got it and started using it.

    Hope that helps.

    Patrick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •