Skip to content
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

jdk_security4_FAILED IOException: Short read of DER length or Too short #17279

Closed
JasonFengJ9 opened this issue Apr 25, 2023 · 15 comments
Closed

Comments

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Apr 25, 2023

Failure link

From an internal build(ub18-aarch64-8):

java version "11.0.19" 2023-04-18
IBM Semeru Runtime Certified Edition 11.0.19+7 (build 11.0.19+7)
Eclipse OpenJ9 VM 11.0.19+7 (build master-bf214ec21, JRE 11 Linux aarch64-64-Bit Compressed References 20230422_294 (JIT enabled, AOT enabled)
OpenJ9   - bf214ec21
OMR      - 97cf2a6e8
JCL      - c7130ce692 based on jdk-11.0.19+7)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2023-04-22T04:00:05.685Z] variation: Mode150
[2023-04-22T04:00:05.685Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2023-04-22T04:00:50.551Z] TEST: sun/security/krb5/auto/BasicProc.java

[2023-04-22T04:00:50.554Z] STDERR:
[2023-04-22T04:00:50.554Z] java.lang.Exception: Proc abnormal end
[2023-04-22T04:00:50.554Z] 	at Proc.readData(Proc.java:371)
[2023-04-22T04:00:50.554Z] 	at BasicProc.once(BasicProc.java:274)
[2023-04-22T04:00:50.554Z] 	at BasicProc.main(BasicProc.java:145)

[2023-04-22T04:00:50.554Z] TEST: sun/security/krb5/auto/DiffSaltParams.java

[2023-04-22T04:00:50.556Z] STDERR:
[2023-04-22T04:00:50.556Z] javax.security.auth.login.LoginException: Short read of DER length
[2023-04-22T04:00:50.556Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:788)
[2023-04-22T04:00:50.556Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:592)
[2023-04-22T04:00:50.556Z] 	at Context.fromUserPass(Context.java:190)
[2023-04-22T04:00:50.556Z] 	at Context.fromUserPass(Context.java:147)
[2023-04-22T04:00:50.556Z] 	at DiffSaltParams.main(DiffSaltParams.java:48)
[2023-04-22T04:00:50.556Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-04-22T04:00:50.556Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-04-22T04:00:50.556Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-04-22T04:00:50.556Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-04-22T04:00:50.556Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-04-22T04:00:50.556Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2023-04-22T04:00:50.556Z] Caused by: java.io.IOException: Short read of DER length
[2023-04-22T04:00:50.556Z] 	at java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:571)
[2023-04-22T04:00:50.556Z] 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:257)
[2023-04-22T04:00:50.556Z] 	at java.base/sun.security.util.DerInputStream.getDerValue(DerInputStream.java:436)
[2023-04-22T04:00:50.556Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.init(KRBError.java:318)
[2023-04-22T04:00:50.556Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.<init>(KRBError.java:189)
[2023-04-22T04:00:50.556Z] 	at java.security.jgss/sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:63)
[2023-04-22T04:00:50.556Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.send(KrbAsReqBuilder.java:345)
[2023-04-22T04:00:50.556Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.action(KrbAsReqBuilder.java:498)
[2023-04-22T04:00:50.556Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:746)
[2023-04-22T04:00:50.556Z] 	... 10 more
[2023-04-22T04:00:50.556Z] 
[2023-04-22T04:00:50.556Z] JavaTest Message: Test threw exception: javax.security.auth.login.LoginException: Short read of DER length

[2023-04-22T04:01:26.559Z] TEST: sun/security/krb5/auto/HttpNegotiateServer.java
[2023-04-22T04:01:26.564Z] Caused by: java.io.IOException: Short read of DER length

[2023-04-22T04:01:26.565Z] TEST: sun/security/krb5/auto/HttpsCB.java
[2023-04-22T04:01:26.570Z] Caused by: java.io.IOException: Short read of DER length
[2023-04-22T04:01:26.570Z] JavaTest Message: Test threw exception: java.lang.RuntimeException: assertEquals: expected false to equal true

[2023-04-22T04:01:27.590Z] TEST: sun/security/krb5/auto/KdcPolicy.java

[2023-04-22T04:01:27.594Z] STDERR:
[2023-04-22T04:01:27.594Z] java.lang.Exception: Does not match. Output is c30000-
[2023-04-22T04:01:27.594Z] 	at KdcPolicy.test(KdcPolicy.java:299)
[2023-04-22T04:01:27.594Z] 	at KdcPolicy.run(KdcPolicy.java:107)
[2023-04-22T04:01:27.594Z] 	at KdcPolicy.main0(KdcPolicy.java:85)
[2023-04-22T04:01:27.594Z] 	at KdcPolicy.main(KdcPolicy.java:58)

[2023-04-22T04:02:10.307Z] TEST: sun/security/krb5/auto/ReferralsTest.java

[2023-04-22T04:02:10.311Z] STDERR:
[2023-04-22T04:02:10.311Z] javax.security.auth.login.LoginException: Short read of DER length

[2023-04-22T04:03:22.915Z] Test results: passed: 132; failed: 6
[2023-04-22T04:03:35.333Z] Report written to /home/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_linux/aqa-tests/TKG/output_16821276969217/jdk_security4_0/report/html/report.html
[2023-04-22T04:03:35.333Z] Results written to /home/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_linux/aqa-tests/TKG/output_16821276969217/jdk_security4_0/work
[2023-04-22T04:03:35.333Z] Error: Some tests failed or other problems occurred.
[2023-04-22T04:03:35.333Z] -----------------------------------
[2023-04-22T04:03:35.333Z] jdk_security4_0_FAILED

50x internal grinder - all failed

@JasonFengJ9
Copy link
Member Author

JasonFengJ9 commented May 2, 2023

JDK11 aarch64_linux 0.38 build(cent7-aarch64-2)

java version "11.0.19" 2023-04-18
IBM Semeru Runtime Certified Edition 11.0.19.0-rc1 (build 11.0.19+7)
Eclipse OpenJ9 VM 11.0.19.0-rc1 (build v0.38.0-release-d57d05932, JRE 11 Linux aarch64-64-Bit Compressed References 20230501_301 (JIT enabled, AOT enabled)
OpenJ9   - d57d05932
OMR      - 855813495
JCL      - 1539bdcd45 based on jdk-11.0.19+7)

[2023-05-01T18:11:12.727Z] variation: Mode150
[2023-05-01T18:11:12.727Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2023-05-01T18:12:01.797Z] TEST: sun/security/krb5/auto/BasicProc.java

[2023-05-01T18:12:01.799Z] STDERR:
[2023-05-01T18:12:01.799Z] java.lang.Exception: Proc abnormal end
[2023-05-01T18:12:01.799Z] 	at Proc.readData(Proc.java:371)
[2023-05-01T18:12:01.799Z] 	at BasicProc.once(BasicProc.java:274)
[2023-05-01T18:12:01.799Z] 	at BasicProc.main(BasicProc.java:145)

[2023-05-01T18:12:01.800Z] JavaTest Message: Test threw exception: java.lang.Exception: Proc abnormal end

[2023-05-01T18:12:07.900Z] TEST: sun/security/krb5/auto/DiffSaltParams.java

[2023-05-01T18:12:07.902Z] STDERR:
[2023-05-01T18:12:07.902Z] javax.security.auth.login.LoginException: Short read of DER length
[2023-05-01T18:12:07.902Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:788)
[2023-05-01T18:12:07.902Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:592)
[2023-05-01T18:12:07.902Z] 	at Context.fromUserPass(Context.java:190)
[2023-05-01T18:12:07.902Z] 	at Context.fromUserPass(Context.java:147)
[2023-05-01T18:12:07.902Z] 	at DiffSaltParams.main(DiffSaltParams.java:48)
[2023-05-01T18:12:07.902Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-05-01T18:12:07.902Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-05-01T18:12:07.902Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-05-01T18:12:07.902Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-05-01T18:12:07.902Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-05-01T18:12:07.902Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2023-05-01T18:12:07.902Z] Caused by: java.io.IOException: Short read of DER length
[2023-05-01T18:12:07.902Z] 	at java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:571)
[2023-05-01T18:12:07.902Z] 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:257)
[2023-05-01T18:12:07.902Z] 	at java.base/sun.security.util.DerInputStream.getDerValue(DerInputStream.java:436)
[2023-05-01T18:12:07.902Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.init(KRBError.java:318)
[2023-05-01T18:12:07.902Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.<init>(KRBError.java:189)
[2023-05-01T18:12:07.902Z] 	at java.security.jgss/sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:63)
[2023-05-01T18:12:07.902Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.send(KrbAsReqBuilder.java:345)
[2023-05-01T18:12:07.902Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.action(KrbAsReqBuilder.java:498)
[2023-05-01T18:12:07.902Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:746)
[2023-05-01T18:12:07.902Z] 	... 10 more
[2023-05-01T18:12:07.902Z] 
[2023-05-01T18:12:07.902Z] JavaTest Message: Test threw exception: javax.security.auth.login.LoginException: Short read of DER length

[2023-05-01T18:12:22.753Z] TEST: sun/security/krb5/auto/HttpNegotiateServer.java

[2023-05-01T18:12:22.758Z] Caused by: java.io.IOException: Short read of DER length
[2023-05-01T18:12:22.758Z] 	at java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:571)
[2023-05-01T18:12:22.758Z] 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:257)
[2023-05-01T18:12:22.758Z] 	at java.base/sun.security.util.DerInputStream.getDerValue(DerInputStream.java:436)
[2023-05-01T18:12:22.758Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.init(KRBError.java:318)
[2023-05-01T18:12:22.758Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.<init>(KRBError.java:189)
[2023-05-01T18:12:22.758Z] 	at java.security.jgss/sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:63)
[2023-05-01T18:12:22.758Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.send(KrbAsReqBuilder.java:345)
[2023-05-01T18:12:22.758Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.action(KrbAsReqBuilder.java:498)
[2023-05-01T18:12:22.758Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:746)
[2023-05-01T18:12:22.758Z] 	... 15 more
[2023-05-01T18:12:22.758Z] java.lang.RuntimeException: Test error
[2023-05-01T18:12:22.758Z] 	at HttpNegotiateServer.main(HttpNegotiateServer.java:244)
[2023-05-01T18:12:22.759Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-05-01T18:12:22.759Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-05-01T18:12:22.759Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-05-01T18:12:22.759Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-05-01T18:12:22.759Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-05-01T18:12:22.759Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2023-05-01T18:12:22.759Z] 
[2023-05-01T18:12:22.759Z] JavaTest Message: Test threw exception: java.lang.RuntimeException: Test error

[2023-05-01T18:12:24.360Z] TEST: sun/security/krb5/auto/HttpsCB.java

[2023-05-01T18:12:24.366Z] Caused by: java.io.IOException: Short read of DER length
[2023-05-01T18:12:24.366Z] 	at java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:571)
[2023-05-01T18:12:24.366Z] 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:257)
[2023-05-01T18:12:24.366Z] 	at java.base/sun.security.util.DerInputStream.getDerValue(DerInputStream.java:436)

[2023-05-01T18:12:24.906Z] TEST: sun/security/krb5/auto/KdcPolicy.java

[2023-05-01T18:12:24.910Z] STDERR:
[2023-05-01T18:12:24.910Z] java.lang.Exception: Does not match. Output is c30000-
[2023-05-01T18:12:24.910Z] 	at KdcPolicy.test(KdcPolicy.java:299)
[2023-05-01T18:12:24.910Z] 	at KdcPolicy.run(KdcPolicy.java:107)
[2023-05-01T18:12:24.910Z] 	at KdcPolicy.main0(KdcPolicy.java:85)
[2023-05-01T18:12:24.910Z] 	at KdcPolicy.main(KdcPolicy.java:58)
[2023-05-01T18:12:24.910Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-05-01T18:12:24.910Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-05-01T18:12:24.910Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-05-01T18:12:24.910Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-05-01T18:12:24.910Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-05-01T18:12:24.910Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2023-05-01T18:12:24.910Z] 
[2023-05-01T18:12:24.910Z] JavaTest Message: Test threw exception: java.lang.Exception: Does not match. Output is c30000-

[2023-05-01T18:13:00.194Z] TEST: sun/security/krb5/auto/ReferralsTest.java

[2023-05-01T18:13:00.198Z] Caused by: java.io.IOException: Short read of DER length

[2023-05-01T18:13:00.199Z] TEST RESULT: Failed. Execution failed: `main' threw exception: javax.security.auth.login.LoginException: Short read of DER length
[2023-05-01T18:13:00.199Z] --------------------------------------------------
[2023-05-01T18:14:11.530Z] Test results: passed: 132; failed: 6
[2023-05-01T18:14:26.318Z] Report written to /home/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_linux/aqa-tests/TKG/output_16829570829237/jdk_security4_0/report/html/report.html
[2023-05-01T18:14:26.318Z] Results written to /home/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_linux/aqa-tests/TKG/output_16829570829237/jdk_security4_0/work
[2023-05-01T18:14:26.318Z] Error: Some tests failed or other problems occurred.
[2023-05-01T18:14:26.318Z] -----------------------------------
[2023-05-01T18:14:26.318Z] jdk_security4_0_FAILED

50x grinder - all failed

JDK11 aarch64_mac 0.38
JDK11 ppc64_aix 0.38
This is an issue across platforms.

50x aarch64_linux_hotspot_2023-04-28
50x x64_linux_hotspot_2023-04-28

@JasonFengJ9 JasonFengJ9 changed the title JDK11 jdk_security4_0_FAILED IOException: Short read of DER length JDK11 jdk_security4_FAILED IOException: Short read of DER length May 2, 2023
@JasonFengJ9
Copy link
Member Author

@JasonFengJ9
Copy link
Member Author

Similarjdk_security4 failures JDK17 x86-64_linux 0.38

java version "17.0.7" 2023-04-18
IBM Semeru Runtime Certified Edition 17.0.7.0-rc1 (build 17.0.7+7)
Eclipse OpenJ9 VM 17.0.7.0-rc1 (build v0.38.0-release-d57d05932, JRE 17 Linux amd64-64-Bit Compressed References 20230418_399 (JIT enabled, AOT enabled)
OpenJ9   - d57d05932
OMR      - 855813495
JCL      - 47464180951 based on jdk-17.0.7+7)

[2023-05-02T20:04:35.976Z] variation: Mode150
[2023-05-02T20:04:35.976Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2023-05-02T20:05:28.399Z] TEST: sun/security/krb5/auto/BasicProc.java
[2023-05-02T20:05:28.404Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: Proc abnormal end

[2023-05-02T20:05:43.332Z] TEST: sun/security/krb5/auto/DiffSaltParams.java
[2023-05-02T20:05:43.334Z] javax.security.auth.login.LoginException: Too short
[2023-05-02T20:05:43.334Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:793)
[2023-05-02T20:05:43.334Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:597)
[2023-05-02T20:05:43.334Z] 	at Context.fromUserPass(Context.java:190)
[2023-05-02T20:05:43.334Z] 	at Context.fromUserPass(Context.java:147)
[2023-05-02T20:05:43.334Z] 	at DiffSaltParams.main(DiffSaltParams.java:48)
[2023-05-02T20:05:43.334Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-05-02T20:05:43.334Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2023-05-02T20:05:43.334Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-05-02T20:05:43.334Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2023-05-02T20:05:43.334Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-05-02T20:05:43.334Z] 	at java.base/java.lang.Thread.run(Thread.java:857)
[2023-05-02T20:05:43.334Z] Caused by: java.io.IOException: Too short
[2023-05-02T20:05:43.334Z] 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:361)
[2023-05-02T20:05:43.334Z] 	at java.base/sun.security.util.DerInputStream.getDerValue(DerInputStream.java:109)
[2023-05-02T20:05:43.334Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.init(KRBError.java:320)
[2023-05-02T20:05:43.334Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.<init>(KRBError.java:191)
[2023-05-02T20:05:43.334Z] 	at java.security.jgss/sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:63)
[2023-05-02T20:05:43.334Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.send(KrbAsReqBuilder.java:345)
[2023-05-02T20:05:43.334Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.action(KrbAsReqBuilder.java:498)
[2023-05-02T20:05:43.334Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:751)
[2023-05-02T20:05:43.334Z] 	... 10 more
[2023-05-02T20:05:43.334Z] 
[2023-05-02T20:05:43.334Z] JavaTest Message: Test threw exception: javax.security.auth.login.LoginException: Too short

[2023-05-02T20:06:44.221Z] TEST: sun/security/krb5/auto/HttpNegotiateServer.java

[2023-05-02T20:06:44.227Z] Caused by: javax.security.auth.login.LoginException: Too short
[2023-05-02T20:06:44.227Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:793)
[2023-05-02T20:06:44.227Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:597)
[2023-05-02T20:06:44.227Z] 	at java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)
[2023-05-02T20:06:44.227Z] 	at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:679)
[2023-05-02T20:06:44.227Z] 	at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:677)

[2023-05-02T20:06:44.227Z] TEST: sun/security/krb5/auto/HttpsCB.java
[2023-05-02T20:06:44.232Z] Caused by: java.io.IOException: Too short
[2023-05-02T20:06:44.232Z] 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:361)
[2023-05-02T20:06:44.232Z] 	at java.base/sun.security.util.DerInputStream.getDerValue(DerInputStream.java:109)
[2023-05-02T20:06:44.232Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.init(KRBError.java:320)
[2023-05-02T20:06:44.232Z] 	at java.security.jgss/sun.security.krb5.internal.KRBError.<init>(KRBError.java:191)
[2023-05-02T20:06:44.232Z] 	at java.security.jgss/sun.security.krb5.KrbAsRep.<init>(KrbAsRep.java:63)
[2023-05-02T20:06:44.232Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.send(KrbAsReqBuilder.java:345)
[2023-05-02T20:06:44.232Z] 	at java.security.jgss/sun.security.krb5.KrbAsReqBuilder.action(KrbAsReqBuilder.java:498)
[2023-05-02T20:06:44.232Z] 	at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:751)
[2023-05-02T20:06:44.232Z] 	... 46 more
[2023-05-02T20:06:44.232Z] java.lang.RuntimeException: assertEquals: expected false to equal true

[2023-05-02T20:06:44.232Z] TEST: sun/security/krb5/auto/KdcPolicy.java

[2023-05-02T20:06:44.236Z] STDERR:
[2023-05-02T20:06:44.236Z] java.lang.Exception: Does not match. Output is c30000-
[2023-05-02T20:06:44.236Z] 	at KdcPolicy.test(KdcPolicy.java:299)
[2023-05-02T20:06:44.236Z] 	at KdcPolicy.run(KdcPolicy.java:107)
[2023-05-02T20:06:44.236Z] 	at KdcPolicy.main0(KdcPolicy.java:85)
[2023-05-02T20:06:44.236Z] 	at KdcPolicy.main(KdcPolicy.java:58)

[2023-05-02T20:07:44.561Z] TEST: sun/security/krb5/auto/ReferralsTest.java
[2023-05-02T20:07:44.564Z] Caused by: java.io.IOException: Too short

[2023-05-02T20:07:44.564Z] TEST RESULT: Failed. Execution failed: `main' threw exception: javax.security.auth.login.LoginException: Too short
[2023-05-02T20:07:44.564Z] --------------------------------------------------
[2023-05-02T20:09:40.781Z] Test results: passed: 139; failed: 6
[2023-05-02T20:09:52.865Z] Report written to /home/jenkins/workspace/Test_openjdk17_j9_extended.openjdk_x86-64_linux/aqa-tests/TKG/output_16830489667675/jdk_security4_0/report/html/report.html
[2023-05-02T20:09:52.865Z] Results written to /home/jenkins/workspace/Test_openjdk17_j9_extended.openjdk_x86-64_linux/aqa-tests/TKG/output_16830489667675/jdk_security4_0/work
[2023-05-02T20:09:52.865Z] Error: Some tests failed or other problems occurred.
[2023-05-02T20:09:52.865Z] -----------------------------------
[2023-05-02T20:09:52.865Z] jdk_security4_0_FAILED

@JasonFengJ9 JasonFengJ9 changed the title JDK11 jdk_security4_FAILED IOException: Short read of DER length jdk_security4_FAILED IOException: Short read of DER length or Too short May 3, 2023
@JasonFengJ9
Copy link
Member Author

Also seen at JDK 20 x86-64_linux head stream

openjdk version "20.0.1" 2023-04-18
IBM Semeru Runtime Open Edition 20.0.1+9 (build 20.0.1+9)
Eclipse OpenJ9 VM 20.0.1+9 (build master-d4443d666, JRE 20 Linux amd64-64-Bit Compressed References 20230418_13 (JIT enabled, AOT enabled)
OpenJ9   - d4443d666
OMR      - 7ddb743ea
JCL      - 346547a86 based on jdk-20.0.1+9)

[2023-04-29T20:51:37.223Z] TEST RESULT: Failed. Execution failed: `main' threw exception: javax.security.auth.login.LoginException: Too short
[2023-04-29T20:51:37.223Z] --------------------------------------------------
[2023-04-29T20:56:05.458Z] Test results: passed: 146; failed: 6
[2023-04-29T20:56:15.629Z] Report written to /home/jenkins/workspace/Test_openjdk20_j9_extended.openjdk_x86-64_linux/aqa-tests/TKG/output_16827833824352/jdk_security4_0/report/html/report.html
[2023-04-29T20:56:15.629Z] Results written to /home/jenkins/workspace/Test_openjdk20_j9_extended.openjdk_x86-64_linux/aqa-tests/TKG/output_16827833824352/jdk_security4_0/work
[2023-04-29T20:56:15.629Z] Error: Some tests failed or other problems occurred.
[2023-04-29T20:56:15.629Z] -----------------------------------
[2023-04-29T20:56:15.629Z] jdk_security4_0_FAILED

Not seen in JDK8 head stream, and JDK19 0.37.

@pshipton
Copy link
Member

pshipton commented May 3, 2023

Picking one test sun/security/krb5/auto/BasicProc.java still fails when run by itself on jdk11 xlinux, head stream (32634).
It also fails with -Djdk.nativeCrypto=false (32635).
It passes with a 0.36.1 build and a 0.38 m2 build (32636, 32637).

m2
08:42:21 OpenJ9 - 353bdb0
08:42:21 OMR - 855813495
08:42:21 JCL - b04e256c1c based on jdk-11.0.19+6)

rc1 (CE build)
OpenJ9 - d57d059
OMR - 855813495
JCL - 1539bdcd45 based on jdk-11.0.19+7) equivalent to 3a273aca68

Changes:
353bdb0...d57d059
ibmruntimes/openj9-openjdk-jdk11@b04e256...3a273ac

@pshipton
Copy link
Member

pshipton commented May 3, 2023

Confirmed failing (32638) with:
18:40:39 OpenJ9 - d57d059
18:40:39 OMR - 8558134
18:40:39 JCL - 3a273ac based on jdk-11.0.19+7)

ibmruntimes/openj9-openjdk-jdk11#641 seems the likely cause.

Creating a 0.38 build without this change for testing.
Internal build waiting for a machine.
Open build https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-Personal/389/

@pshipton
Copy link
Member

pshipton commented May 3, 2023

sun/security/krb5/auto/BasicProc.java is passing with ibmruntimes/openj9-openjdk-jdk11#641 reverted (32648).

@pshipton
Copy link
Member

pshipton commented May 3, 2023

@jasonkatonica @KostasTsiounis I need to back out ibmruntimes/openj9-openjdk-jdk11#641, and all other versions, from the 0.38 release streams. It also needs to be backed out or fixed in the head stream soon. Do you have a preference?

@KostasTsiounis
Copy link
Contributor

I think I can see what the issue is. I am reading a DerValue for the debug message, which sets the data pointer to the end. I can test it with a change to that and see if that fixes the issue.

If that is actually the problem, the fix should be quick. I will know by tomorrow.

I am, however, ok with either solution (fix or revert).

@KostasTsiounis
Copy link
Contributor

Those tests are part of the extended.openjdk target, right?

@pshipton
Copy link
Member

pshipton commented May 3, 2023

Those tests are part of the extended.openjdk target, right?

Yes, you can also run jdk_security4 which is a smaller target, or run just the failing tests.

Is there any reason we need to have this change in the 0.38 release and should wait for the fix? I figured (wrong) it was a safe change to include.

@KostasTsiounis
Copy link
Contributor

No, there is nothing rushing us to get it in for this release. It's a debug message helping us figure Kerberos issues that might arise in the future.

@pshipton
Copy link
Member

pshipton commented May 3, 2023

The change is reverted in 0.38 so I'll move this to 0.40.

@KostasTsiounis
Copy link
Contributor

A fix for this issue was put in for Java 11, 17, 20 and Next, where the PRs for the debug message had already been merged.
Java11: ibmruntimes/openj9-openjdk-jdk11#653
Java17: ibmruntimes/openj9-openjdk-jdk17#210
Java20: ibmruntimes/openj9-openjdk-jdk20#43
JavaNext: ibmruntimes/openj9-openjdk-jdk#597

@KostasTsiounis
Copy link
Contributor

@pshipton Do you think we should close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants