Git Product home page Git Product logo

Comments (8)

mkartashev avatar mkartashev commented on June 12, 2024 2

I would still like to inquire about when this issue might be fixed.

That, of course, I cannot say at this point. What I can say with absolute certainty is the fix will come sooner if there's a simple reproducer for the bug. Ideally something like a script that, when executed, crashes the JVM in exactly this fashion.

from jetbrainsruntime.

mkartashev avatar mkartashev commented on June 12, 2024

The stacktrace alone doesn't ring a bell. Can you provide a reproducer?

Also, JBR11 is quite old. Is the problem reproducible with 17 or 21?

from jetbrainsruntime.

AbsoluteZero-CHN avatar AbsoluteZero-CHN commented on June 12, 2024

@mkartashev
I encountered a similar issue where the JVM crashes when starting with opentelemetry-javaagent.jar attached with -XX:+AllowEnhancedClassRedefinition parameter enabled. Removing the parameter resolves the issue. Here's my crash log:
replay_pid116783.log

I build my own JBR11 with the --with-debug-level=slowdebug parameter, and here's the crash log:
hs_err_pid174734.log

I just tested it and the crash issue also occurs on JBR17 (version jbr_jcef-17.0.9-linux-x64-b1000.47).
replay_pid175260.log

After debugging, I found that the issue was caused by agent retransforming well-known classes(java.* jdk.* sun.* etc), which led to an exception in the java_lang_Class assert is_instance method.

In my case (Java8 with dcevm patch), opentelemetry-javaagent.jar retransformed the java.lang.ClassLoader class, causing the classloader to lose all loaded classes. As a result, the native method findLoadedClass0 always return null(more details: dcevm/dcevm#215). I ported the commit that fixes the retransform well-known classes issue and encountered this problem (see commit for more details: HotswapProjects/openjdk-jdk8u-dcevm@654001b).

Hope this information is helpful. Please fix this issue as soon as possible. I'll try to port it to the dcevm8 projectπŸ˜†.

Best regards!

from jetbrainsruntime.

mkartashev avatar mkartashev commented on June 12, 2024

@AbsoluteZero-CHN Thanks for the detailed explanation! I will pass on to @skybber
FYI: the issue id in youtrack is JBR-6338, you can follow it there.

from jetbrainsruntime.

AbsoluteZero-CHN avatar AbsoluteZero-CHN commented on June 12, 2024

@AbsoluteZero-CHN Thanks for the detailed explanation! I will pass on to @skybber FYI: the issue id in youtrack is JBR-6338, you can follow it there.

I understand that this may be a foolish question, but I would still like to inquire about when this issue might be fixed. It is crucial for me as I have limited time left for my project 😣.

from jetbrainsruntime.

AbsoluteZero-CHN avatar AbsoluteZero-CHN commented on June 12, 2024

Although I acknowledge that this is not an ideal solution, I still want to share my approach here in the hope of providing some temporary workaround for those who are facing the same problem.

I have ported the code responsible for enhancing rt.jar from the opentelemetry-javaagent.jar to the openjdk source code (hard code), and then built a dedicated jdk for opentelemetry-javaagent.jar.
Next, in hotswap-agent.jar, I enhanced the source code of opentelemetry-javaagent.jar (ensuring that hotswap-agent.jar starts before opentelemetry-javaagent.jar) to make opentelemetry-javaagent.jar ignore the classes in rt.jar.
This way, opentelemetry-javaagent.jar does not need to enhance the classes in rt.jar, but can still make this part of the code effective.

Currently, this approach is working well for me. πŸ˜†

from jetbrainsruntime.

skybber avatar skybber commented on June 12, 2024

There is a jbr branch with the patch available at:

https://github.com/JetBrains/JetBrainsRuntime/tree/vladimir.dvorak/JBR-6363

if you know how to build a JDK, it would be great if you could try it on your case, but don't feel it's necessary

from jetbrainsruntime.

skybber avatar skybber commented on June 12, 2024

New jbr release https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.10b1186.1 support redefinition of java.lang.object, so this issue should be fixed now

from jetbrainsruntime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.