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

Span profiling does not work with pyroscope-java 0.13.0 or above #12

Open
aleks-p opened this issue Nov 7, 2024 · 1 comment
Open

Comments

@aleks-p
Copy link
Contributor

aleks-p commented Nov 7, 2024

Bumping the pyroscope jar to 0.13.0 or above causes this error when starting the application:

2024-11-07 21:02:57.073 [DEBUG] Config: Config{agentEnabled=true, applicationName='rideshare.java.push.app', profilingInterval=PT0.01S, profilingEvent=ITIMER, profilingAlloc='512k', profilingLock='10ms', samplingEventOrder='null', uploadInterval=PT15S, javaStackDepthMax=2048, logLevel=DEBUG, serverAddress='http://pyroscope:4040', authToken='null', timeseriesName='rideshare.java.push.app', timeseries=rideshare.java.push.app, format=JFR, pushQueueCapacity=8, labels={hostname=rideshare-java-us-east}, ingestMaxTries=8, compressionLevelJFR=1, compressionLevelLabels=1, allocLive=false, httpHeaders={}, samplingDuration=null, tenantID=null}
Exception in thread "main" java.lang.reflect.InvocationTargetException
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
 	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
 	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.UnsatisfiedLinkError: Native Library /tmp/root-pyroscope/libasyncProfiler-linux-arm64-d8f67081669db2e1f0ee45a040ad69a4e369af5.so already loaded in another classloader
 	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:201)
 	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
 	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
 	at java.base/java.lang.Runtime.load0(Runtime.java:755)
 	at java.base/java.lang.System.load(System.java:1953)
 	at io.pyroscope.one.profiler.AsyncProfiler.getInstance(AsyncProfiler.java:36)
 	at io.pyroscope.labels.io.pyroscope.PyroscopeAsyncProfiler.getAsyncProfiler(PyroscopeAsyncProfiler.java:32)
 	at io.pyroscope.javaagent.Profiler.<init>(Profiler.java:27)
 	at io.pyroscope.javaagent.PyroscopeAgent$Options$Builder.<init>(PyroscopeAgent.java:85)
 	at io.pyroscope.javaagent.PyroscopeAgent.start(PyroscopeAgent.java:33)
 	at io.pyroscope.javaagent.PyroscopeAgent.premain(PyroscopeAgent.java:25)
 	... 6 more
 *** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422

Tested with https://github.com/grafana/pyroscope/blob/main/examples/tracing/tempo/docker-compose.yml

@aleks-p aleks-p changed the title Span profiling does not work with pyroscope-java 0.14.0 Span profiling does not work with pyroscope-java 0.13.0 or above Nov 7, 2024
@bryanhuhta
Copy link

bryanhuhta commented Nov 7, 2024

Possibly related: #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants