JOCL icon indicating copy to clipboard operation
JOCL copied to clipboard

SIGSEGV Erro during release

Open rotilho opened this issue 1 year ago • 2 comments

Hello,

First of all, thank you for the amazing work with JOCL.

I'm using JOCL to calculate PoW and I'm encountering some issues during unit tests. Everything works fine until I try to release JOCL resources, at which point I encounter the error below. While I don't need technically to release it during normal execution, I thought it was worth reporting.

Code: AttoWorkerOpenCL Test: AttoWorkerTest

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f3fe6e4a22f, pid=1830426, tid=1830432
#
# JRE version: OpenJDK Runtime Environment Corretto-11.0.24.8.1 (11.0.24+8) (build 11.0.24+8-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.24.8.1 (11.0.24+8-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libOpenCL.so+0x1122f]  clReleaseKernel+0x4f
#
# 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 /var/home/rotilho/IdeaProjects/commons/core.1830426)
#
# An error report file with more information is saved as:
# /var/home/rotilho/IdeaProjects/commons/hs_err_pid1830426.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/corretto/corretto-11/issues/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

...

Current thread (0x00007f5124028800):  JavaThread "Test worker" [_thread_in_native, id=1825925, stack(0x00007f512cf00000,0x00007f512d000000)]

Stack: [0x00007f512cf00000,0x00007f512d000000],  sp=0x00007f512cffb480,  free space=1005k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libOpenCL.so+0x1122f]  clReleaseKernel+0x4f
C  [libJOCL_2_0_5-linux-x86_64.so+0x1a931]  Java_org_jocl_CL_clReleaseKernelNative+0xa1
j  org.jocl.CL.clReleaseKernelNative(Lorg/jocl/cl_kernel;)I+0
j  org.jocl.CL.clReleaseKernel(Lorg/jocl/cl_kernel;)I+1
j  cash.atto.commons.AttoWorkerOpenCL.close()V+4
j  cash.atto.commons.AttoWorkerTest$Companion.afterAll()V+13
j  cash.atto.commons.AttoWorkerTest.afterAll()V+3

> Task :test FAILED

rotilho avatar Aug 03 '24 08:08 rotilho

Sorry for the delay, and only a short 'acknowledge' for now: I'll try to allocate some time to look into this. But it does not seem to be super urgent or a super common error (and I've reduced the time that I'm spending for JOCL - it has always been a "spare time" project, and "spare time" is always limited...)

gpu avatar Sep 13 '24 17:09 gpu

Totally understand. Yeah, not urgent at all.

Again, thank you for the amazing work!

rotilho avatar Apr 27 '25 13:04 rotilho