Hi,
I am facing the following problem consistently. The driver (Jconnect
5.5 and 6.0 from Sybase)
code hangs in the read socket call and the rest of my threads
wait indefinitely resulting in a deadlock.
The problem occurs during insertion into the DB. Though my application
is multi-threaded, I have taken of sychronization at the application
level.
Have you faced similar problems before?. Could you please explain the
causes for the driver to wait indefinitely? Also, what do you suggest
to prevent these situations?
I have tried the code with Sybase ASA 9.0.1 with jconnect 5.5 and
jconnect 6.0 drivers on Sun JRE1.4(Win).
============================ Stack Trace ===========================
"RMI TCP Connection(173)-192.168.3.85" daemon prio=5 tid=0x24638618
nid=0xfe4 runnable [29b8e000..29b8fdb4]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
com.sybase.jdbc3.timedio.RawDbio.reallyRead(RawDbio.java:234)
at com.sybase.jdbc3.timedio.Dbio.doRead(Dbio.java:243)
at
com.sybase.jdbc3.timedio.InStreamMgr.readIfOwner(InStreamMgr.java:512)
at
com.sybase.jdbc3.timedio.InStreamMgr.doRead(InStreamMgr.java:273)
at
com.sybase.jdbc3.tds.TdsProtocolContext.getChunk(TdsProtocolContext.java:572)
at
com.sybase.jdbc3.tds.PduInputFormatter.readPacket(PduInputFormatter.java:229)
at
com.sybase.jdbc3.tds.PduInputFormatter.read(PduInputFormatter.java:62)
at
com.sybase.jdbc3.tds.TdsInputStream.read(TdsInputStream.java:81)
at
com.sybase.jdbc3.tds.TdsInputStream.readUnsignedByte(TdsInputStream.java:114)
at com.sybase.jdbc3.tds.Tds.nextResult(Tds.java:2192)
at
com.sybase.jdbc3.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at
com.sybase.jdbc3.jdbc.SybStatement.nextResult(SybStatement.java:220)
at
com.sybase.jdbc3.jdbc.SybStatement.nextResult(SybStatement.java:203)
at
com.sybase.jdbc3.jdbc.SybStatement.updateLoop(SybStatement.java:1811)
at
com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(SybStatement.java:1794)
at
com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(SybStatement.java:441)
at
com.abc.mo.persmo.PersistentMO.dbInsertRow(PersistentMO.java:945)
at
com.abc.mo.persmo.PersistentMO.dbUpdate(PersistentMO.java:1581)
at com.abc.mo.util.UpdateMO.process(UpdateMO.java:183)
- locked <0x12362c80> (a com.proactivenet.mo.util.UpdateMO)
at com.abc.api.mo.MOCache.createMO(MOCache.java:1833)
at com.abc.api.mo.MOCache.create(MOCache.java:1472)
at com.abc.api.mo.MOCache.update(MOCache.java:1243)
at com.abc.api.mo.MOPlatformImpl.update(MOPlatformImpl.java:84)
at com.abc.api.mo.MO.update(MO.java:688)
at
com.abc.api.sla.SLACache.checkSLAThreshold(SLACache.java:1589)
- locked <0x12362e58> (a java.util.ArrayList)
at
com.abc.api.sla.SLACache.createSLAInstance(SLACache.java:1224)
at com.proactivenet.api.sla.SLACache.create(SLACache.java:932)
- locked <0x12362f70> (a java.util.ArrayList)
- locked <0x12176528> (a com.proactivenet.api.sla.SLACache)
at
com.abc.api.sla.SLAPlatformImpl.createSLA(SLAPlatformImpl.java:206)
at
com.abc.api.sla.SLAClientHelper.createRupdateSLA(SLAClientHelper.java:1402)
at
com.abc.api.jsp.JSPPlatformImpl.createRupdateSLA(JSPPlatformImpl.java:3980)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
============================ Stack Trace ===========================
Regards,
Manjunath
joeNOSPAM@BEA.com - 20 Jun 2005 01:00 GMT
This thread is just waiting for the DBMS to reply to the update
you're doing. The DBMS session is probably blocked waiting
for a DBMS lock that some other session holds. You need to
analyse your transactional flow to see if you are locking things
in conflicting orders, or whether this might be a DBMS problem,
with index-lock vs datapage-lock deadlocking.
Joe Weinstein at BEA