JDK-8268093 : Manual Testcase: "sun/security/krb5/config/native/TestDynamicStore.java" Fails with NPE
  • Type: Bug
  • Component: security-libs
  • Affected Version: 11.0.12-oracle,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2021-06-02
  • Updated: 2021-09-30
  • Resolved: 2021-06-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 18
11.0.13-oracleFixed 17 b27Fixed 18Fixed
Related Reports
Relates :  
Description
OS:
OS_X

Environment:
Mac OS X 10.15.7 (x86_64)

Reproducible: Always

Is it a Regression: No,  New test introduced in JDk17b08 and is failing since then.
Same is the case for JDK11.0.12, test was introduced in b04 and is failing since then.

Is it a platform specific issue:  Yes, test applicable only for OS_X


Exception/Error from Log:

Fill in dynamic store
Run aa 1
Remove everything
Run ra 1
----------System.err:(23/1150)----------
>>> action: a a
0
0
0
0
>>> action: r a
0
0
0
0
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "sun.security.krb5.Config.get(String[])" is null
	at TestDynamicStore.main(TestDynamicStore.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:831)

JavaTest Message: Test threw exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "sun.security.krb5.Config.get(String[])" is null
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "sun.security.krb5.Config.get(String[])" is null

Comments
Fix request [11u] I downport this for parity with 11.0.13-oracle. No risk, only a test change. Clean backport.
28-09-2021

Changeset: e39346e7 Author: Weijun Wang <weijun@openjdk.org> Date: 2021-06-11 15:12:11 +0000 URL: https://git.openjdk.java.net/jdk17/commit/e39346e708a06cdee2b9a096f08c1cfe2e21dfc2
11-06-2021

[~gpatil] I'd like to add some more comment and a clearer error message to this test. Can you make this issue public?
04-06-2021

The test needs to run with sudo because system kerberos settings cannot be adjusted by a normal user. Is that how you ran it?
03-06-2021

This issue is reproduced in CPU21_07-ATR4: JDK_11.0.12_b05 (macOS 11 Big Sur x64)
02-06-2021