KQueue NativeIoException when profiling with JFR
See original GitHub issueExpected behavior
The following behavior is puzzling me to even look where to start debugging.
When using a combination Kqueue event loops and running a JFR recording on the running program, suddenly this error appears:
Apr 05, 2019 8:12:30 AM com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueEventLoop handleLoopException
WARNING: Unexpected exception in the selector loop.
com.couchbase.client.core.deps.io.netty.channel.unix.Errors$NativeIoException: kevent(..) failed: Invalid argument
at com.couchbase.client.core.deps.io.netty.channel.unix.Errors.newIOException(Errors.java:122)
at com.couchbase.client.core.deps.io.netty.channel.kqueue.Native.keventWait(Native.java:97)
at com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueEventLoop.kqueueWait(KQueueEventLoop.java:147)
at com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueEventLoop.kqueueWait(KQueueEventLoop.java:139)
at com.couchbase.client.core.deps.io.netty.channel.kqueue.KQueueEventLoop.run(KQueueEventLoop.java:208)
at com.couchbase.client.core.deps.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
at com.couchbase.client.core.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
The interesting piece is I can start my workload fine and it runs for minutes, but as soon as I start a JFR this error pops up in the logs and doesn’t go away. Any idea what JFR does that could trip up the Kqueue implementation?
Actual behavior
No exception?
Netty version
4.1.34.Final
JVM version (e.g. java -version
)
openjdk version “11.0.2” 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
OS version (e.g. uname -a
)
(OSX Mojave 10.14.4) Darwin 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
4 Troubleshoot Performance Issues Using JFR
The Java Flight Recorder is a great tool to investigate performance issues. No other tool gives as much profiling data without skewing the...
Read more >Real-time profiling for Java using JFR metrics
APM for Java: Real-time Java profiling using Java Flight Recorder (JFR) metrics.
Read more >Hunting down code hotspots with JDK Flight Recorder - BellSoft
JDK Flight Recorder (JFR) and Mission Control (MC) are free and open source performance/profiling products available with OpenJDK 11.
Read more >Java Profiler for Azure Monitor Application Insights
The Application Insights Java profiler uses the JFR profiler provided by the JVM to record profiling data, allowing users to download the ...
Read more >Using Java Flight Recorder and Mission Control (Part 1) - Foojay
jcmd provides a help command that describes documents for each command options. $ jcmd $(pgrep java) JFR.start \ name=app-profile \ duration= ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it basically interrupts from time to time the native call which then produces the EINTR
Also I have an idea for an unit test… working on it as we speak