Topic
  • 9 replies
  • Latest Post - ‏2018-12-20T18:32:41Z by ym1
Alessandro Pasini
Alessandro Pasini
4 Posts

Pinned topic IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

‏2018-08-08T07:27:22Z |

It seems thats in IBM SDK 8.0.5.17 on x64 hardware (tested on Windows 7 and Windows 2016), class.isAssignableFrom() return randomly an incorrect value.

Previous versions of SDK are not effected by this problem.

Can anybody confirm? Any fixes?

Thanks.

  • ym1
    ym1
    5 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-08T16:44:15Z  

    It's possible, but I'm not aware of any known problems. Do you have a test case that can reproduce the issue?

  • Alessandro Pasini
    Alessandro Pasini
    4 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-09T08:16:04Z  
    • ym1
    • ‏2018-08-08T16:44:15Z

    It's possible, but I'm not aware of any known problems. Do you have a test case that can reproduce the issue?

    I have problems using JNA (https://github.com/java-native-access/jna), in this instruction:

    SAFEARRAY.createSafeArray(new WTypes.VARTYPE(Variant.VT_UI1), 100);
    

    I have a JUnit test that call that instruction several times. Every times that I run it, only on SDK 8.0.5.17 (there's no problem with previous versions. Tested on 8.0.5.16, 8.0.5.15, 8.0.5.11 and 8.0.5.6) and only NOT in debug mode, it throw this exception randomly:

    java.lang.IllegalArgumentException: Unsupported array argument type: class com.sun.jna.platform.win32.OaIdl$SAFEARRAYBOUND
    

    I contacted the team of that library and they say that that exception is throwed when

    Structure[].class.isAssignableFrom(SAFEARRAYBOUND[].class) == false
    

    (It's not the exact check that they do. I simplified it)

    To reproduce the issue you can run this:

            public static void main(String[] args) {
                    for (int i = 0; i < 1000; i++) {
                            System.out.println(i);
                            try {
                                    SAFEARRAY.createSafeArray(new WTypes.VARTYPE(Variant.VT_UI1), 100);
                            } catch (Exception e) {
                                    System.err.println(e.toString());
                            }
                    }
            }
    

     

    Updated on 2018-08-09T08:18:02Z at 2018-08-09T08:18:02Z by Alessandro Pasini
  • ym1
    ym1
    5 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-10T00:44:14Z  

    I have problems using JNA (https://github.com/java-native-access/jna), in this instruction:

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">SAFEARRAY.createSafeArray(new WTypes.VARTYPE(Variant.VT_UI1), 100); </pre>

    I have a JUnit test that call that instruction several times. Every times that I run it, only on SDK 8.0.5.17 (there's no problem with previous versions. Tested on 8.0.5.16, 8.0.5.15, 8.0.5.11 and 8.0.5.6) and only NOT in debug mode, it throw this exception randomly:

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">java.lang.IllegalArgumentException: Unsupported array argument type: class com.sun.jna.platform.win32.OaIdl$SAFEARRAYBOUND </pre>

    I contacted the team of that library and they say that that exception is throwed when

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">Structure[].class.isAssignableFrom(SAFEARRAYBOUND[].class) == false </pre>

    (It's not the exact check that they do. I simplified it)

    To reproduce the issue you can run this:

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr"> public static void main(String[] args) { for (int i = 0; i < 1000; i++) { System.out.println(i); try { SAFEARRAY.createSafeArray(new WTypes.VARTYPE(Variant.VT_UI1), 100); } catch (Exception e) { System.err.println(e.toString()); } } } </pre>

     

    Thanks, I was able to recreate your issue on 8.0.5.17. The core of the IBM JDK is now open source in OpenJ9 so I tried the latest Windows nightly build of that and it ran fine. Can you try that yourself in your actual scenario and see if it works? If it works then the problem might already be fixed and the fix should make it into a future release of the IBM JDK.

     

    The nightly build is available here: https://adoptopenjdk.net/nightly.html?variant=openjdk8&jvmVariant=openj9

  • Alessandro Pasini
    Alessandro Pasini
    4 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-13T10:15:55Z  
    • ym1
    • ‏2018-08-10T00:44:14Z

    Thanks, I was able to recreate your issue on 8.0.5.17. The core of the IBM JDK is now open source in OpenJ9 so I tried the latest Windows nightly build of that and it ran fine. Can you try that yourself in your actual scenario and see if it works? If it works then the problem might already be fixed and the fix should make it into a future release of the IBM JDK.

     

    The nightly build is available here: https://adoptopenjdk.net/nightly.html?variant=openjdk8&jvmVariant=openj9

    Unfortunally the problem is still present.

    It doesn't happen every time, but if I run my test class 2 or 3 times, at least once happen.

  • ym1
    ym1
    5 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-13T19:46:43Z  

    Unfortunally the problem is still present.

    It doesn't happen every time, but if I run my test class 2 or 3 times, at least once happen.

    OK, I think there have been some changes recently in this area. I can see that the nightly OpenJ9 build does things differently than 8.0.5.17 and no matter what I do I cannot get your test case to fail, but it fails easily on 8.0.5.17.

     

    Can I ask you to make sure that you ran with the OpenJ9 nightly build and not the IBM JDK by accident? It would save a lot of time if we knew for sure that problem still exists.

     

    If it still fails can you open an issue at this GitHub repo: https://github.com/eclipse/openj9 and feel free to point at this thread if you want. If you can't do it I can do it on your behalf.

  • Alessandro Pasini
    Alessandro Pasini
    4 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-14T07:22:51Z  
    • ym1
    • ‏2018-08-13T19:46:43Z

    OK, I think there have been some changes recently in this area. I can see that the nightly OpenJ9 build does things differently than 8.0.5.17 and no matter what I do I cannot get your test case to fail, but it fails easily on 8.0.5.17.

     

    Can I ask you to make sure that you ran with the OpenJ9 nightly build and not the IBM JDK by accident? It would save a lot of time if we knew for sure that problem still exists.

     

    If it still fails can you open an issue at this GitHub repo: https://github.com/eclipse/openj9 and feel free to point at this thread if you want. If you can't do it I can do it on your behalf.

    I was sure that I ran the test on the nigthly build, but today I retry the test several time and it never go wrong (on nightly).

    So probably you were right.

    Is there a chance to know when next version of IBM SDK will be release?

    Thanks a lot for everything.

  • ym1
    ym1
    5 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-08-14T17:16:51Z  

    I was sure that I ran the test on the nigthly build, but today I retry the test several time and it never go wrong (on nightly).

    So probably you were right.

    Is there a chance to know when next version of IBM SDK will be release?

    Thanks a lot for everything.

    8.0.5.20 was just released last week, but unfortunately it still has the bug. I think the next release (next quarter, so around November) will probably catch up to OpenJ9 and have the fix. I'll make sure that internal bugs are opened to try to get this fixed for the next release.

     

    You can continue using OpenJ9 until then if that is acceptable to you.

  • FrankBrandt
    FrankBrandt
    1 Post

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-12-20T15:01:29Z  
    • ym1
    • ‏2018-08-14T17:16:51Z

    8.0.5.20 was just released last week, but unfortunately it still has the bug. I think the next release (next quarter, so around November) will probably catch up to OpenJ9 and have the fix. I'll make sure that internal bugs are opened to try to get this fixed for the next release.

     

    You can continue using OpenJ9 until then if that is acceptable to you.

    Hi Younes,

    do you know if this issue is fixed in 8.0.5.25? We seem to have the same issue after updating from 8.0.5.6 to 8.0.5.17 (which is delivered as part of WebSphere 8.5.5 FP14). Unfortunately the problem is not easy to reproduce for us on non-PROD stage and cannot test easily on PROD. We had to revert to FP13 and 8.0.5.6.

    Best Regards,

    Frank

  • ym1
    ym1
    5 Posts

    Re: IBM SDK 8.0.5.17 - INCORRECT RETURN FROM CLASS.ISASSIGNABLEFROM()

    ‏2018-12-20T18:32:41Z  

    Hi Younes,

    do you know if this issue is fixed in 8.0.5.25? We seem to have the same issue after updating from 8.0.5.6 to 8.0.5.17 (which is delivered as part of WebSphere 8.5.5 FP14). Unfortunately the problem is not easy to reproduce for us on non-PROD stage and cannot test easily on PROD. We had to revert to FP13 and 8.0.5.6.

    Best Regards,

    Frank

    Hi Frank. Yes 8.0.5.25 contains the fix. I just tested it on Win64 to be sure using the above test case and it now passes consistently where 8.0.5.17 is still failing consistently.

     

    Hope that helps.