[JBoss JIRA] (ISPN-8261) OSGi integration tests can leak the Karaf process
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-8261?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-8261:
------------------------------------
Maven Surefire should replace {{System.in}} to prevent this for happening, as I've commented on [SUREFIRE-1374|https://issues.apache.org/jira/browse/SUREFIRE-1374], but we can also extend the {{PaxExam}} test runner and replace {{System.in}} ourselves.
> OSGi integration tests can leak the Karaf process
> -------------------------------------------------
>
> Key: ISPN-8261
> URL: https://issues.jboss.org/browse/ISPN-8261
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Server
> Affects Versions: 9.1.0.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Labels: testsuite_stability
> Fix For: 9.1.1.Final
>
>
> {{pax-exam-container-karaf}}'s {{InternalRunner.createShutdownHook}} creates a thread that continuously reads from {{System.in}} and pumps that into the Karaf process's stdin. That can break the communication between the surefire master and fork processes, and that can make the fork shutdown without first stopping the container process.
> {noformat}
> [SUREFIRE] std/in stream corrupted
> java.io.IOException: Command BYE_ACK unexpectedly read Void data with length 4.
> at org.apache.maven.surefire.booter.MasterProcessCommand.decode(MasterProcessCommand.java:130)
> at org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:386)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months
[JBoss JIRA] (ISPN-6827) ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-6827?page=com.atlassian.jira.plugin.... ]
Radim Vansa reassigned ISPN-6827:
---------------------------------
Assignee: Pedro Ruivo
> ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
> ---------------------------------------------------------------------------
>
> Key: ISPN-6827
> URL: https://issues.jboss.org/browse/ISPN-6827
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Test Suite - Core
> Affects Versions: 9.0.0.Alpha2
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Priority: Critical
> Labels: testsuite_stability
> Fix For: 9.2.0.Final
>
> Attachments: ReplTotalOrderVersionedStateTransferTest_pr_rvansa_ISPN-5989_20160314.log.zip
>
>
> {noformat}
> java.lang.RuntimeException: Timed out waiting for rebalancing to complete on node ReplTotalOrderVersionedStateTransferTest-NodeB-17608, expected member list is [ReplTotalOrderVersionedStateTransferTest-NodeB-17608, ReplTotalOrderVersionedStateTransferTest-NodeC-39826], current member list is [ReplTotalOrderVersionedStateTransferTest-NodeA-54647, ReplTotalOrderVersionedStateTransferTest-NodeB-17608, ReplTotalOrderVersionedStateTransferTest-NodeC-39826]!
> at org.infinispan.test.TestingUtil.waitForRehashToComplete(TestingUtil.java:267)
> at org.infinispan.test.TestingUtil.waitForRehashToComplete(TestingUtil.java:277)
> at org.infinispan.container.versioning.VersionedReplStateTransferTest.testStateTransfer(VersionedReplStateTransferTest.java:74)
> {noformat}
> http://ci.infinispan.org/project.html?tab=testDetails&testNameId=-7264982...
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months
[JBoss JIRA] (ISPN-8250) ClusterListenerDistTest.testPrimaryOwnerGoesDownBeforeSendingEvent random failures
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-8250?page=com.atlassian.jira.plugin.... ]
Radim Vansa updated ISPN-8250:
------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> ClusterListenerDistTest.testPrimaryOwnerGoesDownBeforeSendingEvent random failures
> ----------------------------------------------------------------------------------
>
> Key: ISPN-8250
> URL: https://issues.jboss.org/browse/ISPN-8250
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.1.0.Final
> Reporter: Tristan Tarrant
> Assignee: William Burns
> Labels: testsuite_stability
> Fix For: 9.1.1.Final
>
>
> java.lang.AssertionError: expected [true] but found [false]
> at org.infinispan.notifications.cachelistener.cluster.ClusterListenerDistTest.testPrimaryOwnerGoesDownBeforeSendingEvent(ClusterListenerDistTest.java:71)
> 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)
> ... Removed 20 stack frames
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months
[JBoss JIRA] (ISPN-8026) Random size related failures in Hibernate Cache
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-8026?page=com.atlassian.jira.plugin.... ]
Radim Vansa updated ISPN-8026:
------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Random size related failures in Hibernate Cache
> -----------------------------------------------
>
> Key: ISPN-8026
> URL: https://issues.jboss.org/browse/ISPN-8026
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 9.1.0.Final
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Labels: testsuite_stability
> Fix For: 9.1.1.Final
>
>
> Randomly failing test on CI:
> {{org.infinispan.test.hibernate.cache.functional.BulkOperationsTest.testBulkOperations[read-write, DIST_SYNC]}}
> Error Message and stack trace:
> {code}
> java.lang.AssertionError: expected:<10> but was:<9>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:555)
> at org.junit.Assert.assertEquals(Assert.java:542)
> at org.infinispan.test.hibernate.cache.functional.BulkOperationsTest.testBulkOperations(BulkOperationsTest.java:97)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months
[JBoss JIRA] (ISPN-8249) EvictionFunctionalTest.testSimpleExpirationMaxIdle random failure
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-8249?page=com.atlassian.jira.plugin.... ]
Radim Vansa commented on ISPN-8249:
-----------------------------------
So the expiration thread in fact updates the created timestamp as it calls OffHeapEntryFactoryImpl.create each time it accesses the data. If the expiration happens concurrently to size() check in the test, it's possible that we see entry that was just updated - so it's not found to be expired and size() returns positive value.
> EvictionFunctionalTest.testSimpleExpirationMaxIdle random failure
> -----------------------------------------------------------------
>
> Key: ISPN-8249
> URL: https://issues.jboss.org/browse/ISPN-8249
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.1.0.Final
> Reporter: Tristan Tarrant
> Assignee: Radim Vansa
> Labels: testsuite_stability
>
> java.lang.AssertionError: cache size should be zero: 0
> at org.infinispan.eviction.impl.EvictionFunctionalTest.testSimpleExpirationMaxIdle(EvictionFunctionalTest.java:93)
> 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)
> ... Removed 16 stack frames
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months
[JBoss JIRA] (ISPN-8249) EvictionFunctionalTest.testSimpleExpirationMaxIdle random failure
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-8249?page=com.atlassian.jira.plugin.... ]
Radim Vansa reassigned ISPN-8249:
---------------------------------
Assignee: Radim Vansa
> EvictionFunctionalTest.testSimpleExpirationMaxIdle random failure
> -----------------------------------------------------------------
>
> Key: ISPN-8249
> URL: https://issues.jboss.org/browse/ISPN-8249
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.1.0.Final
> Reporter: Tristan Tarrant
> Assignee: Radim Vansa
> Labels: testsuite_stability
>
> java.lang.AssertionError: cache size should be zero: 0
> at org.infinispan.eviction.impl.EvictionFunctionalTest.testSimpleExpirationMaxIdle(EvictionFunctionalTest.java:93)
> 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)
> ... Removed 16 stack frames
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months
[JBoss JIRA] (ISPN-8069) Clustered Locks Embedded Mode
by Katia Aresti (JIRA)
[ https://issues.jboss.org/browse/ISPN-8069?page=com.atlassian.jira.plugin.... ]
Katia Aresti updated ISPN-8069:
-------------------------------
Status: Open (was: New)
> Clustered Locks Embedded Mode
> -----------------------------
>
> Key: ISPN-8069
> URL: https://issues.jboss.org/browse/ISPN-8069
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Katia Aresti
> Assignee: Katia Aresti
>
> h2. ClusteredLockManager and configuration
> {code:java}
> package org.infinispan.lock.api;
> public class ClusteredLockManager {
> boolean defineLock(String name, LockConfiguration configuration);
> InfinispanLock get(String name);
> LockConfiguration getConfiguration(String name);
> boolean isDefined(String name);
> CompletableFuture<Boolean> remove(String name);
> CompletableFuture<Void> reset(String name);
> }
> public class LockConfiguration {
> private final RentrancyLevel lentrancyLevel; // default NOT_REENTRANT
> private final boolean silentFailover; // default true
> // The maximum length of time for which a client can hold and renew a lock aquisition
> private final long maxLeaseTime;
> // Maximum length of time a lock may be held without updating the lease,
> // after that time any attempt to lock it will succeed
> private final long renewalLeaseTime;
> }
> public enum RentrancyLevel {
> NODE, // Node can lock if it owns the lock without blocking, only the owner node can unlock
> INSTANCE, // Instance can lock multiple times if it owns the lock without blocking, only the owner instance can unlock
> NOT_REENTRANT // Nobody can take the lock if already taken, but everybody can release it
> }
> {code}
> h4. InfinispanLock defineLock(String name, LockConfiguration configuration)
> Defines a lock with the specific name and LockConfiguration. It does not overwrite existing configurations.
> Returns true if successfully defined or false if the lock is already defined or any other failure. If silentFailover is false, then InfinispanLockException will be raised.
> h4. InfinispanLock get(String name)
> Get’s a InfinipanLock by it’s name and throws InfinispanLockException if the lock is not not defined. User must call defineLock before this method.
> h4. Optional<LockConfiguration> getConfiguration(String name);
> Get’s the configuration for a Lock. If the Lock does not exist, Optional.empty() will be returned.
> h4. boolean isDefined(String name)
> True if the lock exists, false if it doesn’t
> h4. CompletableFuture<Boolean> remove(String name)
> Removes a Lock from the system. Returns true when it was removed, false when the lock does not exist. If any other Runtime problems appear, InfinispanLockException will be raised withe the reason. As Locks are not removed automatically, so this has to be done programatically when the Lock is no longer needed. Otherwise, OutOfMemoryException could happen.
> Remove must be executed when the lock is locked, because running that without exclusive access should result in an exception. Internally, the implementation should contain generation number so that attempts to acquire a lock of a removed generation will result it exceptions in the other callers, too.
> h4. CompletableFuture<Void> reset(String name)
> Resets the lock to its initial state. If any parties are currently waiting at the lock, they will return with failure on the CompletableFuture
> h2. InfinispanLock
>
> When a cluster node holding a Lock dies, this lock is released and available for the others.
> {code:java}
> public interface InfinispanLock {
> CompletableFuture<Void> lock();
> CompletableFuture<Boolean> tryLock();
> CompletableFuture<Boolean> tryLock(long time, TimeUnit unit);
> CompletableFuture<Void> unlock();
> }
> {code}
> h4. CompletableFuture<Void> lock();
> CompletableFuture is completed successfully when the lock is acquired When a lock is aquired by a client, it will be automatically released after the maxLeaseTime specified. RenewalLeaseTime is the interval time is the time a client can aquire a lock consecutively User should set the timeouts to non-positive value The initial embedded implementation does not have to support positive values
> h4. CompletableFuture<Boolean> tryLock();
> Acquires the lock only if it is free at the time of invocation. Acquires the lock if it is available and returns with the value true. If the lock is not available then this method with the value false.
> h4. CompletableFuture<Boolean> tryLock(long time, TimeUnit unit);
> Acquires the lock if it is free within the given waiting time. If the lock is available this method returns with the value true.
> Parameters: time - the maximum time to wait for the lock unit - the time unit of the time argument Returns: true if the lock was acquired and false if the waiting time elapsed before the lock was acquired
> CompletableFuture fails with InfinispanLockException in case of error (InterruptedException, or any other non checked exceptions)
> h4. CompletableFuture<Boolean> unlock();
> If the lock is rentrant (Node or Instance), only the instance or node holding the lock will be able to unlock, otherwise, anybody can unlock and it will behave as a Semaphore with one permit. True answer will say that the operation was succesul and the lock has been released, false the lock has not been relased
> h2. Demo
> {code:java}
> public static void main(String[] args) throws Exception {
> EmbeddedCacheManager cm = Infinispan.createClustered();
> CounterManager counterManager = EmbeddedCounterManagerFactory.asCounterManager(cm);
> counterManager.defineCounter("counter", ...);
> WeakCounter counter = counterManager.weakCounter("counter");
> ClusteredLockManager lockManager = EmbeddedLockManagerFactory.asClusteredLockManager(cm);
> lockManager.defineLock("lock", ...);
> InfinispanLock lock = lockManager.get("lock");
> for (int i = 0; i < 100; i++) {
> System.out.println("Counter on " + i + " is => " + counter.getValue());
> lock.lock()
> .thenRun(new CounterExample(counter))
> .whenComplete((nil, t) -> lock.unlock());
> }
> cm.stop();
> }
> static class CounterExample implements Runnable {
> private WeakCounter counter;
> public CounterExample(WeakCounter counter) {
> this.counter = counter;
> }
> @Override
> public void run() {
> counter.increment();
> try {
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> counter.decrement();
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 7 months