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
Netty Epoll Bug occurs again (WorkAround Not working) #8306
Comments
Are you sure the |
Thank you for the reply normanmaurer. The shutdown method is executed. The isTerminated flag which the awaitTermination() function returns is true . |
That’s strange... can you share a reproducer with me that I can run ?
… Am 22.09.2018 um 10:23 schrieb Prakash Premkumar ***@***.***>:
Thank you for the reply normanmaurer.
The shutdown method is executed. The isTerminated flag which the awaitTermination() function returns true .
But the threads are not dying.
Is there a way to solve this problem?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It's actually a web app where netty runs inside tomcat. |
I want you to create a small app that reproduces it that I can run myself
… Am 22.09.2018 um 10:30 schrieb Prakash Premkumar ***@***.***>:
May I know what you mean by reproducer ? It's actually a web app where netty runs inside tomcat.
Which snippet of the code do you want to see ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Okay. I will write it up and post it here ! |
@normanmaurer , Unfortunately, I will not be able to share the reproducer with you, since it involves some proprietary code. Tomcat is being shutdown (the process is being killed). Although, it complains of failure to stop threads. Will there be any memory leak in this case ? May I know, what was the usual fix, when you encountered this error ? Is this a jdk bug ? |
@normanmaurer , Any updates on this ? |
@prakash-premkumar sorry without a way to reproduce here I can not really help. For me it looks like you not correctly shutdown all the |
|
@johnou, Thanks a lot for your reply. I'm invoking shutdown in the contextDestroyed() of tomcat (which will be called when tomcat shuts down) This is the shutdown method of the IMAPClient.
This is how I initialize the EventLoopGroup
|
Are you sure that you are tracking all IMAPClient instances and invoking shutdown on all of them in contextDestroyed()? |
It's important to note that if you are terminating the JVM there won't be a memory leak. The message you are seeing is only a problem if you are redeploying webapps without shutting down Tomcat. |
@johnou Yes, I'm invoking shutdown on all IMAPClient instances in contextDestroyed(). (And I'm using only one IMAPClient object in one app) When I redeploy the webapp, I shutdown and restart tomcat, So you are saying that there wont be any memory leak in that case ? (My tomcat process is also getting killed when I shutdown ) Is that right ? |
Sorry but without a reproducer I can run I will not be able to help any further. As explained before I think you miss to call shutdown in some cases. Please re-open with more details if you still think there is a bug. And yes if you restart tomcat there will be no leak |
I'm using Netty 4.1.29.Final.
Java Version 1.8.0_181-b13
Amazon AMI Linux 4.9.119-44.140.amzn1.x86_64 (2017.09)
I' using lafaspot imapnio client which uses netty. [(https://github.com/lafaspot/imapnio)]
I'm running my Java App in Tomcat 8.5.29.
I get the following exception while shutting down the tomcat server.
The NIO threads are not being killed, causing a memory leak.
This is the code I'm using to create and shutdown threads:
`public class IMAPClient {
}`
Can you please tell me how to fix this error ?
The text was updated successfully, but these errors were encountered: