NetBeans profiler agent crashes OpenJDK 17
Apache NetBeans version
Apache NetBeans 15
What happened
I've generated a remote profiler pack (Setup Attach to Process...) and mounted it into an OpenJDK 17 based Docker container (Dockerfile), using the path from the example:
-XX:+UseLinuxPosixThreadCPUClocks -agentpath:<remote>/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so=<remote>/lib,5140
After that the JDK in the container fails to start:
Profiler Agent: Initializing...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000031d0, pid=1, tid=6
#
# JRE version: (17.0+14) (build )
# Java VM: OpenJDK 64-Bit Server VM (17-ea+14, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C 0x00000000000031d0
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /fuseki/hs_err_pid1.log
How to reproduce
Mount the remote profiler pack and start the container with JAVA_OPTIONS=-Xmx7700m -Xms7700m -XX:+UseLinuxPosixThreadCPUClocks -agentpath:/var/fuseki/profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so=/var/fuseki/profiler/lib,514.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Docker on WSL2 Ubuntu
JDK
OpenJDK 17
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes
i get similar issues with profiling with nb15 against a jdk8 app, just crashes the jvm instantly. NB16 connects but just shows an "Error 0" message in NB. The message log has something USG_PROFILER_ATTACH_EXT, com.sun.tools.attach.AgentLoadException: 0. This is with NB running on JDK11 and the target process on JDK8