-
Notifications
You must be signed in to change notification settings - Fork 937
Closed
Description
I am trying to profile an application from inside a kubernetes pod.
Pod is running on aws graviton instances. We are using alpine base image for containers.
/app # uname -r
5.10.210-201.852.amzn2.aarch64
/app #
/app # cat /etc/alpine-release
3.17.5
When I run, i get following error:
tmp/async-profiler-3.0-linux-arm64 # cd bin/
/tmp/async-profiler-3.0-linux-arm64/bin # ./asprof 1
Target JVM failed to load /tmp/async-profiler-3.0-linux-arm64/bin/../lib/libasyncProfiler.so
java -agentpath:/tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so=start,summary,flat -version gives following output
/tmp/async-profiler-3.0-linux-arm64/bin # java -agentpath:/tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so=start,summary,flat -version
Picked up JAVA_TOOL_OPTIONS: -XX:+ExplicitGCInvokesConcurrent -Xms4G -Dkotlinx.coroutines.scheduler=off
Error occurred during initialization of VM
Could not find agent library /tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so in absolute path, with error: Error loading shared library libstdc++.so.6: No such file or directory (needed by /tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so)
After adding libstdc++.so.6, running into following error:
/tmp/async-profiler-3.0-linux-arm64/bin # java -agentpath:/tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so=start,summary,flat -version
Picked up JAVA_TOOL_OPTIONS: -XX:+ExplicitGCInvokesConcurrent -Xms4G -Dkotlinx.coroutines.scheduler=off
Error occurred during initialization of VM
Could not find agent library /tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so in absolute path, with error: Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so)
/tmp/async-profiler-3.0-linux-arm64/bin # ls /lib/
apk/ ld-musl-aarch64.so.1 libc.musl-aarch64.so.1 libssl.so.3 libz.so.1.2.13 modules-load.d/
firmware/ libapk.so.3.12.0 libcrypto.so.3 libz.so.1 mdev/ sysctl.d/
/tmp/async-profiler-3.0-linux-arm64/bin # ls /lib/ld-musl-aarch64.so.1
/lib/ld-musl-aarch64.so.1
Tried adding gcompat, but it did not help.
/tmp/async-profiler-3.0-linux-arm64/bin # apk add gcompat
(1/3) Installing musl-obstack (1.2.3-r0)
(2/3) Installing libucontext (1.2-r0)
(3/3) Installing gcompat (1.1.0-r0)
OK: 318 MiB in 22 packages
/tmp/async-profiler-3.0-linux-arm64/bin # ls /lib/
apk ld-linux-aarch64.so.1 libapk.so.3.12.0 libcrypto.so.3 libssl.so.3 libucontext_posix.so.1 libz.so.1.2.13 modules-load.d
firmware ld-musl-aarch64.so.1 libc.musl-aarch64.so.1 libgcompat.so.0 libucontext.so.1 libz.so.1 mdev sysctl.d
/tmp/async-profiler-3.0-linux-arm64/bin # java -agentpath:/tmp/async-profiler-3.0-linux-arm64/lib/libasyncProfiler.so=start,summary,flat -version
Picked up JAVA_TOOL_OPTIONS: -XX:+ExplicitGCInvokesConcurrent -Xms4G -Dkotlinx.coroutines.scheduler=off
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000053a0, pid=279, tid=280
#
# JRE version: (11.0.20.1+9) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.20.1+9-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# C 0x00000000000053a0
#
# Core dump will be written. Default location: /tmp/async-profiler-3.0-linux-arm64/bin/core.279
#
# An error report file with more information is saved as:
# /tmp/async-profiler-3.0-linux-arm64/bin/hs_err_pid279.log
#
#
Aborted (core dumped)
How can I fix this issue? Any help is much appreciated.
Metadata
Metadata
Assignees
Labels
No labels