New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BOUNTY $25] JVM Crash: SEVERE: ProfilingEvent.START encountered without ProfilingEvent.EXECUTED #62
Comments
@KIC Can you share a simple test case so I can investigate this further please? (feel free to submit it as a unit test to the project if you want). |
This is pretty hard to tackle via simple unit test as the jvm not always crashes. Stilll you can see a lot of severe meesages by just running the test below. As I have mentioned you can also just clone https://github.com/KIC/LPPL and run the kic.lppl.SornetteTest test.
|
@KIC have you had any luck with this? I'll probably place a small bounty on this issue to see if i can get any takers unless you've already resolved it. |
No I was not able to solve or work around this so far. Currently the only workaroud is not using multiple threads. Thanks a lot for putting a bounty on it!! |
i tried the JVMCrashTest and without going further into the actual aparapi code it looks like it might be solved by using an AtomicReference, or at least synchronization, to make the public void onEvent(ProfilingEvent event) procedure Atomic, or to make the Profiles local to each thread using ThreadLocal and then merge the per-thread results after. still i dont know how this works it just looks like an ordinary multithread race condition that should be solvable. btw for the JVMCrashTest i tried: and also suggest making ABCCKernel a static class in case that matters |
@automenta Would you be willing to try a solution out against @KIC 's unit test above? I'm sure you can work with him to get better unit tests if we need to but that one should suffice? |
im working on it now, seems to sort of fix that one but then it started complaining about the sequence of events it was tracking. so im looking into completely multithreading all a Kernel's KernelRunner's if it's possible https://gist.github.com/automenta/2d2d194976b2ed451cea5dae7e9bbffc#file-kerneldeviceprofile-java-L49 |
@automenta If we do that I think we want to make sure that the user can choose to run it asynchronously or synchronously when they run a kernel as well. We may be able to kill two birds with one stone and also solve issue #41 at the same time don't you think? |
yeah i think it can solve that. what i'm trying to do is keep the exact same user-level API but transparently handle the case when another thread gets involved, by keeping KernelRunner thread-local they dont need to interact but can share bytecode and whatever JNI resources are safe to share. |
@automenta Sure, and that should be what we do. Though I'm saying once we have that done we can add a similar api call for executing the kernel that is the async variety of it that uses many of the same threading your doing to handle the async flavor as well. |
right it could be a wrapper around the Executors threadpool api that allows management and async callback on events etc. i keep seeing things id like to use java 8 and java 9 stuff for as well as other libraries. maybe after this ill make an experimental fork and call it aparapoop |
Aparapi is already java8 just use it. Just can't use lambdas in the kernels
themself.
…On Oct 22, 2017 2:47 PM, "automenta" ***@***.***> wrote:
right it could be a wrapper around the Executors threadpool api that
allows management and async callback on events etc. i keep seeing things id
like to use java 8 and java 9 stuff for as well as other libraries. maybe
after this ill make an experimental fork and call it aparapoop
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC5JAg3-d4FnchPMyqoQA_qYOA_DaO3qks5su42-gaJpZM4P5qeH>
.
|
@automenta and @KIC Any movement on this ticket? Do I need to up the bounty and see if we have any other takers willing to finish it. I'll wait if you want to finish it though to give you a chance. |
@KIC I've tested your JVMCrashTest and I am not getting a JVM crash, however I do get the SEVERE level log messages. @freemo @automenta |
@KIC Can you confirm if the JVM crash still happens with aparapi-1.4.1 and aparapi-1.7.0-SNAPSHOT both with aparapi-jni-1.2.0 regarding the above JVMCrashTest? |
Issue is now resolved in master branch, closing ticket. |
…profiling under multithreading (refs #62)"
Hmm when I create more then one Kernel from the same class then I suddenly run into such messages like below. I could not find anything in the documentation that this should not be supported. Basically I have an object pool of a limited number of Kernels and different threads can aquire those limited resources. But this results in a JVM crash.
Thanks
KIC
PS you could find a runnable version at: https://github.com/KIC/LPPL the problem arises at kic.lppl.SornetteTest
The text was updated successfully, but these errors were encountered: