You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Semen Boikov (JIRA)" <ji...@apache.org> on 2018/10/25 06:03:00 UTC

[jira] [Commented] (IGNITE-6454) Data structure suite timeout: test is not able to fail after interruption

    [ https://issues.apache.org/jira/browse/IGNITE-6454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663289#comment-16663289 ] 

Semen Boikov commented on IGNITE-6454:
--------------------------------------

Debugged test, found out that it is possible that transactions started by lock implementation is not rolledback if thread executing transaction is interrupted (lock implementation does this in GridCacheLockImpl.Sync.interruptAll).

Possible scenario:
 * main test thread calls cache.get inside tx, this creates GridDhtColocatedLockFuture, it is not mapped right away because topology change is in progress, main thread creates future and calls fut.get
 * main test thread is interrupted, tx is not mapped yet, NearTxFinishFuture does not expect there is non-completed lock operation and tx is rolledback
 * GridDhtColocatedLockFuture is ready to map and sends locks requests creating txs on remote node

Added test reproducing this issue without IgniteLock usage (CacheOperationsInterruptTest).

I see that futures created by GridNearTxLocal for all operation except 'getAll' do not allow 'fut.get()' interruption (see usages of GridNearTxLocal.nonInterruptable), I think the same should be done for 'getAll'.

> Data structure suite timeout: test is not able to fail after interruption
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-6454
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6454
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Dmitriy Pavlov
>            Assignee: Semen Boikov
>            Priority: Critical
>              Labels: MakeTeamcityGreenAgain
>             Fix For: 2.8
>
>         Attachments: lastStartedTest_GridCacheReplicatedDataStructuresFailoverSelfTest.testFairReentrantLockConstantMultipleTopologyChangeNonFailoverSafe.log.zip, lastStartedTest_GridCacheReplicatedDataStructuresFailoverSelfTest.testReentrantLockConstantMultipleTopologyChangeNonFailoverSafe.log.zip
>
>
> https://ci.ignite.apache.org/viewType.html?buildTypeId=Ignite20Tests_IgniteDataStrucutures&branch=%3Cdefault%3E&tab=buildTypeStatusDiv
> Most often timeout is caused by following tests:
> GridCacheReplicatedDataStructuresFailoverSelfTest
> - testReentrantLockConstantMultipleTopologyChangeNonFailoverSafe()
> - testFairReentrantLockConstantMultipleTopologyChangeNonFailoverSafe()
> And most of thread dumps contains the following
> {noformat}
> ] :	 [Step 4/5] Thread [name="test-runner-#35143%replicated.GridCacheReplicatedDataStructuresFailoverSelfTest%", id=38586, state=RUNNABLE, blockCnt=0, waitCnt=60]
> [20:34:26] :	 [Step 4/5]         at java.lang.Throwable.fillInStackTrace(Native Method)
> [20:34:26] :	 [Step 4/5]         at java.lang.Throwable.fillInStackTrace(Throwable.java:783)
> [20:34:26] :	 [Step 4/5]         - locked o.a.i.IgniteException@754033e
> [20:34:26] :	 [Step 4/5]         at java.lang.Throwable.<init>(Throwable.java:265)
> [20:34:26] :	 [Step 4/5]         at java.lang.Exception.<init>(Exception.java:66)
> [20:34:26] :	 [Step 4/5]         at java.lang.RuntimeException.<init>(RuntimeException.java:62)
> [20:34:26] :	 [Step 4/5]         at o.a.i.IgniteException.<init>(IgniteException.java:44)
> [20:34:26] :	 [Step 4/5]         at o.a.i.i.processors.datastructures.GridCacheLockImpl$Sync.validate(GridCacheLockImpl.java:275)
> [20:34:26] :	 [Step 4/5]         at o.a.i.i.processors.datastructures.GridCacheLockImpl$Sync.access$1000(GridCacheLockImpl.java:122)
> [20:34:26] :	 [Step 4/5]         at o.a.i.i.processors.datastructures.GridCacheLockImpl.lock(GridCacheLockImpl.java:1200)
> [20:34:26] :	 [Step 4/5]         at o.a.i.i.processors.cache.datastructures.GridCacheAbstractDataStructuresFailoverSelfTest.doTestReentrantLock(GridCacheAbstractDataStructuresFailoverSelfTest.java:785)
> [20:34:26] :	 [Step 4/5]         at o.a.i.i.processors.cache.datastructures.GridCacheAbstractDataStructuresFailoverSelfTest.testFairReentrantLockConstantMultipleTopologyChangeNonFailoverSafe(GridCacheAbstractDataStructuresFailoverSelfTest.java:739)
> [20:34:26] :	 [Step 4/5]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [20:34:26] :	 [Step 4/5]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> [20:34:26] :	 [Step 4/5]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [20:34:26] :	 [Step 4/5]         at java.lang.reflect.Method.invoke(Method.java:606)
> [20:34:26] :	 [Step 4/5]         at junit.framework.TestCase.runTest(TestCase.java:176)
> [20:34:26] :	 [Step 4/5]         at o.a.i.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
> [20:34:26] :	 [Step 4/5]         at o.a.i.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
> [20:34:26] :	 [Step 4/5]         at o.a.i.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
> [20:34:26] :	 [Step 4/5]         at java.lang.Thread.run(Thread.java:745)
> [20:34:26] :	 [Step 4/5] 
> {noformat}
> That can be indicator that threads are interrupted and flag org.apache.ignite.internal.processors.datastructures.GridCacheLockImpl#interruptAll is set,
> than org.apache.ignite.IgniteException is thrown, but it is ignored by test and test continues to execute



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)