question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When netty_transport_native_epoll_x86_64 cannot be found, stacktrace is logged

See original GitHub issue

Expected behavior

When the library “netty_transport_native_epoll_x86_64” cannot be loaded, log the error at DEBUG but don’t log a “scary” stack trace that users may construe as an error, when, in fact, the library is loaded fine through another mechansism, which is logged later: 1582 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - Successfully loaded the library /tmp/libnetty_transport_native_epoll_x86_646303477118324058101.so

Actual behavior

“scary” stacktrace is logged if users are running with debug logging, and they wonder if there is an error.

05:30:46.950 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.workdir: /tmp (io.netty.tmpdir)
05:30:47.013 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism.
java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:229)
	at java.security.AccessController.doPrivileged(Native Method)
	at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:221)
	at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:207)
	at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:118)
	at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:199)
	at io.netty.channel.epoll.Native.<clinit>(Native.java:61)
	at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:33)
	at com.twitter.finagle.netty4.nativeEpoll$.enabled$lzycompute(nativeEpoll.scala:14)
	at com.twitter.finagle.netty4.nativeEpoll$.enabled(nativeEpoll.scala:14)
	at 

Steps to reproduce

Minimal yet complete reproducer code (or URL to code)

Netty version

4.1.16.Final

JVM version (e.g. java -version)

OS version (e.g. uname -a)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:13
  • Comments:28 (8 by maintainers)

github_iconTop GitHub Comments

21reactions
pcjcommented, Dec 27, 2017

I agree with @jcrossley on this one. It’s plenty information to just log the attempted load path in debug mode. Stacktrace is not expected behavior for a java app, even at debug level. Wastes people’s time (like mine!) to hunt down this issue.

9reactions
enesunalcommented, Dec 13, 2018

Setting log level to debug for my project doesn’t mean I set it to debug for libraries. Please exclude the stack traces when you’re releasing for production. It’s the default log level(debug) for almost any developer who tries to make things work, these stacktraces just make initial development harder. If it’s important, you can even print a warning explaining the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should we log the stacktrace for managed exception?
On the output side, I think you can make that case that for some exceptions the stack trace is not important.
Read more >
How to Collect and Manage All of Your Multi-Line Logs
Now that each stack trace is collapsed into a single log line, you can easily identify the initial function that generated an error....
Read more >
Analyze a stack trace - Android Developers
Debugging an app often requires working with stack tracer app. Find out how to work with stack traces in Android Studio.
Read more >
How to Print Stack Trace via Script - ServiceNow Community
Solved: Does anyone know if it is possible to print a stack trace out from a try/catch? I want to find out the...
Read more >
Environment.StackTrace Property (System) - Microsoft Learn
Gets current stack trace information. ... However, the StackTrace property might not report as many method calls as expected due to code transformations ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found