0 Replies Latest reply on Nov 13, 2012 2:18 PM by Abhishek Goel

    java.net.socketinputstream.socketread0 hangs JBoss thread

    Abhishek Goel Newbie

      Hello All

       

      I am running JBOSS EAP 4.2.

      In my production environment, most of JBOSS AJP threads hang while comminicating with service provider (e.g. Oracle, Third party application via http client, third party applicaiton via REST webSerives).

      I looked at thread dump and it shows that threads are sleeping at socketRead. Sample thread below.

       

      Looks like Socket.read timeout need to be in place to timeout any such thread and to avoid thread hung situation, but I am not sure where and how to configure this timeout? Can any one of you give me some pointers?

      Please let me know if there is any other solution available. We are using 'xa-datasource' for oracle 11g connectivity.

       

      "ajp-0.0.0.0-8009-7" daemon prio=1 tid=0x0000000045962480 nid=0x66ca sleeping[0x000000004828a000..0x000000004828cc90]

      at java.net.SocketInputStream.socketRead0(Native Method)

      at java.net.SocketInputStream.read(SocketInputStream.java:129)

      at oracle.net.ns.Packet.receive(Unknown Source)

      at oracle.net.ns.DataPacket.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.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1099)

      at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1070)

      at oracle.jdbc.driver.T4CTTIOtxse.receive(T4CTTIOtxse.java:233)

      at oracle.jdbc.driver.T4CXAResource.doEnd(T4CXAResource.java:332)

      - locked <0x00002aac0fe5fa98> (a oracle.jdbc.driver.T4CXAResource)

      - locked <0x00002aac112c7dd0> (a oracle.jdbc.driver.T4CConnection)

      at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:376)

      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:158)

      at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.end(JcaXAResourceWrapper.java:58)

      at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:648)

      at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2626)

      at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)

      - locked <0x00002aaba30a3c78> (a com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction)

      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)

      at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)

      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1406)

      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)

      at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)

       

      Thanks,

      abhi