netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

28 failures when running java/debugger.jpda.truffle tests with GraalVM for JDK21

Open jtulach opened this issue 1 year ago • 3 comments

Apache NetBeans version

Apache NetBeans 20

What happened

I am trying to bugfix the support for debugging GraalVM languages to run properly on GraalVM for JDK21+. However the GraalVM for JDK21 has switched to so called Truffle Unchained. Due to that the tests in the debugger.jpda.truffle fails a lot. There is 28 failures out of 30 tests.

To reproduce build NetBeans and then:

netbeans$ JAVA_HOME=~/bin/graalvm-21 ant -f java/debugger.jpda.truffle test

Fixing the tests is a lot of work for an outsider. Martin @entlicher, could you look at them and adjust them to work with Truffle Unchained - I assume Truffle Unchained is responsibility of your team, so this could fit into your repsonsibilities (a bit) too.

Language / Project Type / NetBeans Component

NetBeans API Support

How to reproduce

To reproduce build NetBeans and then:

netbeans$ JAVA_HOME=~/bin/graalvm-21 ant -f java/debugger.jpda.truffle test

Did this work correctly in an earlier version?

No / Don't know

Operating System

Ubuntu

JDK

GraalVM for JDK21

Apache NetBeans packaging

Own source build

Anything else

No response

Are you willing to submit a pull request?

No

jtulach avatar Jan 07 '24 14:01 jtulach

the GraalVM job is also running on an EOL graal config: https://github.com/apache/netbeans/blob/b2db3a6941e9c324e22cb435d1a66eead78ec668/.github/workflows/main.yml#L2563

I bumped it a little bit in #6369 as intermediate step, but it needs to be moved to a supported version. Graal upgrades are a bit of a minefield https://github.com/apache/netbeans/pull/6369#issuecomment-1688494679 - not all releases support all components.

maybe also useful as starting point, since this test is disabled: https://github.com/apache/netbeans/blob/b2db3a6941e9c324e22cb435d1a66eead78ec668/java/debugger.jpda.truffle/test/unit/src/org/netbeans/modules/debugger/jpda/truffle/PolyglotTest.java#L97

mbien avatar Jan 07 '24 18:01 mbien

@entlicher what's the status of this? Are you still targeting a fix for NB21, or can we bump forward to NB22?

neilcsmith-net avatar Jan 23 '24 09:01 neilcsmith-net

to add a bit more info for anyone who is interested in this:

  • we might start to disable modules to be able to keep the polyglot tests active for a while longer (https://github.com/apache/netbeans/pull/7169)
  • graalvm deployment changed, additional languages are not installed via gu "into" the JDK, they are regular dependencies for the application (https://github.com/oracle/graal/issues/6852)
    • even though this happened in GraalVM 21, 17 does not seem to have any language extensions ($bin/gu available) for some reason, I don't know why. edit: GraalVM 17 v22.3.1 was the last known release which had all language extensions available, tests are using this build now https://github.com/apache/netbeans/blob/1a4519c40243e3556209286159bb9c3d7704e135/.github/workflows/main.yml#L2582-L2584
    • i am not looking forward to making lib wrapper modules for them just for the tests, maybe there is a way to avoid this and keep them in the env somehow (jlink a custom jdk for the workflow? find a dist which includes all?)
  • to make the graal tests build/run from within NB while using GraalVM CE, i had to remove the <copy todir="${jpda.classes.dir}"> sections in java/api.debugger.jpda/build.xml, java/debugger.jpda.truffle/build.xml and java/debugger.jpda/build.xml

mbien avatar Mar 18 '24 09:03 mbien