Skip to content
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

Crashes when using the Aleph library (built on top of netty) #5901

Closed
HughPowell opened this issue Apr 21, 2022 · 2 comments · Fixed by #5902
Closed

Crashes when using the Aleph library (built on top of netty) #5901

HughPowell opened this issue Apr 21, 2022 · 2 comments · Fixed by #5902
Labels
bug Something isn't working

Comments

@HughPowell
Copy link

HughPowell commented Apr 21, 2022

Describe the bug
The binary created by the reproduction repo crashes when using the OpenTelemetry javaagent.

Steps to reproduce

  1. Install Clojure
  2. Clone the project
  3. Build the project clj -T:build uber
  4. Download the OpenTelemetry javaagent
  5. Run the resulting jar OTEL_TRACES_EXPORTER=logging java -javaagent:opentelemetry-javaagent.jar -jar target/honeycomb-aleph-0.1.2-standalone.jar

Unfortunately it's a Clojure project and my Java-foo isn't strong enough to extract a purely Java project from the code.

What did you expect to see?
The HTML for http://www.example.com printed to the terminal.

What did you see instead?
The following output and exception stack trace

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[otel.javaagent 2022-04-21 11:22:55:997 +1000] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 1.13.0
Exception in thread "main" java.lang.NullPointerException
	at io.opentelemetry.javaagent.instrumentation.netty.v4_1.InstrumentedAddressResolverGroup.getResolver(InstrumentedAddressResolverGroup.java:42)
	at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:194)
	at io.netty.bootstrap.Bootstrap.access$000(Bootstrap.java:46)
	at io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:180)
	at io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:166)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
	at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:1012)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:516)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at manifold.executor$thread_factory$reify__527$f__528.invoke(executor.clj:47)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.base/java.lang.Thread.run(Thread.java:829)
[otel.javaagent 2022-04-21 11:23:07:045 +1000] [OkHttp http://localhost:4317/...] ERROR io.opentelemetry.exporter.internal.grpc.OkHttpGrpcExporter - Failed to export metrics. The request could not be executed. Full error message: Failed to connect to localhost/0:0:0:0:0:0:0:1:4317

What version are you using?
v1.13.0

Environment
All on my laptop
java --version

openjdk 11.0.14.1 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.21.10)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.21.10, mixed mode, sharing)

javac --version

javac 11.0.14.1

clj --version

Clojure CLI version 1.10.3.1075

OS & version

Pop!_OS 21.10

@HughPowell HughPowell added the bug Something isn't working label Apr 21, 2022
@trask
Copy link
Member

trask commented Apr 21, 2022

@HughPowell thanks for reporting this!

@HughPowell
Copy link
Author

Amazing! Thanks for the super fast fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants