TornadoVM icon indicating copy to clipboard operation
TornadoVM copied to clipboard

ConcurentModificationException and JRE fatal error

Open nailh-boop opened this issue 1 year ago • 12 comments

Thank you for taking the time to submit a bug report. Please fill the following template with your report to help our team to fix and/or propose solutions.


Describe the bug

Calling function from parallelStream for example like someSet.parallelStream().forEach(e->e.tornadoFunction()); cause errors. Code works fine in a single stream.

ConcurentModificationException trace

	at java.base/java.util.ArrayList.forEach(ArrayList.java:1598) ~[na:na]
	at [email protected]/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskGraph.reuseDeviceBufferObject(TornadoTaskGraph.java:1063) ~[tornado-runtime-1.0.7.jar:na]
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[na:na]
	at [email protected]/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskGraph.lockObjectsInMemory(TornadoTaskGraph.java:1074) ~[tornado-runtime-1.0.7.jar:na]
	at [email protected]/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskGraph.transferToDevice(TornadoTaskGraph.java:969) ~[tornado-runtime-1.0.7.jar:na]
	at [email protected]/uk.ac.manchester.tornado.api.TaskGraph.transferToDevice(TaskGraph.java:683) ~[tornado-api-1.0.7.jar:na]

JRE fatal error trace

	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
[thread 15052 also had an error]
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
[thread 704 also had an error]
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
[thread 22184 also had an error]
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
[thread 15120 also had an error]
[thread 24464 also had an error]
	[JNI] Path\TornadoVM\TornadoVM\tornado-drivers\ptx-jni\target\windows-amd64-release\sources\source\PTXStream.cpp:181 in function: free_staging_block result = 1
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  [thread 25064 also had an error]EXCEPTION_ACCESS_VIOLATION (0xc0000005)
 at pc=0x00007fffed8562ad, pid=15384, tid=17740
#
# JRE version: OpenJDK Runtime Environment (21.0.2+13) (build 21.0.2+13-58)
# Java VM: OpenJDK 64-Bit Server VM (21.0.2+13-58, mixed mode, emulated-client, tiered, jvmci, parallel gc, windows-amd64)
# Problematic frame:
# C  [tornado-ptx.dll+0x62ad]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# Path\hs_err_pid15384.log
GPU: point (0.0,0.0,0.0) <=> CPU: point (9638150.158684263,1.860846326831648E7,53020.0)
ForkJoinPool.commonPool-worker-5
[55.673s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Computing system setup (please complete the following information):

  • OS: Windows 10
  • Cuda 12.5
  • TornadoVM commit id: 1.0.7-c712aa5

Additional context

Add any other context about the problem here.


nailh-boop avatar Oct 16 '24 10:10 nailh-boop