Skip to content

Possible memory leak (org.neo4j.driver.internal.shaded.io.netty.util.ThreadDeathWatcher) #478

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

Closed
jastax opened this issue Mar 29, 2018 · 1 comment

Comments

@jastax
Copy link

jastax commented Mar 29, 2018

I'm using the 1.5.0 driver / Spring Data Neo4j (5.0.5.RELEASE).
The following error shows up in Eclipse when my application is auto-restarted after changing code.
(I don't have much time to take a deeper look right now.)

Warning: The web application [webapp] appears to have started a thread named [threadDeathWatcher-3-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 org.neo4j.driver.internal.shaded.io.netty.util.ThreadDeathWatcher$Watcher.run(ThreadDeathWatcher.java:152)
 org.neo4j.driver.internal.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
 java.lang.Thread.run(Thread.java:745)
Mär 28, 2018 11:06:24 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNUNG: The web application [intranetrepository] appears to have started a thread named [globalEventExecutor-1-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
 org.neo4j.driver.internal.shaded.io.netty.util.concurrent.GlobalEventExecutor.takeTask(GlobalEventExecutor.java:90)
 org.neo4j.driver.internal.shaded.io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:230)
 org.neo4j.driver.internal.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
 java.lang.Thread.run(Thread.java:745)
@lutovich
Copy link
Contributor

Hi @querynaut,

Thanks for reporting this problem.
Driver 1.5.0 uses a slightly outdated Netty version where ThreadDeathWatcher and GlobalEventExecutor threads might hold onto class loaders. See netty/netty#7290 for more details.

PR #479 upgrades Netty version to one containing the fix. Upgrade is in 1.6 branch and should be available with next 1.6 alpha release and then in 1.6.0 GA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants