Netty using 100% CPU

186 views
Skip to first unread message

Rogan Dawes

unread,
Feb 28, 2018, 1:53:31 AM2/28/18
to Netty discussions
(Apologies if this is a duplicate post)

I am writing an app using Netty (4.1.16-Final), that after a while ends up using 100% CPU (on multiple cores, in some cases).

I used VisualVM to try get an idea what was going on, and it showed up as being:

io.netty.channel.nio.SelectedSelectionKeySetSelector.select()

I have attached a screenshot showing a more detailed trace.

Any ideas what could be causing SelectedSelectionKeySetSelector.select() to spin like this?

Thanks!

Rogan


Screenshot from 2018-02-28 08-26-35.png

Nat

unread,
Mar 12, 2018, 7:05:02 AM3/12/18
to Netty discussions
Sounds similar to this issue: https://github.com/netty/netty/issues/2465 Which platform is it? Linux version?

Rogan Dawes

unread,
Mar 12, 2018, 8:48:52 AM3/12/18
to ne...@googlegroups.com
Hi Nat,

Thanks for the pointer. It does sound quite similar!

I've experienced the problem on both OS X and Linux, but more prevalent on OS X, I'd say. Next time it happens, I'll try put a breakpoint in that method, and trace it to see what is happening.

Rogan


--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/a7235d0e-7821-4a44-b8bd-caa553c2e68d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rogan Dawes

unread,
Mar 20, 2018, 6:52:26 AM3/20/18
to Netty discussions
So the real issue seems to be this one:


I'm using netty 4.1.22.Final on Linux (Ubuntu 16.04, OpenJDK 1.8.0_151).

Rogan

Nat

unread,
Mar 28, 2018, 3:26:44 PM3/28/18
to Netty discussions
So look like it will be fixed with https://github.com/netty/netty/pull/7801 ?

Norman Maurer

unread,
Mar 28, 2018, 3:27:09 PM3/28/18
to ne...@googlegroups.com
Yep that should fix it

Reply all
Reply to author
Forward
0 new messages