Bug 915591 - org.infinispan.transaction.WriteSkewException: Detected write skew (random failure)
Summary: org.infinispan.transaction.WriteSkewException: Detected write skew (random fa...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.1.0
Hardware: sparc64
OS: Solaris
unspecified
high
Target Milestone: DR2
: 6.2.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 921491
TreeView+ depends on / blocked
 
Reported: 2013-02-26 07:48 UTC by Vitalii Chepeliuk
Modified: 2023-03-02 08:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 921491 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Added console output (1.14 MB, application/zip)
2013-02-26 12:28 UTC, Vitalii Chepeliuk
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-2771 0 Major Resolved WriteSkewTest.testWriteSkewWithOnlyPut fails randomly 2018-02-03 15:10:26 UTC

Description Vitalii Chepeliuk 2013-02-26 07:48:21 UTC
2013-02-25 14:26:25,071 WARN [RepeatableReadEntry] (EntryWriter-9, WriteSkewTest) ISPN000005: Detected write skew on key [k]. Another process has changed the entry since we last read it! Unable to copy entry for update.
2013-02-25 14:26:25,073 ERROR [WriteSkewTest] (EntryWriter-9, WriteSkewTest) Unexpected
org.infinispan.transaction.WriteSkewException: Detected write skew.
at org.infinispan.container.entries.RepeatableReadEntry.performLocalWriteSkewCheck(RepeatableReadEntry.java:68)
at org.infinispan.container.entries.RepeatableReadEntry.copyForUpdate(RepeatableReadEntry.java:52)
at org.infinispan.container.EntryFactoryImpl.wrapEntryForPut(EntryFactoryImpl.java:170)
at org.infinispan.interceptors.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:164)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPutKeyValueCommand(OptimisticLockingInterceptor.java:142)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:62)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:251)
at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:191)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:62)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)
at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1169)
at org.infinispan.CacheImpl.putInternal(CacheImpl.java:766)
at org.infinispan.CacheImpl.put(CacheImpl.java:760)
at org.infinispan.CacheImpl.put(CacheImpl.java:754)
at org.infinispan.CacheSupport.put(CacheSupport.java:53)
at org.infinispan.api.mvcc.repeatable_read.WriteSkewTest$EntryWriter.call(WriteSkewTest.java:433)
at org.infinispan.api.mvcc.repeatable_read.WriteSkewTest$EntryWriter.call(WriteSkewTest.java:418)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Comment 1 JBoss JIRA Server 2013-02-26 09:51:48 UTC
Adrian Nistor <anistor> made a comment on jira ISPN-2858

So which test method failed? Could you also attach the trace log please?

Comment 2 Vitalii Chepeliuk 2013-02-26 12:28:19 UTC
Created attachment 702832 [details]
Added console output

Comment 3 JBoss JIRA Server 2013-02-26 13:20:07 UTC
Adrian Nistor <anistor> made a comment on jira ISPN-2858

From the attached output:
{noformat}
2013-02-25 12:55:30,993 ERROR [UnitTestTestNGListener] (testng-WriteSkewTest) Test testWriteSkewWithOnlyPut(org.infinispan.api.mvcc.repeatable_read.WriteSkewTest) failed.
{noformat}

This is a duplicate of ISPN-2771.

Comment 4 JBoss JIRA Server 2013-02-26 13:21:08 UTC
Adrian Nistor <anistor> updated the status of jira ISPN-2858 to Resolved

Comment 7 JBoss JIRA Server 2013-07-10 10:37:39 UTC
Pedro Ruivo <pedroruivo2> updated the status of jira ISPN-2771 to Coding In Progress

Comment 8 JBoss JIRA Server 2013-07-16 11:52:40 UTC
Pedro Ruivo <pedroruivo2> updated the status of jira ISPN-2771 to Reopened

Comment 9 JBoss JIRA Server 2013-07-16 11:52:40 UTC
Pedro Ruivo <pedroruivo2> made a comment on jira ISPN-2771

This test is still failing because it performs the local write skew check during the copyForUpdate(). Solutions:

easy: don't perform the local write skew check in the copyForUpdate because it will be performed in the prepare phase anyway.
complex: the correct behavior here is to perform the local write skew check when
 * the key has previous read || the command does not ignore the return value

try to do a test case for this race condition...

Comment 10 JBoss JIRA Server 2013-07-18 09:28:01 UTC
Dan Berindei <dberinde> made a comment on jira ISPN-2771

[~pruivo] why is the second approach more correct than the first? Shouldn't one write skew check be enough?

Comment 11 JBoss JIRA Server 2013-07-18 09:42:22 UTC
Pedro Ruivo <pedroruivo2> made a comment on jira ISPN-2771

[~dan.berindei] don't miss understand me. I think the most correct is only to perform the write skew check at prepare time (as it is done in clustered mode).


Note You need to log in before you can comment on or make changes to this bug.