Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-4118 ISPN-3787 ISPN-4369 #2614

Closed
wants to merge 3 commits into from

Conversation

Projects
None yet
2 participants
@danberindei
Copy link
Member

commented Jun 9, 2014

ISPN-4118 Unreliable test: ThreadLocalLeakTest.testCheckThreadLocalLeaks
https://issues.jboss.org/browse/ISPN-4118

Ignore the CounterHashCode thread local in EquivalentConcurrentHashMapV8,
it should not be considered a leak since it is static.

ISPN-3787 Upgrade to c3p0 0.9.5-pre4
https://issues.jboss.org/browse/ISPN-3787
ISPN-4369 Upgrade H2 driver to 1.3.173
https://issues.jboss.org/browse/ISPN-4369

danberindei added some commits Jun 8, 2014

ISPN-4118 Unreliable test: ThreadLocalLeakTest.testCheckThreadLocalLeaks
Ignore the CounterHashCode thread local in EquivalentConcurrentHashMapV8,
it should not be considered a leak since it is static.
@Sanne

This comment has been minimized.

Copy link
Member

commented Jun 9, 2014

I still have the same threadlocal failing.. re-trying in a wiped-clean repo..

@Sanne

This comment has been minimized.

Copy link
Member

commented Jun 9, 2014

it's confirmed, did several runs and I consistently get:

testCheckThreadLocalLeaks(org.infinispan.util.ThreadLocalLeakTest) Time elapsed: 0.006 sec <<< FAILURE!
java.lang.IllegalStateException: Thread locals still present: {ForkThread-1,ThreadLocalLeakTest={java.lang.ThreadLocal@372080ce=org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8$CounterHashCode@57fa1cdc}}
at org.infinispan.util.ThreadLocalLeakTest.testCheckThreadLocalLeaks(ThreadLocalLeakTest.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

private static final Pattern THREAD_LOCAL_FILTER = Pattern.compile("(org.infinispan.(?!test).*)");
private static final Pattern THREAD_LOCAL_FILTER = Pattern.compile("org\\.infinispan\\..*");

// Some static thread locals we cannot remove, because

This comment has been minimized.

Copy link
@Sanne

Sanne Jun 9, 2014

Member

because ...

should finish the sentence?


// Some static thread locals we cannot remove, because
private static final Set<String> ACCEPTED_THREAD_LOCALS = new HashSet<String>(Arrays.asList(new String[]{
"commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8$CounterHashCode"

This comment has been minimized.

Copy link
@Sanne

Sanne Jun 9, 2014

Member

I guess the problem is the package name is missing the org.infinispan prefix.

I'm trying again..

@Sanne

This comment has been minimized.

Copy link
Member

commented Jun 9, 2014

The problem was the package name, probably a copy/paste typo. I've fixed and merge it.

@Sanne Sanne closed this Jun 9, 2014

@danberindei

This comment has been minimized.

Copy link
Member Author

commented Jun 10, 2014

Thanks @Sanne! It was missing "org.infinispan" because I intended to make it a part of the regex pattern at first.

And sorry about the unfinished sentence as well :) TBH I'm not 100% sure that having this thread-local when shutting down a web app with a local ispn library won't leak the classloader, but the TL is static so I don't know what would be a good strategy to clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.