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
Selector.select() returned prematurely 512 times in a row #8698
Comments
Can you share a reproducer ? |
Not really, I'm using Netty inside a big application that I can't share. Is there anything else I can do to help understand what is causing that? |
Sorry but without some sort of reproducer there is almost zero chance I can help. Generally speaking what you see is unexpected |
I tried to disable some Netty-based components in the application and this is what I get in the logs:
I'm pretty sure I don't have a leak here. I also enabled I saw on other posts that it may be related to the application writing too fast. I'm sure it's not the case here since the application is sending a small UDP datagram every minute. However, I know that the app also receives a LOT of datagrams that it processes. Am I doing something wrong here? |
I made 2 changes that solved the issues:
First, I made the changes for point 1 and it didn't solve the issue (though I understand that it should help. Then, I made the changes for the point 2 and the issues doesn't appear anymore. I'm not sure why 2 solves the issue since my event loop single thread simply dispatches the packets (and submission is never rejected). |
After running a few days, I got the I suspected the possibility that I'm writing too fast and indeed, using What can be the cause? |
@mikomarrache most likely the remote peer does not "read fast enough" or you submit writes faster then the |
I'm seeing this behavior some time (a few hours, maybe more - I'm investigating) after the application is started. I'm sure it's not related to the flush since I only call I also strongly doubt that the remote peer doesn't read fast enough since, after establishing the connection and a few initialization messages, I only send small ping messages every 30 seconds. Therefore, I'm trying to understand what you are saying about the
I'm using the default |
FYI, I'm not using the
I don't think that's related but just in case... |
I have multiple environments that have exactly the same application. The only difference is the number of Is there an easy way to check that it is really the issue? And if that's really the issue, what can be done to solve it? |
@normanmaurer I have the same problem, just keep logging and CPU comes too high (run in windows 7 64bit after 1~2 hours):
Is this issue relative to this for 4 years? Any better solution? |
@xzzh999 any reproducer ? |
use: almost at the time of 1~2 hours after startup a pool and do some udp requests every 10 seconds, here is the simple code snapshot:
|
@xzzh999 so you not even serve any traffic ? |
@normanmaurer very low traffic, there are about 20 remote endpoints, but only 2 are alive. |
unfortunally I will need some kind of "full reproducer" that I can run. |
@xzzh999 ping |
Sorry for the late reply... I found some memory leaks of release the bytebuf message at the read callback function, after i fixed these leaks it seems
I'm not sure if this is associated... |
@xzzh999 this log should still not show up usually... how often you see this ? |
about 20~30 min |
@xzzh999 can you retest with latest 4.1 branch and see if it is still a problem ? |
If it helps I have noticed as I increase the number of event loop threads the number of errors I see go up roughly in proportion. As I increase - I am seeing these error while running the MockServer build, for example, https://buildkite.com/mockserver/mockserver/builds/1012 for repo: https://github.com/mock-server/mockserver This is a reproducer but perhaps not the most helpful one. |
I've met the same problem on Android on 4.1.82.Final. Do you need such a reproducer? |
I too am seeing this error on a device running Oreo
I'm unable to reproduce this, but we use Netty indirectly through Ktor v1.6.8 |
I'm using Netty 4.1.32 and I see the following very very often in the logs:
I assume I'm doing something wrong since it's logged as a warning.
My app is running on CentOS 7.
The text was updated successfully, but these errors were encountered: