[
https://issues.jboss.org/browse/JGRP-1440?page=com.atlassian.jira.plugin....
]
freeliuade freeliuade commented on JGRP-1440:
---------------------------------------------
Hi, in 3.1.0.Alpha3, I still can reproduce this issue by using debug to control thread
execution.
the exception stack:
SEVERE: Error updating JDBC_PING table
java.sql.SQLException: ORA-00001: unique constraint (HLIUCLUSTER.SYS_C0038277) violated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454)
at org.jgroups.protocols.JDBC_PING.insert(JDBC_PING.java:256)
at org.jgroups.protocols.JDBC_PING.writeToFile(JDBC_PING.java:237)
at org.jgroups.protocols.FILE_PING$WriterTask.run(FILE_PING.java:230)
at org.jgroups.util.TimeScheduler2$RecurringTask.run(TimeScheduler2.java:603)
at org.jgroups.util.TimeScheduler2$MyTask.run(TimeScheduler2.java:535)
at org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:440)
at org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:297)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
and this is the thread dump when using debug hold on JDBC_PING line 237, see threads
Timer-5 and Timer-2
2012-03-23 12:25:51
Full thread dump Java HotSpot(TM) Client VM (17.0-b17 mixed mode):
"OOB-1,myClusterGroup,pek-wkst2cwxc-6024" prio=6 tid=0x16c45c00 nid=0x145c
waiting on condition [0x179ff000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0802a3d0> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:422)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:857)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"DestroyJavaVM" prio=6 tid=0x00316c00 nid=0xb84 waiting on condition
[0x00000000]
java.lang.Thread.State: RUNNABLE
"Timer-5,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6 tid=0x1715a400
nid=0x1340 at breakpoint[0x179af000]
java.lang.Thread.State: RUNNABLE
at org.jgroups.protocols.JDBC_PING.writeToFile(JDBC_PING.java:237)
at org.jgroups.protocols.FILE_PING.fetchClusterMembers(FILE_PING.java:72)
at org.jgroups.protocols.Discovery.sendDiscoveryRequest(Discovery.java:250)
at org.jgroups.protocols.Discovery.findMembers(Discovery.java:212)
at org.jgroups.protocols.Discovery.findAllViews(Discovery.java:199)
at org.jgroups.protocols.Discovery.down(Discovery.java:510)
at org.jgroups.protocols.FILE_PING.down(FILE_PING.java:100)
at org.jgroups.protocols.MERGE2$FindSubgroupsTask.findAllViews(MERGE2.java:326)
at org.jgroups.protocols.MERGE2$FindSubgroupsTask._findAndNotify(MERGE2.java:261)
at org.jgroups.protocols.MERGE2$FindSubgroupsTask.findAndNotify(MERGE2.java:249)
at org.jgroups.protocols.MERGE2$FindSubgroupsTask$1.run(MERGE2.java:226)
at org.jgroups.util.TimeScheduler2$RecurringTask.run(TimeScheduler2.java:603)
at org.jgroups.util.TimeScheduler2$MyTask.run(TimeScheduler2.java:535)
at org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:440)
at org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:297)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
"Timer-4,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6 tid=0x171b2400
nid=0xff0 waiting on condition [0x1795f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x08040948> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Timer-3,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6 tid=0x171b1400
nid=0x9e4 waiting on condition [0x1790f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x08040948> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"FD_SOCK server socket acceptor,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6
tid=0x171d1400 nid=0xd60 runnable [0x178bf000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <0x02f00cc0> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.jgroups.protocols.FD_SOCK$ServerSocketHandler.run(FD_SOCK.java:1028)
at java.lang.Thread.run(Thread.java:619)
"multicast receiver,myClusterGroup,pek-wkst2cwxc-6024" prio=6 tid=0x171bbc00
nid=0xa38 runnable [0x1786f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x02f10ff0> (a java.net.PlainDatagramSocketImpl)
at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
- locked <0x02f10ff0> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:725)
- locked <0x02f11030> (a java.net.DatagramPacket)
- locked <0x02f11050> (a java.net.MulticastSocket)
at org.jgroups.protocols.UDP$PacketReceiver.run(UDP.java:674)
at java.lang.Thread.run(Thread.java:619)
"unicast receiver,myClusterGroup,pek-wkst2cwxc-6024" prio=6 tid=0x17186400
nid=0xb48 runnable [0x1781f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x02f21298> (a java.net.PlainDatagramSocketImpl)
at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
- locked <0x02f21298> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:725)
- locked <0x02f212d8> (a java.net.DatagramPacket)
- locked <0x02f212f8> (a java.net.DatagramSocket)
at org.jgroups.protocols.UDP$PacketReceiver.run(UDP.java:674)
at java.lang.Thread.run(Thread.java:619)
"TransferQueueBundler,myClusterGroup,pek-wkst2cwxc-6024" prio=6 tid=0x1718f400
nid=0x13bc waiting on condition [0x177cf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x02f21338> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at org.jgroups.protocols.TP$TransferQueueBundler.run(TP.java:1977)
at java.lang.Thread.run(Thread.java:619)
"DiagnosticsHandler,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6
tid=0x171aa000 nid=0x1148 runnable [0x1777f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x02f219f0> (a java.net.PlainDatagramSocketImpl)
at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
- locked <0x02f219f0> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:725)
- locked <0x02f21a30> (a java.net.DatagramPacket)
- locked <0x02f21a50> (a java.net.MulticastSocket)
at org.jgroups.stack.DiagnosticsHandler.run(DiagnosticsHandler.java:102)
at java.lang.Thread.run(Thread.java:619)
"Timer-2,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6 tid=0x17174400
nid=0x11a4 at breakpoint[0x1772f000]
java.lang.Thread.State: RUNNABLE
at org.jgroups.protocols.JDBC_PING.writeToFile(JDBC_PING.java:237)
at org.jgroups.protocols.FILE_PING$WriterTask.run(FILE_PING.java:230)
at org.jgroups.util.TimeScheduler2$RecurringTask.run(TimeScheduler2.java:603)
at org.jgroups.util.TimeScheduler2$MyTask.run(TimeScheduler2.java:535)
at org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:440)
at org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:297)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
"Timer runner-1,myClusterGroup,pek-wkst2cwxc-6024" daemon prio=6 tid=0x1715dc00
nid=0xfc4 waiting on condition [0x172bf000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x08024d60> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2116)
at org.jgroups.util.TimeScheduler2.waitUntilNextExecution(TimeScheduler2.java:340)
at org.jgroups.util.TimeScheduler2._run(TimeScheduler2.java:319)
at org.jgroups.util.TimeScheduler2.run(TimeScheduler2.java:279)
at java.lang.Thread.run(Thread.java:619)
"Low Memory Detector" daemon prio=6 tid=0x16c1f000 nid=0x8bc runnable
[0x00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x16c1d400 nid=0x113c waiting on condition
[0x00000000]
java.lang.Thread.State: RUNNABLE
"JDWP Command Reader" daemon prio=6 tid=0x16c0ec00 nid=0x11d0 runnable
[0x00000000]
java.lang.Thread.State: RUNNABLE
"JDWP Event Helper Thread" daemon prio=6 tid=0x16c0cc00 nid=0x14f0 runnable
[0x00000000]
java.lang.Thread.State: RUNNABLE
"JDWP Transport Listener: dt_socket" daemon prio=6 tid=0x16c09800 nid=0x1090
runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x16bfe400 nid=0x1358 waiting on condition
[0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x16c12800 nid=0x1164 runnable
[0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x16be8000 nid=0x142c in Object.wait()
[0x16d5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x07f80530> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x07f80530> (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=0x16be3800 nid=0xf18 in Object.wait()
[0x16d0f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x07f80550> (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 <0x07f80550> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=10 tid=0x16be0c00 nid=0xf4c runnable
"VM Periodic Task Thread" prio=10 tid=0x16c29c00 nid=0x874 waiting on condition
JNI global references: 4341
JDBC_PING java.sql.SQLException: ORA-00001: unique constraint
violated
----------------------------------------------------------------------
Key: JGRP-1440
URL:
https://issues.jboss.org/browse/JGRP-1440
Project: JGroups
Issue Type: Bug
Affects Versions: 2.12.1
Environment: windows xp, oracle 11G
Reporter: freeliuade freeliuade
Assignee: Bela Ban
Labels: JDBC_PING,
Fix For: 3.1
Original Estimate: 1 week
Remaining Estimate: 1 week
using JDBC_PING, create a very simple JChannel, unique constraint violated exception will
throw sometimes.
it's a occationally issue. to easy reproduce it, using debug to let threads hold on
JDBC_PING.writeToFile(...). line insert(...) (JDBC_PING line 246 in JGroups2.12.1.Final)
you can find three threads will be hold on here. then using debug to step over this line,
the unique constraint violated exception will throw.
I uploaded a debug diagram in here
http://ww2.sinaimg.cn/mw600/649a9869jw1dr8m399uqdj.jpg
following is the exception stack:
SEVERE: Error updating JDBC_PING table
java.sql.SQLException: ORA-00001: unique constraint (HLIUCLUSTER.SYS_C0038277) violated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454)
at org.jgroups.protocols.JDBC_PING.insert(JDBC_PING.java:265)
at org.jgroups.protocols.JDBC_PING.writeToFile(JDBC_PING.java:246)
at org.jgroups.protocols.FILE_PING.sendGetMembersRequest(FILE_PING.java:115)
at org.jgroups.protocols.Discovery$PingSenderTask$1.run(Discovery.java:527)
at org.jgroups.util.TimeScheduler2$RecurringTask.run(TimeScheduler2.java:592)
at org.jgroups.util.TimeScheduler2$MyTask.run(TimeScheduler2.java:524)
at org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:429)
at org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:295)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira