apache / apache/netbeans

NetBeans profiler agent crashes OpenJDK 17

Open
#4,700 1 comment 0 reactions 0 assignees View on GitHub
kind:bug needs:triage profiler
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### 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](https://github.com/AtomGraph/fuseki-docker/blob/master/Dockerfile)), using the path from the example:
```
-XX:+UseLinuxPosixThreadCPUClocks -agentpath:/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so=/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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the crash with the referenced Dockerfile, OpenJDK 17, and the remote profiler pack's libprofilerinterface.so agentpath. Inspect the generated hs_err_pid1.log and profiler agent startup behavior; done means the container's JVM starts without the SIGSEGV when the profiler agent is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, linux
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.