adoptium / adoptium/adoptium-support

libnvidia-glcore.so crashes when Swing OpenGL acceleration is enabled

Open
#489 4 comments 0 reactions 0 assignees View on GitHub
bug jbs:needs-report
Dominant language
No language data
Stars
59
Forks
13
PR merge metrics
No merged PRs in 30d

Description

## Summary

Using OpenGL acceleration with nVidia drivers under Linux causes frequent crashes of the JVM.

## Steps to reproduce

1. Obtain a PC with Linux and nVidia drivers
2. `git clone git@github.com:DanySK/Experiment-2022-Coordination-Space-Fluid.git`
3. cd Experiment-2022-Coordination-Space-Fluid
4. git checkout 0.4.0
5. `./gradlew runCompleteG`
6. A Swing UI pops up. Change its size, move it in the middle of the screen, press L to display links (raises the chance of failure), then press P and wait. drag and drop and zoom (with the mouse wheel) seem to raise the chance of a crash.

*Note*: Gradle is configured to pull the latest JVM 17 automatically and launch on that. Once the bug is fixed, the reproduction won't be possible anymore.
*Note*: please make sure that your environment does not contain `CI=true`, as this modifies the behaviour of the program

## Expected results

The simulation terminates after a while correctly

## Actual results

```
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f5a656cef50, pid=36254, tid=36500
#
# JRE version: OpenJDK Runtime Environment Temurin-17+35 (17.0+35) (build 17+35)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17+35 (17+35, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [libnvidia-glcore.so.510.54+0xecef50]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/danysk/LocalProjects/Experiment-2022-Coordination-Space-Fluid/core.36254)
#
# An error report file with more information is saved as:
# /home/danysk/LocalProjects/Experiment-2022-Coordination-Space-Fluid/hs_err_pid36254.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
[hs_err_pid36254.log](https://github.com/adoptium/adoptium-support/files/8487958/hs_err_pid36254.log)

#
```

## Triaging info

Java version:

What is your operating system and platform?

```
Computer Information:
Manufacturer: ASRock
Model: Z370M Pro4
Form Factor: Desktop
No Touch Input Detected

Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
CPU Family: 0x6
CPU Model: 0x9e
CPU Stepping: 0xa
CPU Type: 0x0
Speed: 4800 Mhz
12 logical processors
6 physical processors
HyperThreading: Supported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Unsupported
SSE41: Supported
SSE42: Supported
AES: Supported
AVX: Supported
AVX2: Supported
AVX512F: Unsupported
AVX512PF: Unsupported
AVX512ER: Unsupported
AVX512CD: Unsupported
AVX512VNNI: Unsupported
SHA: Unsupported
CMPXCHG16B: Supported
LAHF/SAHF: Supported
PrefetchW: Unsupported

Operating System Version:
"Manjaro Linux" (64 bit)
Kernel Name: Linux
Kernel Version: 5.16.14-1-MANJARO
X Server Vendor: The X.Org Foundation
X Server Release: 12101003
X Window Manager: KWin
Steam Runtime Version: steam-runtime_0.20220119.0

Video Card:
Driver: NVIDIA Corporation NVIDIA GeForce GTX 1080/PCIe/SSE2
Driver Version: 4.6.0 NVIDIA 510.54
OpenGL Version: 4.6
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 60 Hz
VendorID: 0x10de
DeviceID: 0x1b80
Revision Not Detected
Number of Monitors: 3
Number of Logical Video Cards: 1
Primary Display Resolution: 3840 x 2160
Desktop Resolution: 3840 x 2160
Primary Display Size: 73.70" x 41.46" (84.53" diag)
187.2cm x 105.3cm (214.7cm diag)
Primary Bus: PCI Express 16x
Primary VRAM: 8192 MB
Supported MSAA Modes: 2x 4x 8x 16x

Sound card:
Audio device: Realtek ALC892

Memory:
RAM: 32032 MB

VR Hardware:
VR Headset: None detected
```

How did you install Java?

Gradle toolchains:

```kotlin
javaLauncher.set(
javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
}
)
```

Did it work before?

I couldn't tell

Did you test with other Java versions?

No, but I easily do if it could be helpful, as far as Java versions pulled by Gradle are okay.

Contributor guide

Open the contributing guide

Research direction

Start by cloning Experiment-2022-Coordination-Space-Fluid, running ./gradlew runCompleteG with CI unset, and reproducing the Swing crash. Inspect the linked hs_err_pid36254.log and compare the result with other Java versions; done means establishing whether the failure belongs to the JVM or the NVIDIA driver and identifying the appropriate next component to report.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, linux
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.