[JBoss JIRA] (ISPN-8721) Clustered 2nd level cache sometimes throws NullPointerException when new node starts up
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-8721?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-8721:
-----------------------------------
Fix Version/s: 9.4.0.Final
(was: 9.3.0.Final)
> Clustered 2nd level cache sometimes throws NullPointerException when new node starts up
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-8721
> URL: https://issues.jboss.org/browse/ISPN-8721
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 9.1.4.Final
> Environment: jvm 1.8
> Reporter: Tom Dearman
> Assignee: Tom Dearman
> Fix For: 9.4.0.Final
>
> Attachments: sample-app.cache.tar.gz
>
>
> There is a race condition in PutFromLoadValidator as it registers itself in the component registry before it is fully initialised. You can reproduce this by running the contained app against h2 server db. First start this app with default port. Then start the app on port '8080' and make a few requests to '/add' to create data. After that send continuous requests to '/update' in order change data and trigger the cache:
> for i in
> {code}
> {1..1000}
> ; do sleep 0.01; curl http://localhost:8080/update -X POST; done
> {code}
> Then start another instance of the app on port 8090:
> {code}
> java -jar test-app-0.0.1-SNAPSHOT.jar --server.port=8090
> {code}
> Most of the time one of the updates will fail and the logs will show the following:
> {code}
> 2018-01-23 15:36:46 [main] DEBUG o.h.c.i.access.PutFromLoadValidator - Interceptor chain was: [org.infinispan.interceptors.InvocationContextInterceptor@407a7f2a, org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor@4ea5b703, org.infinispan.interceptors.EntryWrappingInterceptor@2a7ed1f, org.infinispan.interceptors.InvalidationInterceptor@3fa247d1, org.infinispan.interceptors.CallInterceptor@2cb2fc20]
> 2018-01-23 15:36:46 [main] DEBUG o.h.c.i.access.PutFromLoadValidator - New interceptor chain is: [org.infinispan.interceptors.InvocationContextInterceptor@407a7f2a, org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor@4ea5b703, org.hibernate.cache.infinispan.access.NonTxPutFromLoadInterceptor@495ee280, org.infinispan.interceptors.EntryWrappingInterceptor@2a7ed1f, org.hibernate.cache.infinispan.access.NonTxInvalidationInterceptor@4fa1c212, org.infinispan.interceptors.CallInterceptor@2cb2fc20]
> 2018-01-23 15:36:46 [main] TRACE o.i.manager.DefaultCacheManager - About to wire and start cache test.app.data.User-pending-puts
> 2018-01-23 15:36:46 [remote-thread--p2-t1] ERROR o.i.i.InvocationContextInterceptor - ISPN000136: Error executing command BeginInvalidationCommand, writing keys test.app.data.User#2
> java.lang.NullPointerException: null
> at org.hibernate.cache.infinispan.access.PutFromLoadValidator.beginInvalidatingWithPFER(PutFromLoadValidator.java:561)
> at org.hibernate.cache.infinispan.access.PutFromLoadValidator.beginInvalidatingKey(PutFromLoadValidator.java:555)
> at org.hibernate.cache.infinispan.access.NonTxPutFromLoadInterceptor.visitInvalidateCommand(NonTxPutFromLoadInterceptor.java:70)
> at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:114)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitInvalidateCommand(AbstractLockingInterceptor.java:112)
> at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:114)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
> at org.infinispan.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:127)
> at org.infinispan.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:114)
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
> at org.infinispan.commands.remote.BaseRpcInvokingCommand.processVisitableCommand(BaseRpcInvokingCommand.java:43)
> at org.infinispan.commands.remote.SingleRpcCommand.perform(SingleRpcCommand.java:51)
> at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokePerform(BasePerCacheInboundInvocationHandler.java:92)
> at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:34)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> 2018-01-23 15:36:47 [main] TRACE o.i.manager.DefaultCacheManager - Closing latch for cache test.app.data.User-pending-puts
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (ISPN-8691) Infinispan rejects to read cache file bigger than 2147483647 (Integer.MAX_VALUE)
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-8691?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-8691:
-----------------------------------
Fix Version/s: 9.4.0.Final
(was: 9.3.0.Final)
> Infinispan rejects to read cache file bigger than 2147483647 (Integer.MAX_VALUE)
> --------------------------------------------------------------------------------
>
> Key: ISPN-8691
> URL: https://issues.jboss.org/browse/ISPN-8691
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 9.1.1.Final
> Reporter: Dmitry Katsubo
> Assignee: Ryan Emerson
> Priority: Minor
> Fix For: 9.4.0.Final
>
>
> In my scenario the cache file size created by {{SingleFileStore}} is 3.054.196.342 bytes. When this file is tried to be loaded, it fails with the following exception:
> {code}
> Caused by: org.infinispan.persistence.spi.PersistenceException: ISPN000279: Failed to read stored entries from file. Error in file /work/search-service-layer_data/infinispan/cache_test_dk83146/markupCache.dat at offset 4
> at org.infinispan.persistence.file.SingleFileStore.rebuildIndex(SingleFileStore.java:182)
> at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:127)
> ... 155 more
> {code}
> Cache file content:
> {code}
> 0000000000: 46 43 53 31 80 B1 89 47 │ 00 00 00 00 00 00 00 00 FCS1?+%G
> 0000000010: 00 00 00 00 FF FF FF FF │ FF FF FF FF 02 15 4E 06 yyyyyyyy☻§N♠
> 0000000020: 05 03 04 09 00 00 00 2F │ 6F 72 67 2E 73 70 72 69 ♣♥♦○ /org.spri
> 0000000030: 6E 67 66 72 61 6D 65 77 │ 6F 72 6B 2E 63 61 63 68 ngframework.cach
> 0000000040: 65 2E 69 6E 74 65 72 63 │ 65 70 74 6F 72 2E 53 69 e.interceptor.Si
> 0000000050: 6D 70 6C 65 4B 65 79 4C │ 0A 57 03 6B 6D 93 D8 00 mpleKeyL◙W♥km"O
> 0000000060: 00 00 02 00 00 00 08 68 │ 61 73 68 43 6F 64 65 23 ☻ ◘hashCode#
> 0000000070: 00 00 00 00 06 70 61 72 │ 61 6D 73 16 00 16 15 E6 ♠params▬ ▬§?
> {code}
> The problem is that integer value 0x80B18947 is treated as signed integer in line {{SingleFileStore:181}}, hence in expression
> {code}
> if (fe.size < KEY_POS + fe.keyLen + fe.dataLen + fe.metadataLen) {
> throw log.errorReadingFileStore(file.getPath(), filePos);
> }
> {code}
> {{fe.size}} is negative and equal to -2135848633.
> I have tried to configure the persistence storage so that it gets purged on start:
> {code}
> <persistence passivation="true">
> <file-store path="/var/cache/infinispan" purge="true">
> <write-behind thread-pool-size="5" />
> </file-store>
> </persistence>
> {code}
> however this does not help as storage is first read and then purged (see also ISPN-7186).
> It is expected that {{SingleFileStore}} either does not allow to write such big entries to the cache, or handles them correctly.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (ISPN-8643) ClientConnectionPoolingTest.testMaxActiveReached random failures
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-8643?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-8643:
-----------------------------------
Fix Version/s: 9.4.0.Final
(was: 9.3.0.Final)
> ClientConnectionPoolingTest.testMaxActiveReached random failures
> ----------------------------------------------------------------
>
> Key: ISPN-8643
> URL: https://issues.jboss.org/browse/ISPN-8643
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Server
> Affects Versions: 9.2.0.Beta2
> Reporter: Dan Berindei
> Labels: testsuite_stability
> Fix For: 9.4.0.Final
>
>
> Looks like waiting for 1s for all the connections to be releases is not enough:
> {noformat}
> java.lang.AssertionError:
> at org.infinispan.test.AbstractInfinispanTest.eventually(AbstractInfinispanTest.java:229)
> at org.infinispan.test.AbstractInfinispanTest.eventually(AbstractInfinispanTest.java:211)
> at org.infinispan.test.AbstractInfinispanTest.eventually(AbstractInfinispanTest.java:187)
> at org.infinispan.client.hotrod.ClientConnectionPoolingTest.testMaxActiveReached(ClientConnectionPoolingTest.java:208)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
> http://ci.infinispan.org/job/Infinispan/job/master/336
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months
[JBoss JIRA] (ISPN-8890) TransactionXaAdapter does not implement Geronimo's NamedXaResource
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-8890?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-8890:
-----------------------------------
Fix Version/s: 9.4.0.Final
(was: 9.3.0.Final)
> TransactionXaAdapter does not implement Geronimo's NamedXaResource
> ------------------------------------------------------------------
>
> Key: ISPN-8890
> URL: https://issues.jboss.org/browse/ISPN-8890
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.2.0.CR2
> Reporter: Dan Berindei
> Fix For: 9.4.0.Final
>
>
> Geronimo uses its own interface for logging transaction resources, {{NamedXAResource}}. Our {{TransactionXaAdapter}} doesn't implement it, so this error is logged for each transaction in Karaf:
> {noformat}
> 2018-02-28T09:49:05,931 | ERROR | testng-TransactionsSpanningReplicatedCachesTest-9 | Transaction | 68 - org.apache.aries.transaction.manager - 1.3.3 | Please correct the integration and supply a NamedXAResource
> java.lang.IllegalStateException: Cannot log transactions as TransactionXaAdapter{localTransaction=LocalXaTransaction{xid=[Xid:globalId=ffffff96ffffff9561ffffffdb611006f72672e6170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64,branchId=1000ffffff84ffffff9561ffffffdb611006170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64]} LocalTransaction{remoteLockedNodes=[TransactionsSpanningReplicatedCachesTest-NodeS-28818, TransactionsSpanningReplicatedCachesTest-NodeT-4724], isMarkedForRollback=false, lockedKeys=[], backupKeyLocks=[a], topologyId=5, stateTransferFlag=null} org.infinispan.transaction.xa.LocalXaTransaction@1f} is not a NamedXAResource.
> at org.apache.geronimo.transaction.manager.TransactionImpl$TransactionBranch.getResourceName(TransactionImpl.java:781) ~[?:?]
> at org.apache.geronimo.transaction.log.HOWLLog.prepare(HOWLLog.java:287) ~[?:?]
> at org.apache.geronimo.transaction.manager.TransactionImpl.internalPrepare(TransactionImpl.java:467) ~[?:?]
> at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:312) ~[?:?]
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) ~[?:?]
> at Proxy325c2276_ef50_4396_9e7d_5deaa002f72c.commit(Unknown Source) ~[?:?]
> at org.infinispan.tx.TransactionsSpanningReplicatedCachesTest.runTest(TransactionsSpanningReplicatedCachesTest.java:260) ~[?:?]
> at org.infinispan.tx.TransactionsSpanningReplicatedCachesTest.testDefaultCacheAndNamedCacheSameNode(TransactionsSpanningReplicatedCachesTest.java:240) ~[?:?]
> at org.infinispan.it.osgi.tx.TransactionsSpanningReplicatedCachesTest.testDefaultCacheAndNamedCacheSameNode(TransactionsSpanningReplicatedCachesTest.java:91) ~[?:?]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 6 months