[JBoss JIRA] (ISPN-2623) SimpleEvictionMaxEntries fails consistently on IBM JDK with "cache size too big: 182"
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-2623?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-2623:
----------------------------------
Fix Version/s: 6.0.0.Final
(was: 5.3.0.Final)
> SimpleEvictionMaxEntries fails consistently on IBM JDK with "cache size too big: 182"
> -------------------------------------------------------------------------------------
>
> Key: ISPN-2623
> URL: https://issues.jboss.org/browse/ISPN-2623
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction, Test Suite
> Affects Versions: 5.1.8.Final
> Environment: IBM JDK6, IBM JDK7, any platfrom
> Reporter: Jitka Kudrnacova
> Assignee: Tristan Tarrant
> Fix For: 6.0.0.Final
>
>
> Test SimpleEvictionMaxEntries fails consistently across platforms with the following (output from RHEL6_x86_64):
> {code}
> 2012-12-05 10:53:13,616 ERROR [UnitTestTestNGListener] (testng-LRUEvictionFunctionalTest) Method testSimpleEvictionMaxEntries(org.infinispan.eviction.LRUEvictionFunctionalTest) threw an exception
> java.lang.AssertionError: cache size too big: 182
> at org.infinispan.eviction.BaseEvictionFunctionalTest.testSimpleEvictionMaxEntries(BaseEvictionFunctionalTest.java:67)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
> at java.lang.reflect.Method.invoke(Method.java:613)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
> at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
> at org.testng.TestRunner.privateRun(TestRunner.java:749)
> at org.testng.TestRunner.run(TestRunner.java:600)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:34)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:351)
> at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:147)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
> at java.lang.Thread.run(Thread.java:780)
> [testng-LRUEvictionFunctionalTest] Test testSimpleEvictionMaxEntries(org.infinispan.eviction.LRUEvictionFunctionalTest) failed.
> {code}
> Seen during TS runs for test cycle EAP 6.0.1.ER4.2.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-2779) Lost data on remotecache get() after put()
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-2779?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-2779:
----------------------------------
Fix Version/s: 6.0.0.Final
(was: 5.3.0.Final)
> Lost data on remotecache get() after put()
> ------------------------------------------
>
> Key: ISPN-2779
> URL: https://issues.jboss.org/browse/ISPN-2779
> Project: Infinispan
> Issue Type: Bug
> Components: Distributed Cache, Eviction, Loaders and Stores, Server
> Affects Versions: 5.1.6.FINAL, 5.2.0.CR3
> Environment: Windows 7SP1 Pro
> JDK 7 or JRE6
> Reporter: ThienLong Hong
> Assignee: Tristan Tarrant
> Fix For: 6.0.0.Final
>
>
> I'm start server Infinispan on Ubuntu follow comand:
> {noformat}
> ./startServer.sh -r hotrod -c infinispan-distribution.xml -l 192.168.23.120 -Djgroups.bind_addr=192.168.23.120
> {noformat}
> Make sure we can open many file, /etc/security/limits.conf:
> * soft nofile 100002
> * hard nofile 100002
> Here is content of infinispan-distribution.xml:
> {code:xml}
> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
> xmlns="urn:infinispan:config:5.1">
> <global>
> <transport>
> <properties>
> <property name="configurationFile" value="jgroups-tcp.xml">
> </property></properties>
> </transport>
> </global>
> <default>
> <clustering mode="distribution">
> <sync />
> <hash numOwners="2" />
> </clustering>
> </default>
> <namedCache name="myCache">
> <clustering mode="distribution">
> <sync />
> <hash numOwners="2" />
> </clustering>
> </namedCache>
> <namedCache name="evictionCache">
> <clustering mode="distribution">
> <sync />
> <hash numOwners="2" rehashEnabled="true" rehashRpcTimeout="600000" numVirtualNodes="50"/>
> </clustering>
> <eviction
> maxEntries="10000"
> strategy="LRU"
> />
> <loaders passivation="true" preload="false">
> <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="false">
> <properties>
> <property name="location" value="data"/>
> </properties>
> </loader>
> </loaders>
> </namedCache>
> </infinispan>
> {code}
> I write a simple program to test benmark of infinispan but i got problem of lost data. I put many key-value but when i retrieve it return null.
> Here is my program soucecode:
> {code:java}
> package vn.vccorp.benmark.infinispan;
> import java.io.FileWriter;
> import java.io.PrintWriter;
> import java.net.URL;
> import java.util.ArrayList;
> import java.util.LinkedHashMap;
> import java.util.List;
> import java.util.Map;
> import java.util.Map.Entry;
> import java.util.Random;
> import java.util.UUID;
> import java.util.concurrent.Callable;
> import java.util.concurrent.Executor;
> import java.util.concurrent.ExecutorService;
> import java.util.concurrent.Executors;
> import java.util.concurrent.TimeUnit;
> import org.infinispan.client.hotrod.RemoteCache;
> import org.infinispan.client.hotrod.RemoteCacheManager;
> public class Benmark implements Callable<Void> {
> private static final int MAX_LENGHT = 20;
> private static final int MIN_LENGHT = 8;
> private Map<String, String> accs = new LinkedHashMap<String, String>();
> private final Random random = new Random(System.currentTimeMillis());
> private RemoteCache<String, String> rc;
> private boolean getOperator = false;
> public Benmark(RemoteCache<String, String> rc, int numAcc) {
> generateRandomAccs(numAcc);
> this.rc = rc;
> }
> /**
> * @param args
> * @throws InterruptedException
> */
> public static void main(String[] args) throws InterruptedException {
> URL resource = Thread.currentThread().getContextClassLoader()
> .getResource("hotrod-client.properties");
> RemoteCacheManager rcm = new RemoteCacheManager(resource, true);
> RemoteCache<String, String> rc = rcm.getCache("evictionCache");
> List<Benmark> bens = new ArrayList<Benmark>();
> int numThreads = Runtime.getRuntime().availableProcessors() * 2;
> int numAccsPerThread = 5000;
> for (int i = 0; i < numThreads; ++i) {
> bens.add(new Benmark(rc, numAccsPerThread));
> }
> long time = testOperator(bens);
> System.out.println("finish test Put with "
> + (numThreads * numAccsPerThread) + " records in "
> + (time) + "ns");
> for (Benmark benmark : bens) {
> benmark.setGetOperator(true);
> }
> time = testOperator(bens);
> System.out.println("finish test Get with "
> + (numThreads * numAccsPerThread) + " records in "
> + (time) + "ns");
> rcm.stop();
> saveDataTest(bens);
> }
> private static void saveDataTest(List<Benmark> bens) {
> PrintWriter writer = null;
> try {
> writer = new PrintWriter(new FileWriter("data_test.txt"));
> for (Benmark ben : bens) {
> for (Entry<String, String> entry : ben.getAccs().entrySet()) {
> writer.println(entry.getKey());
> writer.println(entry.getValue());
> }
> }
> } catch (Exception e) {
> // TODO: handle exception
> } finally {
> if (writer != null) {
> writer.close();
> }
> }
> }
> private static long testOperator(List<Benmark> bens) throws InterruptedException {
> ExecutorService pool = Executors.newCachedThreadPool();
> long time = System.nanoTime();
> pool.invokeAll(bens);
> pool.shutdown();
> while (!pool.awaitTermination(1, TimeUnit.MINUTES)) {
> }
> long end = System.nanoTime();
> return end - time;
> }
> private void generateRandomAccs(int numberAcc) {
> String user = null;
> String pass = null;
> for (int i = 0; i < numberAcc;) {
> user = randomString();
> pass = randomString();
> if (getAccs().put(user, pass) == null) {
> ++i;
> }
> }
> }
> private String randomString() {
> // int len = MIN_LENGHT + random.nextInt(MAX_LENGHT - MIN_LENGHT);
> // StringBuilder builder = new StringBuilder(len);
> // for (int i = 0; i < len; ++i) {
> // char c = (char) (32 + random.nextInt(126 - 32));
> // builder.append(c);
> // }
> // return builder.toString();
> return UUID.randomUUID().toString();
> }
> @Override
> public Void call() {
> if (!getOperator) {
> System.out.println("Start test PUT");
> long startPut = System.nanoTime();
> for (Entry<String, String> acc : getAccs().entrySet()) {
> rc.put(acc.getKey(), acc.getValue());
> }
> long endPut = System.nanoTime();
> System.out
> .println("Finish test PUT: " + (endPut - startPut) + "ns");
> } else {
> System.out.println("Start test GET");
> long startGet = System.nanoTime();
> for (Entry<String, String> acc : getAccs().entrySet()) {
> if (rc.get(acc.getKey()) == null) {
> System.err.println("Error get data");
> break;
> }
> }
> long endGet = System.nanoTime();
> System.out
> .println("Finish test GET: " + (endGet - startGet) + "ns");
> }
> return null;
> }
> public boolean isGetOperator() {
> return getOperator;
> }
> public void setGetOperator(boolean getOperator) {
> this.getOperator = getOperator;
> }
> public Map<String, String> getAccs() {
> return accs;
> }
> public void setAccs(Map<String, String> accs) {
> this.accs = accs;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-2786) ThreadLocal memory leak in Tomcat
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-2786?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-2786:
----------------------------------------
I don't see any leaks context leaks any more. I've just submitted a patch to fix the marshaller thread local leak. Finally, I've created JBMAR-151 to address the JBoss Marshalling thread local leak, which we don't have access to.
> ThreadLocal memory leak in Tomcat
> ---------------------------------
>
> Key: ISPN-2786
> URL: https://issues.jboss.org/browse/ISPN-2786
> Project: Infinispan
> Issue Type: Bug
> Components: Marshalling, Transactions
> Affects Versions: 5.1.8.Final
> Reporter: Johann Burkard
> Assignee: Galder Zamarreño
> Labels: leak, local, memory, thread, threadlocal
> Fix For: 5.3.0.Final
>
>
> Just started an app using Infinispan 5.1.8.Final on Tomcat and got a few ThreadLocal problems during un-deployment:
> (Shortened)
> {code}
> key=org.jboss.marshalling.UTFUtils.BytesHolder
> value=org.jboss.marshalling.UTFUtils$BytesHolder@697a1686
> key=java.lang.ThreadLocal@36ed5ba6
> value=org.infinispan.context.SingleKeyNonTxInvocationContext{flags=null}
> key=org.infinispan.marshall.jboss.AbstractJBossMarshaller$1
> value=org.infinispan.marshall.jboss.AbstractJBossMarshaller$1@75f10df7
> value=org.infinispan.marshall.jboss.AbstractJBossMarshaller.PerThreadInstanceHolder
> {code}
> I do call {{DefaultCacheManager#shutdown()}} during un-deployment. :)
> Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-2786) ThreadLocal memory leak in Tomcat
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-2786?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-2786:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/1835
> ThreadLocal memory leak in Tomcat
> ---------------------------------
>
> Key: ISPN-2786
> URL: https://issues.jboss.org/browse/ISPN-2786
> Project: Infinispan
> Issue Type: Bug
> Components: Marshalling, Transactions
> Affects Versions: 5.1.8.Final
> Reporter: Johann Burkard
> Assignee: Galder Zamarreño
> Labels: leak, local, memory, thread, threadlocal
> Fix For: 5.3.0.Final
>
>
> Just started an app using Infinispan 5.1.8.Final on Tomcat and got a few ThreadLocal problems during un-deployment:
> (Shortened)
> {code}
> key=org.jboss.marshalling.UTFUtils.BytesHolder
> value=org.jboss.marshalling.UTFUtils$BytesHolder@697a1686
> key=java.lang.ThreadLocal@36ed5ba6
> value=org.infinispan.context.SingleKeyNonTxInvocationContext{flags=null}
> key=org.infinispan.marshall.jboss.AbstractJBossMarshaller$1
> value=org.infinispan.marshall.jboss.AbstractJBossMarshaller$1@75f10df7
> value=org.infinispan.marshall.jboss.AbstractJBossMarshaller.PerThreadInstanceHolder
> {code}
> I do call {{DefaultCacheManager#shutdown()}} during un-deployment. :)
> Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-3130) Cancelling an InboundTransferTask should be idempotent
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-3130?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-3130:
------------------------------------
The problem was at a higher level: StateConsumerImpl.cancelTransfers was supposed to remove the cancelled segments from the transfersBySegment map, but it only removed one of them. When another thread tried to cancel the same segments, it found the already-cancelled segments in the map and tried to cancel them again.
> Cancelling an InboundTransferTask should be idempotent
> ------------------------------------------------------
>
> Key: ISPN-3130
> URL: https://issues.jboss.org/browse/ISPN-3130
> Project: Infinispan
> Issue Type: Bug
> Components: State transfer
> Affects Versions: 5.2.6.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 5.2.7.Final, 5.3.0.Final
>
>
> When installing a new topology, it's possible for the {{StateConsumerImpl.cancelSegments}} method to fail with an {{IllegalArgumentException}}:
> {code}
> 05:43:56,513 WARN [org.infinispan.topology.CacheTopologyControlCommand] (notification-thread-0) ISPN000071: Caught exception when handling command CacheTopologyControlCommand{cache=default-host/clusterbench, type=CH_UPDATE, sender=perf21/web, joinInfo=null, topologyId=23, currentCH=DefaultConsistentHash{numSegments=80, numOwners=2, members=[perf21/web, perf18/web, perf19/web]}, pendingCH=null, throwable=null, viewId=8}: java.lang.IllegalArgumentException: The task is already cancelled.
> at org.infinispan.statetransfer.InboundTransferTask.cancelSegments(InboundTransferTask.java:167)
> at org.infinispan.statetransfer.StateConsumerImpl.cancelTransfers(StateConsumerImpl.java:774)
> at org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:314)
> at org.infinispan.statetransfer.StateTransferManagerImpl.doTopologyUpdate(StateTransferManagerImpl.java:195)
> at org.infinispan.statetransfer.StateTransferManagerImpl.access$000(StateTransferManagerImpl.java:61)
> at org.infinispan.statetransfer.StateTransferManagerImpl$1.updateConsistentHash(StateTransferManagerImpl.java:121)
> at org.infinispan.topology.LocalTopologyManagerImpl.handleConsistentHashUpdate(LocalTopologyManagerImpl.java:202)
> at org.infinispan.topology.CacheTopologyControlCommand.doPerform(CacheTopologyControlCommand.java:165)
> at org.infinispan.topology.CacheTopologyControlCommand.perform(CacheTopologyControlCommand.java:137)
> at org.infinispan.topology.ClusterTopologyManagerImpl.executeOnClusterSync(ClusterTopologyManagerImpl.java:540)
> at org.infinispan.topology.ClusterTopologyManagerImpl.broadcastConsistentHashUpdate(ClusterTopologyManagerImpl.java:332)
> at org.infinispan.topology.ClusterTopologyManagerImpl.updateCacheStatusAfterMerge(ClusterTopologyManagerImpl.java:319)
> at org.infinispan.topology.ClusterTopologyManagerImpl.handleNewView(ClusterTopologyManagerImpl.java:236)
> at org.infinispan.topology.ClusterTopologyManagerImpl$ClusterViewListener.handleViewChange(ClusterTopologyManagerImpl.java:579)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_43]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_43]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_43]
> at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_43]
> at org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:212)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_43]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_43]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
> {code}
> Instead, it should just log a message and ignore the cancel request.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months